Skip to content

Commit 8759264

Browse files
committed
Remove unwanted (and unhelpful) extra check
- `&& github.event.pull_request.number` was added in #363 to prevent attempts to comment on a non-PR. - However, it failed to take account of when the pull request came from elsewhere (e.g. in the case of an issue comment). - It was anyway unnecessary because the external comment action handles all cases correctly, including when there is no PR to comment upon.
1 parent f1dd203 commit 8759264

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/actions/handle-fix-commit/action.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ runs:
5555
fi
5656
5757
- name: No changes to apply
58-
if: steps.check_changes.outputs.changes == 'false' && github.event.pull_request.number
58+
if: steps.check_changes.outputs.changes == 'false'
5959
uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1
6060
with:
6161
message: 'No automatic ${{ inputs.tool }} fixes were necessary.'
6262

6363
- name: Get PR maintainer_can_modify property
6464
id: pr-properties
65-
if: steps.check_changes.outputs.changes == 'true' && github.event.pull_request.number
65+
if: steps.check_changes.outputs.changes == 'true'
6666
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
6767
with:
6868
script: |
@@ -123,7 +123,7 @@ runs:
123123
exit 1
124124
125125
- name: Notify of commit
126-
if: steps.commit_and_push.conclusion == 'success' && steps.commit_and_push.outputs.pushed == 'true' && github.event.pull_request.number
126+
if: steps.commit_and_push.conclusion == 'success' && steps.commit_and_push.outputs.pushed == 'true'
127127
uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1
128128
with:
129129
message: |
@@ -147,7 +147,7 @@ runs:
147147
path: ${{ inputs.working-directory }}/${{ steps.create_patch.outputs.patch_name }}
148148

149149
- name: Comment with patch instructions
150-
if: steps.create_patch.outputs.patch_name && github.event.pull_request.number
150+
if: steps.create_patch.outputs.patch_name
151151
uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1
152152
with:
153153
message: |

0 commit comments

Comments
 (0)