Skip to content

Commit 4563db8

Browse files
committed
CI: trust collaborators in PR author check
Remove the temporary checked-in allowlist and treat COLLABORATOR as a trusted author signal again so the workflow matches the team policy. Made-with: Cursor
1 parent 4d4cb84 commit 4563db8

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

.github/workflows/pr-author-org-check.yml

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ jobs:
3434
# Workflow policy inputs
3535
REVIEW_LABEL: Check-PR-author-ORG
3636

37-
# Checked-in allowlist inputs
38-
INTERNAL_AUTHOR_ALLOWLIST: |
39-
rwgk
40-
4137
# API request context/auth
4238
GH_TOKEN: ${{ github.token }}
4339
REPO: ${{ github.repository }}
@@ -89,31 +85,17 @@ jobs:
8985
}
9086
9187
HAS_TRUSTED_SIGNAL=false
92-
ALLOWLIST_CHECK="not needed (no restricted paths)"
9388
LABEL_ACTION="not needed (no restricted paths)"
9489
TRUSTED_SIGNALS="(none)"
95-
PR_AUTHOR_CANONICAL=${PR_AUTHOR,,}
9690
9791
if [ "$TOUCHES_RESTRICTED_PATHS" = "true" ]; then
9892
case "$AUTHOR_ASSOCIATION" in
99-
MEMBER|OWNER)
93+
COLLABORATOR|MEMBER|OWNER)
10094
HAS_TRUSTED_SIGNAL=true
101-
ALLOWLIST_CHECK="skipped (author association is a trusted signal)"
10295
LABEL_ACTION="not needed (author association is a trusted signal)"
10396
TRUSTED_SIGNALS="author_association:$AUTHOR_ASSOCIATION"
10497
;;
10598
esac
106-
107-
if [ "$HAS_TRUSTED_SIGNAL" = "false" ]; then
108-
if printf '%s\n' "$INTERNAL_AUTHOR_ALLOWLIST" | tr '[:upper:]' '[:lower:]' | grep -Fxq "$PR_AUTHOR_CANONICAL"; then
109-
HAS_TRUSTED_SIGNAL=true
110-
ALLOWLIST_CHECK="matched ($PR_AUTHOR_CANONICAL)"
111-
LABEL_ACTION="not needed (workflow allowlist is a trusted signal)"
112-
TRUSTED_SIGNALS="workflow_allowlist:$PR_AUTHOR_CANONICAL"
113-
else
114-
ALLOWLIST_CHECK="not matched ($PR_AUTHOR_CANONICAL)"
115-
fi
116-
fi
11799
fi
118100
119101
LABEL_ALREADY_PRESENT=false
@@ -132,7 +114,6 @@ jobs:
132114
echo "- **Error**: Failed to add the \`$REVIEW_LABEL\` label."
133115
echo "- **Author**: $PR_AUTHOR"
134116
echo "- **Author association**: $AUTHOR_ASSOCIATION"
135-
echo "- **Allowlist check**: $ALLOWLIST_CHECK"
136117
echo ""
137118
write_matching_restricted_paths
138119
echo ""
@@ -151,7 +132,6 @@ jobs:
151132
echo "- **Author association**: $AUTHOR_ASSOCIATION"
152133
echo "- **Touches restricted paths**: $TOUCHES_RESTRICTED_PATHS"
153134
echo "- **Restricted paths**: \`cuda_bindings/\`, \`cuda_python/\`"
154-
echo "- **Allowlist check**: $ALLOWLIST_CHECK"
155135
echo "- **Trusted signals**: $TRUSTED_SIGNALS"
156136
echo "- **Label action**: $LABEL_ACTION"
157137
if [ "$TOUCHES_RESTRICTED_PATHS" = "true" ]; then

0 commit comments

Comments
 (0)