Skip to content

Commit

Permalink
Try to limit to author and org members
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Dec 27, 2024
1 parent 5ce16cb commit bab6581
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/format-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,14 @@ jobs:
# Important to have no permissions for this because the code can't be trusted.
comment-format-untrusted:
runs-on: ubuntu-latest
if: github.event_name == 'issue_comment' && github.event.issue.pull_request && contains(github.event.comment.body, '!format')
if: |
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
contains(github.event.comment.body, '!format') &&
(
github.event.comment.author_association == 'MEMBER' ||
github.event.comment.user.id == github.event.issue.user.id
)
permissions: {}
steps:
- name: Checkout upstream
Expand Down

0 comments on commit bab6581

Please sign in to comment.