-
-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resource not accessible by integration #76
Comments
the workflow in question is pretty simple / the comment part was more or less copied from the actions readme: name: Benchmark
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: create perf comparison
id: perf-compare
run: |
# create baseline
git checkout cc0808fd2ecd30a563bbe20e5d4e989d7071aa03
composer install --prefer-dist --no-progress --no-suggest
composer benchmark-baseline
# cleanup
rm composer.lock
# compare against current commit
git checkout ${{ github.event.pull_request.head.sha }}
composer install --prefer-dist --no-progress --no-suggest
comparison=$(composer benchmark-compare-baseline)
# prepare multi line message
comparison="${comparison//'%'/'%25'}"
comparison="${comparison//$'\n'/'%0A'}"
comparison="${comparison//$'\r'/'%0D'}"
echo "::set-output name=comparison::$comparison"
- name: Find Comment
uses: peter-evans/find-comment@v1
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: running benchmarks...
- name: Create comment
if: steps.fc.outputs.comment-id == ''
uses: peter-evans/create-or-update-comment@v1
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
```
${{ steps.perf-compare.outputs.comparison }}
```
- name: Update comment
if: steps.fc.outputs.comment-id != ''
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
body: |
```
${{ steps.perf-compare.outputs.comparison }}
``` |
This is because the
|
Thanks for noticing. UX wise it would be great to reflect the underlying problem in the error message of the GithubAction at runtime |
Yes, it's not very clear from GitHub's error message what the problem is. I'll see if I can catch this particular error and display something more meaningful. |
Thanks! |
EDIT: SOLVED in #76 (comment)
I'm still not understanding this. Here is my case:
How and where to set pull_request_target to make the github action able to comment on PR made by public fork without asking the developer to configured enable workflows? |
Based on this asnwer, pull_request_target will work after
Then merge first to master. If any fork push to the master branch, the |
I try to post a string to create a comment, but getting a
Resource not accessible by integration
errorsee action logs https://github.com/parsica-php/parsica/pull/37/checks?check_run_id=2113059121
maybe one of the ansi special chars is a problem?
The text was updated successfully, but these errors were encountered: