You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-18Lines changed: 1 addition & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ See [action.yml](action.yml) for more details.
44
44
with:
45
45
# Authetication token to access GitHub APIs. (Can be omitted by default.)
46
46
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)
48
48
sha: ${{ github.event.pull_request.head.sha }}
49
49
# Only return if PR is still open. (By default it returns PRs in any state.)
50
50
filterOutClosed: true
@@ -93,23 +93,6 @@ See [GitHub Documentation](https://docs.github.com/en/rest/commits/commits#list-
93
93
94
94
## Limitations
95
95
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
-
113
96
### Can't find closed, unmerged PRs
114
97
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.
0 commit comments