Skip to content

Commit

Permalink
chore: No package-size comments on forks. (#654)
Browse files Browse the repository at this point in the history
  • Loading branch information
kinyoklion authored Nov 4, 2024
1 parent 773d02c commit b8a2331
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions actions/package-size/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ runs:
echo "PACK_SIZE=$PACK_SIZE" >> $GITHUB_ENV
- name: Find Size Comment
# Only do commenting on non-forks. A fork does not have permissions for comments.
if: github.event.pull_request.head.repo.full_name == github.repository
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e
id: fc
with:
Expand All @@ -39,7 +41,7 @@ runs:
body-includes: '${{ inputs.package_name }} size report'

- name: Create comment
if: steps.fc.outputs.comment-id == ''
if: steps.fc.outputs.comment-id == '' && github.event.pull_request.head.repo.full_name == github.repository
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
with:
issue-number: ${{ inputs.pr_number }}
Expand All @@ -50,7 +52,7 @@ runs:
Size limit: ${{ inputs.size_limit }}
- name: Update comment
if: steps.fc.outputs.comment-id != ''
if: steps.fc.outputs.comment-id != '' && github.event.pull_request.head.repo.full_name == github.repository
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
Expand Down

0 comments on commit b8a2331

Please sign in to comment.