File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed
Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ inputs:
1515 required : true
1616 project-id :
1717 description : The ID of the project board to sync PRs towards
18- required : true
18+ required : false
1919 excluded-users :
2020 description : A comma separated list of usernames of users that should not be assigned PRs
2121 required : false
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ async function main() {
2020 `PR sync #${ issueNumber } ${ eventName } /${ action } actor=${ actor } author=${ author } ` ,
2121 ) ;
2222
23- const projectId = core . getInput ( 'project-id' , { required : true } ) ;
23+ const projectId = core . getInput ( 'project-id' , { required : false } ) ;
2424 const excludedUsers = core . getInput ( 'excluded-users' , { required : false } ) ;
2525 const owningTeams = core . getInput ( 'owning-teams' , { required : false } ) ;
2626 const token = core . getInput ( 'github-token' , { required : true } ) ;
Original file line number Diff line number Diff line change @@ -30,6 +30,11 @@ export async function syncProjectBoard(
3030 options : Options ,
3131 log = core . info ,
3232) {
33+ if ( ! options . projectId ) {
34+ log ( 'No project ID provided, skipping project board sync' ) ;
35+ return ;
36+ }
37+
3338 if ( options . eventName === 'pull_request_target' ) {
3439 if ( [ 'opened' , 'reopened' ] . includes ( options . action ! ) ) {
3540 await addToBoard ( client , options , log ) ;
You can’t perform that action at this time.
0 commit comments