File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -20,15 +20,13 @@ export function updateGithubStatus(event: firebaseFunctions.Event<any>) {
20
20
}
21
21
let result = event . data . val ( ) == true ;
22
22
let prNumber = event . params . prNumber ;
23
- return event . data . ref . parent . child ( 'sha' ) . once ( 'value' ) . then ( ( sha : firebaseAdmin . database . DataSnapshot ) => {
24
- return setGithubStatus ( sha . val ( ) ,
25
- {
26
- result : result ,
27
- name : toolName ,
28
- description : `${ toolName } ${ result ? 'passed' : 'failed' } ` ,
29
- url : `http://${ authDomain } /${ prNumber } `
30
- } ,
31
- repoSlug ,
32
- token ) ;
33
- } ) ;
23
+ return setGithubStatus ( event . params . sha ,
24
+ {
25
+ result : result ,
26
+ name : toolName ,
27
+ description : `${ toolName } ${ result ? 'passed' : 'failed' } ` ,
28
+ url : `http://${ authDomain } /${ prNumber } `
29
+ } ,
30
+ repoSlug ,
31
+ token ) ;
34
32
}
Original file line number Diff line number Diff line change @@ -116,5 +116,5 @@ exports.approveImages = firebaseFunctions.database.ref(approveImagesPath).onWrit
116
116
* otherwise update github status to `failure`.
117
117
* The Github Status Token is set in config.secret.github
118
118
*/
119
- const githubStatusPath = `${ trustedReportPath } /result` ;
119
+ const githubStatusPath = `${ trustedReportPath } /result/{sha} ` ;
120
120
exports . githubStatus = firebaseFunctions . database . ref ( githubStatusPath ) . onWrite ( updateGithubStatus ) ;
You can’t perform that action at this time.
0 commit comments