CI: restrict remove-reviewer workflow to main repo only

Adds a github.repository guard so the job does not run in forks,
preventing unintended resource consumption and command execution
against fork PRs.
This commit is contained in:
M. Scot Breitenfeld
2026-06-16 09:58:54 -05:00
parent 747b2b4c10
commit 263cd26c0b
+2 -1
View File
@@ -18,8 +18,9 @@ permissions:
jobs:
remove:
runs-on: ubuntu-latest
# Only fire on PR comments that contain the slash command
# Only fire on PR comments in the main repo that contain the slash command
if: |
github.repository == 'HDFGroup/hdf5' &&
github.event.issue.pull_request != null &&
contains(github.event.comment.body, '/remove-reviewer')