File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import * as core from '@actions/core' ;
2- import { getAndValidateInputs } from './input' ;
2+ import { getIssues , processIssues } from './github' ;
3+ import { allInterestedLabels , getAndValidateInputs } from './input' ;
34
45/*
56Step 1: Grab the action inputs
@@ -13,6 +14,8 @@ Step 4: Apply labels according to the mapping
1314async function run ( ) {
1415 try {
1516 const args = getAndValidateInputs ( ) ;
17+ const issues = await getIssues ( allInterestedLabels ( args ) , args . token ) ;
18+ await processIssues ( issues , args ) ;
1619 } catch ( e ) {
1720 if ( e instanceof Error ) {
1821 core . setFailed ( e . message ) ;
Original file line number Diff line number Diff line change @@ -42,3 +42,12 @@ export function getAndValidateInputs(): args {
4242 prUpdateRemoveLabels,
4343 } ;
4444}
45+
46+ export function allInterestedLabels ( args : args ) {
47+ return [
48+ ...( args . expirationLabelMap || [ ] ) ,
49+ ...( args . updateRemoveLabels || [ ] ) ,
50+ ...( args . prExpirationLabelMap || [ ] ) ,
51+ ...( args . prUpdateRemoveLabels || [ ] ) ,
52+ ] ;
53+ }
You can’t perform that action at this time.
0 commit comments