Fix integrate-boards command to use GitHub App connections when available #1360
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses the issue where
ado2gh integrate-boards
fails when using GitHub PATs with broader permissions due to Azure DevOps changes implemented around June 2nd that require minimal PAT permissions for boards integration.Problem
Azure DevOps now rejects GitHub PATs with any extra permissions when configuring boards integration, causing failures for customers who use the same PAT for both repository migration and boards integration (as recommended by our generated scripts).
Solution
The command now automatically detects and uses existing GitHub App service connections when available, falling back to PAT-based connections only when necessary. This leverages the existing GitHub App infrastructure already present in the codebase.
Key Changes
IntegrateBoardsCommandHandler
now checks for existing GitHub App service connections firstisGitHubApp = true
when using GitHub App connectionsExample Usage
Testing
This change ensures that customers with existing GitHub App setups will automatically use the more reliable authentication method, while maintaining full compatibility for those still using PAT-based workflows.
Fixes #1357.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
dev.azure.com
/usr/lib/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/gh-gei/gh-gei/src/OctoshiftCLI.IntegrationTests/bin/Debug/net8.0/OctoshiftCLI.IntegrationTests.runtimeconfig.json --depsfile /home/REDACTED/work/gh-gei/gh-gei/src/OctoshiftCLI.IntegrationTests/bin/Debug/net8.0/OctoshiftCLI.IntegrationTests.deps.json /home/REDACTED/work/gh-gei/gh-gei/src/OctoshiftCLI.IntegrationTests/bin/Debug/net8.0/testhost.dll --port 43171 --endpoint 127.0.0.1:043171 --role client --parentprocessid 5656 --telemetryoptedin false
(dns block)https://api.github.com/orgs/octoshift-e2e-source-linux/repos
/usr/lib/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/gh-gei/gh-gei/src/OctoshiftCLI.IntegrationTests/bin/Debug/net8.0/OctoshiftCLI.IntegrationTests.runtimeconfig.json --depsfile /home/REDACTED/work/gh-gei/gh-gei/src/OctoshiftCLI.IntegrationTests/bin/Debug/net8.0/OctoshiftCLI.IntegrationTests.deps.json /home/REDACTED/work/gh-gei/gh-gei/src/OctoshiftCLI.IntegrationTests/bin/Debug/net8.0/testhost.dll --port 43171 --endpoint 127.0.0.1:043171 --role client --parentprocessid 5656 --telemetryoptedin false
(http block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.