File tree Expand file tree Collapse file tree 4 files changed +2077
-1539
lines changed
Expand file tree Collapse file tree 4 files changed +2077
-1539
lines changed Original file line number Diff line number Diff line change 1010
1111## Version History
1212
13+ ### v9.8.0
14+
15+ - :tada : Update CFN-Config to latest version which supports regions created after 2022
16+
1317### v9.7.0
1418
1519- :tada : Add ` ora ` for watching for external artifacts
Original file line number Diff line number Diff line change 11import fs from 'fs' ;
2+ import ora from 'ora' ;
23import Git from './git.js' ;
34
45/**
@@ -35,9 +36,15 @@ export default class GH {
3536 * @param {boolean } success Was the deployment successful
3637 */
3738 async deployment ( stack , success ) {
38- if ( success === undefined ) success = 'pending' ;
39- else if ( success ) success = 'success' ;
40- else if ( ! success ) success = 'failed' ;
39+ if ( success === undefined ) {
40+ success = 'pending' ;
41+ } else if ( success ) {
42+ success = 'success' ;
43+ } else if ( ! success ) {
44+ success = 'failed' ;
45+ }
46+
47+ await this . status ( ) ;
4148
4249 if ( this . context . deployment ) {
4350 return await this . deployment_update ( stack , success ) ;
@@ -54,6 +61,24 @@ export default class GH {
5461 }
5562 }
5663
64+ async status ( ) {
65+ const res = await fetch ( this . url + `/repos/${ this . context . owner } /${ this . repo } /commits/${ this . context . sha } /status` , {
66+ method : 'GET' ,
67+ headers : this . headers ,
68+ } ) ;
69+
70+ const body = await res . json ( ) ;
71+
72+ if ( ! res . ok ) {
73+ console . error ( body ) ;
74+ throw new Error ( 'Could not list status checks' ) ;
75+ } else {
76+ if ( body . state === 'pending' ) {
77+
78+ }
79+ }
80+ }
81+
5782 async deployment_list ( stack ) {
5883 const url = new URL ( this . url + `/repos/${ this . context . owner } /${ this . repo } /deployments` ) ;
5984 url . searchParams . append ( 'sha' , this . context . sha ) ;
You can’t perform that action at this time.
0 commit comments