Skip to content

Support --target-api-url consistently on download-logs commands#1499

Merged
offbyone merged 2 commits intomainfrom
o1/push-mvlyxwzkvtxx
Feb 2, 2026
Merged

Support --target-api-url consistently on download-logs commands#1499
offbyone merged 2 commits intomainfrom
o1/push-mvlyxwzkvtxx

Conversation

@offbyone
Copy link
Contributor

Only the gei tree of commands had support for this flag, but the script generator for ado2gh and bbs2gh used it.

This updates the flag support to use both.

  • Did you write/update appropriate tests
  • Release notes updated (if appropriate)
  • Appropriate logging output
  • Issue linked
  • Docs updated (or issue created)
  • New package licenses are added to ThirdPartyNotices.txt (if applicable)

Fixes the root cause of https://github.com/github/migration-friction/issues/4575

@github-actions
Copy link

github-actions bot commented Jan 26, 2026

Unit Test Results

    1 files      1 suites   10m 24s ⏱️
1 030 tests 1 030 ✅ 0 💤 0 ❌
1 031 runs  1 031 ✅ 0 💤 0 ❌

Results for commit 298fe37.

♻️ This comment has been updated with latest results.

@offbyone offbyone force-pushed the o1/push-mvlyxwzkvtxx branch 2 times, most recently from 136a383 to 23f9b2c Compare January 27, 2026 16:14
@offbyone offbyone force-pushed the o1/push-mvlyxwzkvtxx branch from 23f9b2c to 0660e89 Compare January 30, 2026 15:36
@offbyone offbyone marked this pull request as ready for review January 30, 2026 15:44
Copilot AI review requested due to automatic review settings January 30, 2026 15:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates download-logs commands to consistently support --target-api-url across ado2gh, bbs2gh, and gei, while preserving backward compatibility where needed.

Changes:

  • Switched the shared download-logs option from --github-api-url to --target-api-url.
  • Added --github-api-url as an alias for backward compatibility in ado2gh and bbs2gh.
  • Updated unit tests and release notes to reflect the new option/alias behavior.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/gei/Commands/DownloadLogs/DownloadLogsCommand.cs Marks the command as sealed (no functional change to option behavior).
src/bbs2gh/Commands/DownloadLogs/DownloadLogsCommand.cs Adds --github-api-url alias to the --target-api-url option for backward compatibility.
src/ado2gh/Commands/DownloadLogs/DownloadLogsCommand.cs Adds --github-api-url alias to the --target-api-url option for backward compatibility.
src/OctoshiftCLI.Tests/bbs2gh/Commands/DownloadLogs/DownloadLogsCommandTests.cs Updates option expectations and adds an alias-coverage test.
src/OctoshiftCLI.Tests/ado2gh/Commands/DownloadLogs/DownloadLogsCommandTests.cs Updates option expectations and adds an alias-coverage test.
src/Octoshift/Commands/DownloadLogs/DownloadLogsCommandBase.cs Renames the option token to --target-api-url and updates help text.
RELEASENOTES.md Adds bullets describing the user-facing behavior changes.

Comment on lines +34 to 37
public virtual Option<string> GithubApiUrl { get; } = new("--target-api-url")
{
Description = "Target GitHub API URL if not targeting github.com (default: https://api.github.com)."
Description = "Target GitHub API URL if not targeting github.com (default: https://api.github.com). Also accepts --github-api-url for backward compatibility."
};
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GithubApiUrl now defines the --target-api-url option, which is inconsistent with the TargetApiUrl naming used across other command bases (e.g., src/Octoshift/Commands/AbortMigration/AbortMigrationCommandBase.cs:33, src/Octoshift/Commands/CreateTeam/CreateTeamCommandBase.cs:27). Consider renaming the command/args property to TargetApiUrl to better match the established pattern and reduce confusion for future maintenance.

Copilot uses AI. Check for mistakes.
@@ -1 +1,3 @@

- Fixed `ado2gh generate-script --download-migration-logs` to generate valid commands using `--target-api-url` that work with the `ado2gh download-logs` command
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first bullet says ado2gh generate-script --download-migration-logs was fixed to generate commands using --target-api-url, but this PR doesn’t change the generate-script implementation—only the download-logs option name/aliasing. Consider rewording this bullet to reflect the actual change (i.e., ado2gh download-logs now accepts --target-api-url / --github-api-url), to avoid implying behavior changed in generate-script.

Copilot uses AI. Check for mistakes.
Only the `gei` tree of commands had support for this flag, but the script
generator for ado2gh and bbs2gh used it.

This updates the flag support to use both
@offbyone offbyone force-pushed the o1/push-mvlyxwzkvtxx branch from 0660e89 to 79d8937 Compare January 30, 2026 16:41
@github-actions
Copy link

Code Coverage

Package Line Rate Branch Rate Complexity Health
ado2gh 71% 70% 737
Octoshift 84% 73% 1810
bbs2gh 83% 78% 663
gei 81% 73% 608
Summary 81% (7938 / 9823) 73% (1947 / 2649) 3818

@offbyone offbyone enabled auto-merge February 2, 2026 16:47
@offbyone offbyone merged commit bde1ac7 into main Feb 2, 2026
34 checks passed
@offbyone offbyone deleted the o1/push-mvlyxwzkvtxx branch February 2, 2026 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants