File tree Expand file tree Collapse file tree 7 files changed +22
-14
lines changed
Expand file tree Collapse file tree 7 files changed +22
-14
lines changed 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 2727 with :
2828 name : " codeball:approved"
2929 color : " 86efac" # green
30+ codeball-job-id : ${{ steps.codeball_baller.outputs.codeball-job-id }}
31+
3032
3133 # If Codeball did not approve the contribution, add a "codeball:needs-review" label
3234 - name : Label Approved
3537 with :
3638 name : " codeball:needs-review"
3739 color : " bfdbfe" # blue
40+ codeball-job-id : ${{ steps.codeball_baller.outputs.codeball-job-id }}
3841
3942 # If Codeball approved the contribution, approve the PR
4043 - name : Approve PR
4144 uses : sturdy-dev/codeball-action/approver@v2
4245 if : ${{ steps.codeball_status.outputs.approved == 'true' }}
46+ with :
47+ codeball-job-id : ${{ steps.codeball_baller.outputs.codeball-job-id }}
Original file line number Diff line number Diff line change 11![ github_bg] ( https://user-images.githubusercontent.com/47952/170700847-bb0cac65-f269-4758-955a-632c48f47290.png )
22
3+ Test :-)
4+
35# CODEBALL &mdash ; AI CODE REVIEW 🔮
46
57Codeball is a code review AI which approves Pull Requests that a human would have approved. Spend less time waiting, save time and money.
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