Unverified Commit 5ccc1cc2 authored by Sebastian "Sebbie" Silbermann's avatar Sebastian "Sebbie" Silbermann Committed by GitHub

[ci] Create test summary comment if job immediately passes (#93236)

parent 8a390fbf
......@@ -130,13 +130,7 @@ class GitHubClient {
)
}
async upsertIssueComment(
issueNumber,
marker,
body,
fallbackHeadings = [],
{ createIfMissing = true } = {}
) {
async upsertIssueComment(issueNumber, marker, body, fallbackHeadings = []) {
body = fitComment(body)
const comments = await this.listIssueComments(issueNumber)
......@@ -152,10 +146,6 @@ class GitHubClient {
})
if (this.dryRun) {
if (!existing && !createIfMissing) {
console.log(`[dry-run] No existing comment found for #${issueNumber}`)
return
}
console.log(
`[dry-run] ${existing ? 'Would update' : 'Would create'} comment for #${issueNumber}`
)
......@@ -163,11 +153,6 @@ class GitHubClient {
return
}
if (!existing && !createIfMissing) {
console.log(`No existing comment found for #${issueNumber}, skipping`)
return
}
if (existing) {
try {
await this.request(
......@@ -479,15 +464,10 @@ async function handleBuildAndTestWorkflow({
'',
].join('\n')
await github.upsertIssueComment(
pr.number,
TEST_COMMENT_MARKER,
body,
['## Failing test suites', '## Failing CI jobs'],
{
createIfMissing: false,
}
)
await github.upsertIssueComment(pr.number, TEST_COMMENT_MARKER, body, [
'## Failing test suites',
'## Failing CI jobs',
])
return
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment