File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4747 "@typescript-eslint/type-annotation-spacing" : " error" ,
4848 "@typescript-eslint/unbound-method" : " error" ,
4949 "no-console" : " off" ,
50- "import/no-commonjs" : " off"
50+ "import/no-commonjs" : " off" ,
51+ "github/no-then" : " off"
5152 },
5253 "env" : {
5354 "node" : true ,
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ async function run(): Promise<void> {
3636}
3737
3838run ( )
39- . then ( ( ) => track ( { jobID, actionName : 'approver' } ) )
39+ . then ( async ( ) => await track ( { jobID, actionName : 'approver' } ) )
4040 . catch ( error => {
4141 if ( error instanceof Error ) {
4242 track ( { jobID, actionName : 'approver' , error : error . message } )
Original file line number Diff line number Diff line change @@ -22,12 +22,12 @@ async function run(): Promise<{jobId: string}> {
2222}
2323
2424run ( )
25- . then ( ( { jobId} ) => {
26- track ( { jobID : jobId , actionName : 'baller' } )
25+ . then ( async ( { jobId} ) => {
26+ await track ( { jobID : jobId , actionName : 'baller' } )
2727 core . setOutput ( 'codeball-job-id' , jobId )
2828 } )
29- . catch ( error => {
30- track ( { actionName : 'baller' , error : error . message } )
29+ . catch ( async error => {
30+ await track ( { actionName : 'baller' , error : error . message } )
3131 if ( error instanceof Error ) {
3232 core . setFailed ( error . message )
3333 }
Original file line number Diff line number Diff line change @@ -73,10 +73,10 @@ const run = async (): Promise<void> => {
7373}
7474
7575run ( )
76- . then ( ( ) => track ( { jobID, actionName : 'labeler' } ) )
77- . catch ( error => {
76+ . then ( async ( ) => await track ( { jobID, actionName : 'labeler' } ) )
77+ . catch ( async error => {
7878 if ( error instanceof Error ) {
79- track ( { jobID, actionName : 'labeler' , error : error . message } )
79+ await track ( { jobID, actionName : 'labeler' , error : error . message } )
8080 if ( error . message === 'Resource not accessible by integration' ) {
8181 core . setFailed (
8282 'Codeball Labeler failed to access GitHub. Check the "GITHUB_TOKEN Permissions" of this job and make sure that the job has WRITE permissions to Pull Requests.'
Original file line number Diff line number Diff line change @@ -28,13 +28,13 @@ const run = async (jobID: string): Promise<boolean> => {
2828const jobID = required ( 'codeball-job-id' )
2929
3030run ( jobID )
31- . then ( isApproved => {
32- track ( { jobID, actionName : 'status' } )
33- core . setOutput ( 'approved' , isApproved )
31+ . then ( async approved => {
32+ await track ( { jobID, actionName : 'status' } )
33+ core . setOutput ( 'approved' , approved )
3434 } )
35- . catch ( error => {
35+ . catch ( async error => {
3636 if ( error instanceof Error ) {
37- track ( { jobID, actionName : 'status' , error : error . message } )
37+ await track ( { jobID, actionName : 'status' , error : error . message } )
3838 core . setFailed ( error . message )
3939 }
4040 } )
You can’t perform that action at this time.
0 commit comments