Skip to content

Commit

Permalink
feat: remove event type restriction
Browse files Browse the repository at this point in the history
As far as I can see, there is no reason to limit the source_pr_number
input only to usage with workflow_dispatch events. Other workflows may
also benefit from this input if they want to specify the pull request.
  • Loading branch information
korthout committed Aug 21, 2024
1 parent a5011fa commit cacb018
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/backport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,6 @@ export class Backport {

if (repo === undefined) throw new Error("No repository defined!");

if (
this.config.source_pr_number !== undefined &&
this.github.getEventName() !== "workflow_dispatch"
) {
throw new Error(
"source_pr_number can only be specified for workflow_dispatch events!",
);
}

const pull_number =
this.config.source_pr_number === undefined
? this.github.getPullNumber()
Expand Down

0 comments on commit cacb018

Please sign in to comment.