Skip to content

Commit

Permalink
Update check-for-integration-result.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthkp authored Nov 6, 2024
1 parent 165a8e0 commit 7f99638
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/check-for-integration-result.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,21 @@ jobs:
const integrationComments = result.data.filter(c => c.user.login == 'primer-integration[bot]' && c.body.includes('<!-- test-result'))
if (integrationComments.length === 0) {
console.log('Integration comment with test-result not found')
return
return // nothing to do here
}
const latestComment = integrationComments.pop()
console.log(latestComment.body)
const pass = latestComment.body.includes('🟢')
console.log({pass})
const existingLabels = await github.rest.issues.listLabelsOnIssue({...issue})
console.log(existingLabels)
const integrationLabels = existingLabels.filter(label => label.name.startsWith('integration-tests:'))
console.log(integrationLabels)
// reset integration-tests labels before applying the latest label again
// todo: only try to remove these when they are present
try {
await github.rest.issues.removeLabel({...issue, name: 'integration-tests: recommended'})
} catch (error) {
Expand Down

0 comments on commit 7f99638

Please sign in to comment.