File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ see if they are a member of the X organisations and Y teams. If they are not we
66label the issue with the label `community`. */
77export async function run ( ) : Promise < void > {
88 try {
9+ core . info ( 'Starting community labeller' )
910 // Retrieve our inputs
1011 const labelName = core . getInput ( 'label_name' , { required : true } )
1112 const labelColor = core . getInput ( 'label_color' , { required : true } )
@@ -21,12 +22,15 @@ export async function run(): Promise<void> {
2122 }
2223
2324 if (
24- ! ( await client . checkOrgMembership ( orgs ) ) &&
25- ! client . isExcludedLogin ( loginsToIgnore )
25+ ( await client . checkOrgMembership ( orgs ) ) ||
26+ client . isExcludedLogin ( loginsToIgnore )
2627 ) {
27- await client . createLabel ( labelName , labelColor )
28- await client . addLabel ( labelName )
28+ core . info ( "Looks like this issue doesn't need labeling! 👍" )
29+ return
2930 }
31+
32+ await client . createLabel ( labelName , labelColor )
33+ await client . addLabel ( labelName )
3034 } catch ( error ) {
3135 if ( error instanceof Error ) core . setFailed ( error . message )
3236 }
You can’t perform that action at this time.
0 commit comments