feat(automerge): allow multiple bot identities via array allow-list#1679
Open
npiccolo wants to merge 1 commit into
Open
feat(automerge): allow multiple bot identities via array allow-list#1679npiccolo wants to merge 1 commit into
npiccolo wants to merge 1 commit into
Conversation
Replace the hardcoded `svc-cli-bot` author check in cli:release:automerge with a small allow-list array (`ALLOWED_BOT_USERS`) and an exported `isAllowedBotUser()` helper. Adds `svc-idee-bot` to the list so the IDE Experience team's nightly release-PR automerge stops failing with 'PR must be created by "svc-cli-bot"'. New bots can be added by reviewed PR to that constant. Tests added for the helper.
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.
What
Replaces the hardcoded
svc-cli-botauthor check incli:release:automergewith a small allow-list array (
ALLOWED_BOT_USERS) and an exported helperisAllowedBotUser(). Addssvc-idee-botto the list.Why
Today the command rejects any PR not authored by
svc-cli-bot. Thisextends the check to support additional bots so other teams can reuse
cli:release:automergefor their own automerge flows. New bots getadded by reviewed PR to the allow-list constant.
Tests
Adds
test/commands/cli.release.automerge.test.tscovering:svc-cli-botstill passes (regression)svc-idee-botpassesundefined/null/ empty-string login is rejectedRun with
npx mocha test/commands/cli.release.automerge.test.ts— all 7 pass locally.