Skip to content

Commit

Permalink
Disable benchmark PR comments, doesn't work on forks (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
caitlinelfring authored Sep 28, 2021
1 parent 953cec1 commit 161a9d9
Showing 1 changed file with 51 additions and 49 deletions.
100 changes: 51 additions & 49 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,52 +50,54 @@ jobs:
exit $EXIT_CODE
- name: Find Comment
uses: peter-evans/find-comment@v1
id: comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: <!-- cob-output -->

- name: Create or update comment if benchmark failed
uses: peter-evans/create-or-update-comment@v1
if: steps.cob.outputs.exit_code != '0'
with:
comment-id: ${{ steps.comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
<!-- cob-output -->
### Benchmark comparison to `origin/main`
* Comparison commit: ${{ steps.cob.outputs.base_commit }}
_This is currently only informational_
**This PR may have a negative performance impact**
```
${{ steps.cob.outputs.result }}
```
edit-mode: replace

- name: Update comment if benchmark succeeded
uses: peter-evans/create-or-update-comment@v1
if: steps.comment.outputs.comment-id != '' && steps.cob.outputs.exit_code == '0'
with:
comment-id: ${{ steps.comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
<!-- cob-output -->
### Benchmark comparison to `origin/main`
* Comparison commit: ${{ steps.cob.outputs.base_commit }}
_This is currently only informational_
**This PR previously reported a negative performance impact that appears to have been resolved**
```
${{ steps.cob.outputs.result }}
```
edit-mode: replace
# FIXME: The action to comment on PRs does not work for forks
# https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#restrictions-on-repository-forks
# - name: Find Comment
# uses: peter-evans/find-comment@v1
# id: comment
# with:
# issue-number: ${{ github.event.pull_request.number }}
# comment-author: 'github-actions[bot]'
# body-includes: <!-- cob-output -->

# - name: Create or update comment if benchmark failed
# uses: peter-evans/create-or-update-comment@v1
# if: steps.cob.outputs.exit_code != '0'
# with:
# comment-id: ${{ steps.comment.outputs.comment-id }}
# issue-number: ${{ github.event.pull_request.number }}
# body: |
# <!-- cob-output -->
# ### Benchmark comparison to `origin/main`

# * Comparison commit: ${{ steps.cob.outputs.base_commit }}

# _This is currently only informational_

# **This PR may have a negative performance impact**

# ```
# ${{ steps.cob.outputs.result }}
# ```
# edit-mode: replace

# - name: Update comment if benchmark succeeded
# uses: peter-evans/create-or-update-comment@v1
# if: steps.comment.outputs.comment-id != '' && steps.cob.outputs.exit_code == '0'
# with:
# comment-id: ${{ steps.comment.outputs.comment-id }}
# issue-number: ${{ github.event.pull_request.number }}
# body: |
# <!-- cob-output -->
# ### Benchmark comparison to `origin/main`

# * Comparison commit: ${{ steps.cob.outputs.base_commit }}

# _This is currently only informational_

# **This PR previously reported a negative performance impact that appears to have been resolved**

# ```
# ${{ steps.cob.outputs.result }}
# ```
# edit-mode: replace

0 comments on commit 161a9d9

Please sign in to comment.