ci: use GitHub App identity instead of PAT for Agents-M365Copilot#1442
Merged
Conversation
Pivots the Agents-M365Copilot generation flow off the PAT-backed `microsoftkiota` service connection and onto the existing `microsoft-graph-devx-bot` GitHub App identity. - Add opt-in `useGitHubAppAuth` param to language-generation-kiota.yml. When true, the public repo is cloned anonymously and the push remote is switched to a GitHub App installation token before pushing. SDK repos (param defaults false) are unaffected. - Add scripts/set-app-token-push-url.ps1 to set the origin push URL to the App token without logging it (fetch stays anonymous). - Remove the Agents-M365Copilot repo resource (microsoftkiota endpoint) and its SDL-exclude entry; set useGitHubAppAuth: true on the 6 Agents jobs. PR creation already used the GitHub App, so this completes PAT elimination for Agents-M365Copilot checkout/push/PR. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
any specific reason why were keeping PAT based auth as an option? |
Member
Author
|
We are not |
gavinbarron
commented
Jun 25, 2026
gavinbarron
commented
Jun 25, 2026
gavinbarron
commented
Jun 25, 2026
Co-authored-by: Gavin Barron <gavin.barron@gmail.com>
ramsessanchez
approved these changes
Jun 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Pivots the Agents-M365Copilot generation flow off the PAT-backed
microsoftkiotaGitHub service connection and onto the existingmicrosoft-graph-devx-botGitHub App identity. PR creation already used the App, so this completes PAT elimination for Agents-M365Copilot checkout/push/PR.Because
microsoft/Agents-M365Copilotis a public repo, the checkout is done anonymously (no credential) and the App token is used only for the push.Changes
scripts/set-app-token-push-url.ps1(new): generates a GitHub App installation token (reusingGenerate-Github-Token.ps1), masks it, and sets only theoriginpush URL to use it. Fetch stays anonymous.language-generation-kiota.yml: added opt-inuseGitHubAppAuthparam (defaultfalse). Whentrue→ anonymous clone replaces the resource checkout; AKV secrets + push-URL step run before the push; existinggit-push-files.ps1/create-pull-request.ps1unchanged. Whenfalse→ microsoftgraph SDK repos behave exactly as before.generation-pipeline.yml: removed theAgents-M365Copilotrepo resource (themicrosoftkiotaendpoint) and its SDL-exclude entry; setuseGitHubAppAuth: trueon all 6 Agents jobs (csharp/python/typescript × v1/beta).Validation
microsoftkiotareferences remain; new script parses clean; no dangling checkout references; SDK-repo path untouched (param defaults false).Note
microsoft-graph-devx-botApp must havecontents:writeonmicrosoft/Agents-M365Copilot(PR creation already proves install + PR perms).Microsoft Reviewers: Open in CodeFlow