Skip to content

Commit e77f7d2

Browse files
committed
feat(MD): remove pr trigger limitation
1 parent d102cda commit e77f7d2

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

README.md

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ See [action.yml](action.yml) for more details.
4444
with:
4545
# Authetication token to access GitHub APIs. (Can be omitted by default.)
4646
github-token: ${{ github.token }}
47-
# Verbose setting SHA when using Pull_Request event trigger to fix #16. (For push even trigger this is not necessary.)
47+
# For which commit SHA the action should lookup a PR for (By default current commit)
4848
sha: ${{ github.event.pull_request.head.sha }}
4949
# Only return if PR is still open. (By default it returns PRs in any state.)
5050
filterOutClosed: true
@@ -93,23 +93,6 @@ See [GitHub Documentation](https://docs.github.com/en/rest/commits/commits#list-
9393

9494
## Limitations
9595

96-
### Pull_request trigger
97-
If you use the `pull_request` event trigger, it won't find the associated PR for the first commit inside that same PR out of the box.
98-
99-
This [article](https://frontside.com/blog/2020-05-26-github-actions-pull_request/#how-does-pull_request-affect-actionscheckout) describes why this is, in detail.
100-
A short form of the article's explanation is, that Github creates an extra merge commit before the `pull_request` event is triggered for which this action can't find an assosiated PR. The `pull_request` trigger for the second PR commit and all following, will again work as expected.
101-
102-
#### Workaround
103-
To always find and pass the correct commit SHA to this action use this workflow config:
104-
```yml
105-
steps:
106-
- uses: 8BitJonny/gh-get-current-pr@3.0.0
107-
id: PR
108-
with:
109-
sha: ${{ github.event.pull_request.head.sha }}
110-
```
111-
This will then work no matter the trigger event and no matter if it is the first PR commit or not.
112-
11396
### Can't find closed, unmerged PRs
11497
Currently, if you try to find a PR that hasn't been merged yet AND which has been closed, then this app will completely fail in finding that PR. This workflow can only find open PRs, draft PRs and closed+merged PRs.
11598

0 commit comments

Comments
 (0)