Repository navigation
Use reviewer bot token to enable auto-merge in all templates - #1449
Merged
Merged
Conversation
`enablePullRequestAutoMerge` requires push access to the protected base branch. Repos with "Restrict who can push" enabled on `main` reject the write-level `paketo-bot` token with "Pull request User is not authorized for this protected branch", while the admin-level reviewer bot bypasses the restriction. Apply the same fix already made to the implementation template in #1381 to the language-family (java, rust), library (libpak-tools), and builder templates.
anthonydahanne
approved these changes
Oct 26, 2026
anthonydahanne
approved these changes
Oct 26, 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.
Problem
The
Enable Auto-Mergestep usesPAKETO_BOT_GITHUB_TOKEN(write) in thelanguage-family,library, andbuildertemplates.enablePullRequestAutoMergerequires push access to the protected base branch, so repos with "Restrict who can push to matching branches" enabled onmainfail with:This is currently breaking:
paketo-buildpacks/javapaketo-community/rustpaketo-buildpacks/libpak-toolsand will break
java-native-image,builder-jammy-java-tiny, andbuilder-noble-java-tinyonce a bot PR reaches that step.Fix
Use
PAKETO_BOT_REVIEWER_GITHUB_TOKEN(admin) for the auto-merge step, matching theimplementationtemplate (fixed in #1381).Rollout
Existing repos pick this up through the
update-github-configsync workflow. The first sync PR in the affected repos will need to be merged manually, because the broken auto-merge is what would normally merge it.Note
This PR was written by opencode and reviewed by a human.