Skip to content

Commit 840a851

Browse files
runningcodeclaude
andcommitted
refactor(build): Move GitMetadata struct before execute function (EME-604)
Move GitMetadata struct declaration to before execute function to improve code organization, with collect_git_metadata immediately following execute without any declarations in between. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 45e4b22 commit 840a851

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/commands/build/upload.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,19 @@ pub fn make_command(command: Command) -> Command {
119119
)
120120
}
121121

122+
/// Holds git metadata collected for build uploads.
123+
#[derive(Debug, Default)]
124+
struct GitMetadata {
125+
head_sha: Option<Digest>,
126+
vcs_provider: String,
127+
head_repo_name: String,
128+
head_ref: String,
129+
base_ref: String,
130+
base_repo_name: String,
131+
base_sha: Option<Digest>,
132+
pr_number: Option<u32>,
133+
}
134+
122135
pub fn execute(matches: &ArgMatches) -> Result<()> {
123136
let config = Config::current();
124137
let path_strings = matches
@@ -269,19 +282,6 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
269282
Ok(())
270283
}
271284

272-
/// Holds git metadata collected for build uploads.
273-
#[derive(Debug, Default)]
274-
struct GitMetadata {
275-
head_sha: Option<Digest>,
276-
vcs_provider: String,
277-
head_repo_name: String,
278-
head_ref: String,
279-
base_ref: String,
280-
base_repo_name: String,
281-
base_sha: Option<Digest>,
282-
pr_number: Option<u32>,
283-
}
284-
285285
/// Collects git metadata from arguments and VCS introspection.
286286
///
287287
/// When `auto_collect` is false, only explicitly provided values are collected;

0 commit comments

Comments
 (0)