docs: note about limitations with forks

This commit is contained in:
Michael Shick 2020-07-06 12:08:37 -04:00
parent e11f0a9cdb
commit fdfdba3fa2
No known key found for this signature in database
GPG key ID: ADF5BC9704BB4A61

View file

@ -2,6 +2,12 @@
> A GitHub Action which adds a comment to a pull request's issue. > A GitHub Action which adds a comment to a pull request's issue.
## Limitations
Due to how GitHub handles permissions in PRs coming from forks, this action is limited to PRs based on branches. See this issue: https://github.community/t/github-actions-are-severely-limited-on-prs/18179/4 for more detail.
I'm currently investigating a workaround via a simple bot you can easily deploy. More soon...
## Usage ## Usage
```yaml ```yaml
@ -12,15 +18,15 @@ jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: mshick/add-pr-comment@v1 - uses: mshick/add-pr-comment@v1
with: with:
message: | message: |
**Hello** **Hello**
🌏 🌏
! !
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token-user-login: 'github-actions[bot]' # The user.login for temporary GitHub tokens repo-token-user-login: 'github-actions[bot]' # The user.login for temporary GitHub tokens
allow-repeats: false # This is the default allow-repeats: false # This is the default
``` ```
You can even use it on PR Issues that are related to PRs that were merged into master, for example: You can even use it on PR Issues that are related to PRs that were merged into master, for example:
@ -35,13 +41,13 @@ jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: mshick/add-pr-comment@v1 - uses: mshick/add-pr-comment@v1
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
message: | message: |
**Hello MASTER** **Hello MASTER**
allow-repeats: true allow-repeats: true
``` ```
## Configuration options ## Configuration options