@@ -134,17 +134,6 @@ module.exports = async (context, req) => {
134134 await thumbsUp ( )
135135
136136 const { queueCheckRun } = require ( './check-runs' )
137- await queueCheckRun (
138- context ,
139- await getToken ( ) ,
140- 'git-for-windows' ,
141- repo ,
142- ref ,
143- 'deploy' ,
144- `Build and deploy ${ package_name } ` ,
145- `Deploying ${ package_name } `
146- )
147-
148137 const triggerWorkflowDispatch = require ( './trigger-workflow-dispatch' )
149138 const triggerBuild = async ( architecture ) =>
150139 await triggerWorkflowDispatch (
@@ -173,15 +162,75 @@ module.exports = async (context, req) => {
173162 text
174163 )
175164 if ( ! isMSYSPackage ( package_name ) ) {
165+ const id = await queueCheckRun (
166+ context ,
167+ await getToken ( ) ,
168+ 'git-for-windows' ,
169+ repo ,
170+ ref ,
171+ 'deploy' ,
172+ `Build and deploy ${ package_name } ` ,
173+ `Deploying ${ package_name } `
174+ )
175+
176176 const answer = await triggerBuild ( )
177177 const answer2 = await appendToComment ( `The workflow run [was started](${ answer . html_url } )` )
178+ await updateCheckRun (
179+ context ,
180+ await getToken ( ) ,
181+ 'git-for-windows' ,
182+ repo ,
183+ id , {
184+ details_url : answer . html_url
185+ }
186+ )
178187 return `I edited the comment: ${ answer2 . html_url } `
179188 }
189+
190+ const x86_64Id = await queueCheckRun (
191+ context ,
192+ await getToken ( ) ,
193+ 'git-for-windows' ,
194+ repo ,
195+ ref ,
196+ 'deploy_x86_64' ,
197+ `Build and deploy ${ package_name } ` ,
198+ `Deploying ${ package_name } `
199+ )
200+ const i686Id = await queueCheckRun (
201+ context ,
202+ await getToken ( ) ,
203+ 'git-for-windows' ,
204+ repo ,
205+ ref ,
206+ 'deploy_i686' ,
207+ `Build and deploy ${ package_name } ` ,
208+ `Deploying ${ package_name } `
209+ )
210+
180211 const x86_64Answer = await triggerBuild ( 'x86_64' )
181212 const i686Answer = await triggerBuild ( 'i686' )
182213 const answer2 = await appendToComment (
183214 `The [x86_64](${ x86_64Answer . html_url } ) and the [i686](${ i686Answer . html_url } ) workflow runs were started.`
184215 )
216+ await updateCheckRun (
217+ context ,
218+ await getToken ( ) ,
219+ 'git-for-windows' ,
220+ repo ,
221+ x86_64Id , {
222+ details_url : x86_64Answer . html_url
223+ }
224+ )
225+ await updateCheckRun (
226+ context ,
227+ await getToken ( ) ,
228+ 'git-for-windows' ,
229+ repo ,
230+ i686Id , {
231+ details_url : i686Answer . html_url
232+ }
233+ )
185234 return `I edited the comment: ${ answer2 . html_url } `
186235 }
187236
@@ -262,4 +311,4 @@ module.exports = async (context, req) => {
262311 }
263312
264313 return `Ignoring slash command ${ command } in ${ commentURL } `
265- }
314+ }
0 commit comments