don't persist credentials so pat is used for repo-sync#41644
Conversation
|
👋 Hey there spelunker. It looks like you've modified some files that we can't accept as contributions:
You'll need to revert all of the files you changed that match that list using GitHub Desktop or The complete list of files we can't accept are:
We also can't accept contributions to files in the content directory with frontmatter |
How to review these changes 👓Thank you for your contribution. To review these changes, choose one of the following options: A Hubber will need to deploy your changes internally to review. Table of review linksNote: Please update the URL for your staging server or codespace. This pull request contains code changes, so we will not generate a table of review links. 🤖 This comment is automatically generated. |
There was a problem hiding this comment.
Pull request overview
This PR addresses a repo-sync workflow failure by preventing actions/checkout from persisting Git credentials that were overriding the PAT (Personal Access Token) required for syncing between the public and private docs repositories.
Key Changes:
- Added
persist-credentials: falseto the checkout step in the repo-sync workflow to prevent credential persistence from interfering with the PAT embedded in the source repository URL
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Check out repo | ||
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | ||
| with: | ||
| persist-credentials: false |
There was a problem hiding this comment.
[nitpick] For consistency with the existing usage in .github/workflows/check-broken-links-github-github.yml (line 30), consider using the string 'false' instead of the boolean false for the persist-credentials parameter.
While both values are functionally equivalent in GitHub Actions YAML, maintaining consistency across the codebase makes the patterns easier to follow.
| persist-credentials: false | |
| persist-credentials: 'false' |
|
Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours. If you're looking for your next contribution, check out our help wanted issues ⚡ |
Why:
repo-sync is failing:
https://github.com/github/docs/actions/runs/19864074248
and repo-sync sets the repo with a token in the URL:
seems this started after the update to actions/checkout v6?
What's being changed (if available, include any code snippets, screenshots, or gifs):
persist-credentials: falsefor actions/checkoutthis defaults to true and we use a PAT anyways, so
's theory is that v6 somehow is overriding the PAT even though it's embedded in the URL 🤔 worth a try?
Check off the following: