Merge pull request #81 from peter-evans/error-note

Add note to see readme for a particular error
This commit is contained in:
Peter Evans 2021-04-10 15:47:12 +09:00 committed by GitHub
commit a35cf36e53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8468 additions and 1283 deletions

View File

@ -59,6 +59,7 @@ This action was created to help facilitate a GitHub Actions "ChatOps" solution i
| `reactions` | A comma separated list of reactions to add to the comment. (`+1`, `-1`, `laugh`, `confused`, `heart`, `hooray`, `rocket`, `eyes`) | | | `reactions` | A comma separated list of reactions to add to the comment. (`+1`, `-1`, `laugh`, `confused`, `heart`, `hooray`, `rocket`, `eyes`) | |
Note: In *public* repositories this action does not work in `pull_request` workflows when triggered by forks. Note: In *public* repositories this action does not work in `pull_request` workflows when triggered by forks.
Any attempt will be met with the error, `Resource not accessible by integration`.
This is due to token restrictions put in place by GitHub Actions. Private repositories can be configured to [enable workflows](https://docs.github.com/en/github/administering-a-repository/disabling-or-limiting-github-actions-for-a-repository#enabling-workflows-for-private-repository-forks) from forks to run without restriction. See [here](https://github.com/peter-evans/create-pull-request/blob/master/docs/concepts-guidelines.md#restrictions-on-repository-forks) for further explanation. Alternatively, use the [`pull_request_target`](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_target) event to comment on pull requests. This is due to token restrictions put in place by GitHub Actions. Private repositories can be configured to [enable workflows](https://docs.github.com/en/github/administering-a-repository/disabling-or-limiting-github-actions-for-a-repository#enabling-workflows-for-private-repository-forks) from forks to run without restriction. See [here](https://github.com/peter-evans/create-pull-request/blob/master/docs/concepts-guidelines.md#restrictions-on-repository-forks) for further explanation. Alternatively, use the [`pull_request_target`](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_target) event to comment on pull requests.
#### Outputs #### Outputs

590
dist/index.js vendored

File diff suppressed because one or more lines are too long

View File

@ -156,6 +156,9 @@ async function run() {
} catch (error) { } catch (error) {
core.debug(inspect(error)); core.debug(inspect(error));
core.setFailed(error.message); core.setFailed(error.message);
if (error.message == 'Resource not accessible by integration') {
core.error(`See this action's readme for details about this error`);
}
} }
} }

9157
package-lock.json generated

File diff suppressed because it is too large Load Diff