Repository navigation
Use dedicated GitHub App to import untracked repositories - #2973
Open
marcoienibot wants to merge 1 commit into
Open
marcoienibot wants to merge 1 commit into
marcoienibot wants to merge 1 commit into
Conversation
Dry-run check results |
marcoieni
reviewed
Nov 20, 2026
| client-id: ${{ secrets.SYNC_TEAM_GH_APP_ID }} | ||
| private-key: ${{ secrets.SYNC_TEAM_GH_APP_PRIVATE_KEY }} | ||
| GH_TOKEN: ${{ steps.app-token.outputs.token }} | ||
| run: gh pr close --delete-branch "$AUTOMATION_BRANCH" |
Member
There was a problem hiding this comment.
I also added --delete-branch to delete the branch after closing the PR
sync-team-app is read-only, so pushing the automation branch always failed with a 403. Use the credentials of a dedicated GitHub App, stored in the `untracked-repos` environment, and scope its token to contents and pull requests. GITHUB_TOKEN no longer needs to push. Co-authored-by: marcoienibot <206998110+marcoienibot@users.noreply.github.com>
marcoieni
force-pushed
the
t3/untracked-repos-app-environment
branch
from
November 20, 2026 16:57
31bf751 to
642b5b7
Compare
marcoieni
marked this pull request as ready for review
November 20, 2026 17:15
marcoieni
requested review from
Mark-Simulacrum,
emilyalbini,
jdno,
jieyouxu and
ubiratansoares
as code owners
November 20, 2026 17:15
Kobzol
approved these changes
Nov 20, 2026
This branch has not been deployed
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.
Follow-up to #2967. This should make the Check Untracked Repositories workflow able to push the automation branch and open its pull request.
I created the github app https://github.com/organizations/rust-lang/settings/apps/team-untracked-repos and set up the secrets.
Known limitation
The App has no
Workflowspermission. If an automation PR stays open while a change to.github/workflows/lands onmain, GitHub may reject the next force-push of the automation branch.But this can be fixed in a follow-up PR if something wants to do it.