Skip to content

Commit cacb018

Browse files
committed
feat: remove event type restriction
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.
1 parent a5011fa commit cacb018

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

src/backport.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,6 @@ export class Backport {
105105

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

108-
if (
109-
this.config.source_pr_number !== undefined &&
110-
this.github.getEventName() !== "workflow_dispatch"
111-
) {
112-
throw new Error(
113-
"source_pr_number can only be specified for workflow_dispatch events!",
114-
);
115-
}
116-
117108
const pull_number =
118109
this.config.source_pr_number === undefined
119110
? this.github.getPullNumber()

0 commit comments

Comments
 (0)