Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

15 changes: 10 additions & 5 deletions src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,18 @@ async function findCommitRange(ctx: ActionContext, eventName: string): Promise<v
}
case 'workflow_dispatch': {
type DispatchPayload = WorkflowDispatchEvent & {
inputs: { base: string; head: string }
inputs: { base: string; head: string } | null
}
const dispatchPayload = github.context.payload as DispatchPayload
ctx.base = dispatchPayload.inputs.base
ctx.head = dispatchPayload.inputs.head
core.info(`Event: workflow dispatch ${dispatchPayload.workflow}`)
core.info(`Commit range from workflow inputs: ${ctx.base}...${ctx.head}`)
if (dispatchPayload.inputs?.base && dispatchPayload.inputs?.head) {
ctx.base = dispatchPayload.inputs.base
ctx.head = dispatchPayload.inputs.head
core.info(`Event: workflow dispatch ${dispatchPayload.workflow}`)
core.info(`Commit range from workflow inputs: ${ctx.base}...${ctx.head}`)
} else {
core.info(`Event: workflow dispatch ${dispatchPayload.workflow}`)
markAllDirty(ctx, 'workflow_dispatch without base/head inputs')
}
break
}
default:
Expand Down
Loading