Skip to content

Commit

Permalink
[ci] fix wrong eventName in private CI trigger
Browse files Browse the repository at this point in the history
Signed-off-by: Gary Guo <[email protected]>
  • Loading branch information
nbdd0121 authored and engdoreis committed Aug 22, 2024
1 parent 8b52459 commit 0bafae6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/private-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ jobs:
with:
script: |
const payload = {
sha: context.eventName === 'pull_request' ? context.payload.pull_request.head.sha : context.sha,
sha: context.eventName === 'pull_request_target' ? context.payload.pull_request.head.sha : context.sha,
pull_request: context.issue.number,
inputs: {
// For push events, also send branch name (for batching)
branch: context.eventName === 'pull_request' ? undefined : context.ref,
run_name: context.eventName === 'pull_request' ? context.payload.pull_request.title : context.payload.head_commit.message.split('\n')[0],
branch: context.eventName === 'pull_request_target' ? undefined : context.ref,
run_name: context.eventName === 'pull_request_target' ? context.payload.pull_request.title : context.payload.head_commit.message.split('\n')[0],
},
};
await github.rest.repos.createDispatchEvent({
Expand Down

0 comments on commit 0bafae6

Please sign in to comment.