File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ The action does the following:
3030|--------------------------------|----------------------------------------------------------------------------|
3131| publish_release | Whether or not to publish a release |
3232| release_body | The body for the release |
33- | release_commit | The commit hash for the release |
33+ | release_commit | The commit hash for the release. (i.e. `${GITHUB_SHA}` |
3434| release_generate_release_notes | Whether or not to generate release notes. True if `release_body` is blank. |
3535| release_tag | The tag for the release (i.e. `release_version` with prefix) |
3636| release_version | The version for the release (i.e. `yyyy.mmdd.hhmmss`) |
Original file line number Diff line number Diff line change @@ -220,13 +220,7 @@ def get_push_event_details() -> dict:
220220
221221 is_pull_request = True if github_event .get ("pull_request" ) else False
222222
223- try :
224- # set sha to the head sha of the pull request
225- github_sha = github_event ["pull_request" ]["head" ]["sha" ]
226- except KeyError :
227- # not a pull request event
228- github_sha = os .environ ["GITHUB_SHA" ]
229- push_event_details ['release_commit' ] = github_sha
223+ push_event_details ['release_commit' ] = os .environ ["GITHUB_SHA" ]
230224
231225 if is_pull_request :
232226 push_event_details ['release_version' ] = f'0.0.{ github_event ["number" ]} '
You can’t perform that action at this time.
0 commit comments