Skip to content

Commit f56a8d1

Browse files
committed
CI: show matched restricted paths in PR check
Include the exact restricted-path matches in the job summary so contributors and reviewers can see what triggered the author organization check. Made-with: Cursor
1 parent ead62e7 commit f56a8d1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ jobs:
6464
TOUCHES_RESTRICTED_PATHS=true
6565
fi
6666
67+
write_matching_restricted_paths() {
68+
echo "- **Matched restricted paths**:"
69+
echo '```text'
70+
printf '%s\n' "$MATCHING_RESTRICTED_PATHS"
71+
echo '```'
72+
}
73+
6774
IS_ALLOWED=false
6875
case "$AUTHOR_ASSOCIATION" in
6976
MEMBER|OWNER)
@@ -80,6 +87,8 @@ jobs:
8087
echo "- **Author association**: $AUTHOR_ASSOCIATION"
8188
echo "- **Restricted paths**: \`cuda_bindings/\`, \`cuda_python/\`"
8289
echo ""
90+
write_matching_restricted_paths
91+
echo ""
8392
echo "- **Policy**: See \`cuda_bindings/LICENSE\` and \`cuda_python/LICENSE\`. Only NVIDIA organization members may modify files under \`cuda_bindings/\` or \`cuda_python/\`."
8493
echo ""
8594
echo "Please update the PR at: $PR_URL"
@@ -94,4 +103,8 @@ jobs:
94103
echo "- **Author association**: $AUTHOR_ASSOCIATION"
95104
echo "- **Touches restricted paths**: $TOUCHES_RESTRICTED_PATHS"
96105
echo "- **Restricted paths**: \`cuda_bindings/\`, \`cuda_python/\`"
106+
if [ "$TOUCHES_RESTRICTED_PATHS" = "true" ]; then
107+
echo ""
108+
write_matching_restricted_paths
109+
fi
97110
} >> "$GITHUB_STEP_SUMMARY"

0 commit comments

Comments
 (0)