Skip to content

Commit e54ba1b

Browse files
authored
Merge pull request #27 from ipfs/fix-fork-prs
fix: set status for pull_request_target events too
2 parents 37b3705 + 60b5ad3 commit e54ba1b

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
## [1.4.1] - 2025-03-06
11+
12+
### Fixed
13+
14+
- Fix commit status and PR comment when action is triggered by `pull_request_target` event.
15+
- Fix bug in `ipfs-cluster-ctl-version` input not being used correctly.
16+
1017
## [1.4.0] - 2025-03-05
1118

1219
### Added

action.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ runs:
211211
uses: ipfs/download-ipfs-distribution-action@v1
212212
with:
213213
name: ipfs-cluster-ctl
214-
version: ${{ inputs.cluster-version }}
214+
version: ${{ inputs.ipfs-cluster-ctl-version }}
215215

216216
- name: Set pin name
217217
id: set-pin-name
@@ -313,7 +313,7 @@ runs:
313313
const cid = '${{ steps.merkleize.outputs.cid }}';
314314
315315
// For PR events, we need to use the head SHA
316-
const sha = context.eventName === 'pull_request'
316+
const sha = (context.eventName === 'pull_request' || context.eventName === 'pull_request_target')
317317
? context.payload.pull_request.head.sha
318318
: context.sha;
319319
@@ -328,7 +328,7 @@ runs:
328328
});
329329
330330
- name: Find Comment to update
331-
if: ${{ inputs.set-github-status && github.event_name == 'pull_request' }}
331+
if: ${{ inputs.set-github-status && (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') }}
332332
uses: peter-evans/find-comment@v3
333333
id: fc
334334
with:
@@ -338,7 +338,7 @@ runs:
338338
token: ${{ inputs.github-token }}
339339

340340
- name: Create or update comment
341-
if: ${{ inputs.set-github-status && github.event_name == 'pull_request' }}
341+
if: ${{ inputs.set-github-status && (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') }}
342342
uses: peter-evans/create-or-update-comment@v4
343343
with:
344344
token: ${{ inputs.github-token }}

0 commit comments

Comments
 (0)