Skip to content

Commit

Permalink
only find and post comment if run on a PR (#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjyetman authored Feb 7, 2025
1 parent 0d0774a commit 6ee7ab9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/R-CMD-check-CRAN-incoming.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ jobs:
if-no-files-found: ignore

- name: Find Comment
if: steps.rcmdcheck.outputs.notes > 0
if: steps.rcmdcheck.outputs.notes > 0 && github.event_name == 'pull_request'
uses: peter-evans/find-comment@v3
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'

- name: Create or update comment
if: steps.rcmdcheck.outputs.notes > 0
if: steps.rcmdcheck.outputs.notes > 0 && github.event_name == 'pull_request'
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
Expand Down

0 comments on commit 6ee7ab9

Please sign in to comment.