The auto-merge guard comment implies its author clause is forgeable - #181
Merged
Conversation
Calling the head-repo clause the one that cannot be forged implies the author clause can be. GitHub logins hold only letters, digits and hyphens, so dependabot[bot] is unregisterable and user.login is immutable for a PR's life. The clauses are complementary: the author one excludes other authors, the head-repo one excludes forks. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
"Dependabot never opens a PR from a fork" is true, but it argues the clause can never fire, which invites deleting it. The clause is defence in depth: it holds if the author check is ever loosened. GitHub's own recommended guard omits it, so the reason has to be on the line. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
The first sentence was false for the default event set: github.actor names whoever triggered the event, and on opened that is the author. The second justified the head-repo clause by a future edit, which argues it does nothing today. Both now state a present-tense reason. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
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.
The comment on the auto-merge guard ranked its two clauses, calling the head-repo one the only clause that cannot be forged. Neither can be forged. GitHub logins hold only letters, digits and hyphens, so
dependabot[bot]is unregisterable.It also said
github.actoris the pusher rather than the author.github.actornames whoever triggered the event, and onopenedthat is the author, so the old wording was false for the default event set.The replacement gives each clause its own present-tense reason. The author check reads
user.loginbecausegithub.actornames a triggerer. The head-repo clause turns dependabot's same-repo branches from an assumption into a precondition the run enforces.