Skip to content

Commit ce7d23e

Browse files
committed
check: name the fifth way a bypass list goes unverifiable
`_bypass_actors_above_bot` also returns None when a `User` actor's id has nothing to compare against — `_user_id(bot_name)` 404s — so a `bot_name` that isn't a real login lands on a message naming only causes that aren't theirs. `check_bot_permission` doesn't call it out either, so nothing in `tend check` points at the config. Both copies of the sentence get it: `_policy_gate`'s tags reason and `check_branch_protection`'s ruleset reason read the same helper's None, and the point of matching their wording is that they stay matched.
1 parent 932922c commit ce7d23e

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎generator/src/tend/checks.py‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,9 @@ def check_branch_protection(repo: str, branch: str, bot_name: str) -> CheckResul
208208
None,
209209
f"Branch '{branch}' is protected but could not verify that the bot "
210210
"cannot bypass its rulesets — either they aren't readable with this "
211-
"token, or a bypass actor names a team, app, or deploy key whose "
212-
"membership isn't resolvable here. Check the bypass list manually.",
211+
"token, or a bypass actor names a principal tend cannot resolve: a "
212+
"team, app, or deploy key, or any user if `bot_name` itself does not "
213+
"resolve to an account. Check the bypass list manually.",
213214
)
214215

215216
return CheckResult(
@@ -926,8 +927,9 @@ def _policy_gate(
926927
"admits tags, and whether an all-tags ruleset gates them is "
927928
"unverifiable with this token — either the rulesets aren't "
928929
"readable, a bypass list is withheld (only a repo admin "
929-
"reads one), or a bypass actor names a team, app, or deploy "
930-
"key whose membership isn't resolvable here",
930+
"reads one), or a bypass actor names a principal tend "
931+
"cannot resolve: a team, app, or deploy key, or any user "
932+
"if `bot_name` itself does not resolve to an account",
931933
verified=False,
932934
)
933935
elif gated is False:

0 commit comments

Comments
 (0)