From 81beaeff2f76d56bbd2b27aebfe44745dadc7e76 Mon Sep 17 00:00:00 2001 From: Scott Beddall Date: Tue, 5 Aug 2025 22:16:32 +0000 Subject: [PATCH 1/8] cutover PR --- .../src/summarize-checks/summarize-checks.js | 52 ++++++++++--------- .github/workflows/summarize-checks.yaml | 10 ++-- .github/workflows/summarize-impact.yaml | 4 +- .../swagger-modelvalidation-code.yaml | 4 +- .../swagger-modelvalidation-status.yaml | 8 +-- .../swagger-semanticvalidation-code.yaml | 4 +- .../swagger-semanticvalidation-status.yaml | 8 +-- .../fixtures/RawGraphQLResponse.json | 4 +- .../summarize-checks/summarize-checks.test.js | 22 ++++---- .../watch-breakingchange-crossversion.yaml | 2 +- .github/workflows/watch-breakingchange.yaml | 2 +- .github/workflows/watch-modelvalidation.yaml | 2 +- .../workflows/watch-semanticvalidation.yaml | 2 +- 13 files changed, 63 insertions(+), 61 deletions(-) diff --git a/.github/workflows/src/summarize-checks/summarize-checks.js b/.github/workflows/src/summarize-checks/summarize-checks.js index 7678f5d5b011..670924b3fb56 100644 --- a/.github/workflows/src/summarize-checks/summarize-checks.js +++ b/.github/workflows/src/summarize-checks/summarize-checks.js @@ -19,11 +19,11 @@ */ // #region imports/constants -import { extractInputs } from "../context.js"; -// import { commentOrUpdate } from "../comment.js"; import { execFile } from "../../../shared/src/exec.js"; import { CheckConclusion, PER_PAGE_MAX } from "../../../shared/src/github.js"; import { intersect } from "../../../shared/src/set.js"; +import { commentOrUpdate } from "../comment.js"; +import { extractInputs } from "../context.js"; import { brChRevApproval, getViolatedRequiredLabelsRules, @@ -140,7 +140,8 @@ const FYI_CHECK_NAMES = [ "Swagger BreakingChange", "Swagger PrettierCheck", ]; -const AUTOMATED_CHECK_NAME = "[TEST-IGNORE] Automated merging requirements met"; +const AUTOMATED_CHECK_NAME = "Automated merging requirements met"; +const IMPACT_CHECK_NAME = "Summarize PR Impact"; const NEXT_STEPS_COMMENT_ID = "NextStepsToMerge"; /** @type {CheckMetadata[]} */ @@ -397,24 +398,24 @@ export async function summarizeChecksImpl( for (const label of labelContext.toRemove) { core.info(`Removing label: ${label} from ${owner}/${repo}#${issue_number}.`); - // await github.rest.issues.removeLabel({ - // owner: owner, - // repo: repo, - // issue_number: issue_number, - // name: label, - // }); + await github.rest.issues.removeLabel({ + owner: owner, + repo: repo, + issue_number: issue_number, + name: label, + }); } if (labelContext.toAdd.size > 0) { core.info( `Adding labels: ${Array.from(labelContext.toAdd).join(", ")} to ${owner}/${repo}#${issue_number}.`, ); - // await github.rest.issues.addLabels({ - // owner: owner, - // repo: repo, - // issue_number: issue_number, - // labels: Array.from(labelContext.toAdd), - // }); + await github.rest.issues.addLabels({ + owner: owner, + repo: repo, + issue_number: issue_number, + labels: Array.from(labelContext.toAdd), + }); } // adjust labelNames based on labelsToAdd/labelsToRemove @@ -441,20 +442,21 @@ export async function summarizeChecksImpl( `Updating comment '${NEXT_STEPS_COMMENT_ID}' on ${owner}/${repo}#${issue_number} with body: ${commentBody}`, ); // this will remain commented until we're comfortable with the change. - // await commentOrUpdate( - // { github, context, core }, - // owner, - // repo, - // issue_number, - // commentName, - // commentBody - // ) + await commentOrUpdate( + github, + core, + owner, + repo, + issue_number, + commentBody, + NEXT_STEPS_COMMENT_ID, + ); // finally, update the "Automated merging requirements met" commit status await updateCommitStatus(github, core, owner, repo, head_sha, automatedChecksMet); core.info( - `Summarize checks has identified that status of "[TEST-IGNORE] Automated merging requirements met" commit status should be updated to: ${JSON.stringify(automatedChecksMet)}.`, + `Summarize checks has identified that status of "${AUTOMATED_CHECK_NAME}" commit status should be updated to: ${JSON.stringify(automatedChecksMet)}.`, ); } @@ -831,7 +833,7 @@ export function extractRunsFromGraphQLResponse(response) { if (checkSuiteNode.checkRuns?.nodes) { checkSuiteNode.checkRuns.nodes.forEach((checkRunNode) => { if ( - checkRunNode.name === "[TEST-IGNORE] Summarize PR Impact" && + checkRunNode.name === IMPACT_CHECK_NAME && checkRunNode.status?.toLowerCase() === "completed" && checkRunNode.conclusion?.toLowerCase() === "success" ) { diff --git a/.github/workflows/summarize-checks.yaml b/.github/workflows/summarize-checks.yaml index a1d066b1df0d..8f644caa3813 100644 --- a/.github/workflows/summarize-checks.yaml +++ b/.github/workflows/summarize-checks.yaml @@ -1,11 +1,11 @@ -name: "[TEST-IGNORE] Summarize Checks" +name: "Summarize Checks" on: workflow_run: workflows: - - "\\[TEST-IGNORE\\] Swagger SemanticValidation - Set Status" - - "\\[TEST-IGNORE\\] Swagger ModelValidation - Set Status" - - "\\[TEST-IGNORE\\] Summarize PR Impact" + - "Swagger SemanticValidation - Set Status" + - "Swagger ModelValidation - Set Status" + - "Summarize PR Impact" - "Swagger Avocado - Set Status" - "Swagger LintDiff - Set Status" - "SDK Validation Status" @@ -30,7 +30,7 @@ permissions: jobs: run-summarize-checks: if: ${{ github.event_name == 'pull_request_target' || github.event.workflow_run.conclusion != 'skipped' }} - name: "[TEST-IGNORE] Summarize Checks" + name: "Summarize Checks" runs-on: ubuntu-24.04 steps: diff --git a/.github/workflows/summarize-impact.yaml b/.github/workflows/summarize-impact.yaml index df9045055c50..4e82b60c78ee 100644 --- a/.github/workflows/summarize-impact.yaml +++ b/.github/workflows/summarize-impact.yaml @@ -1,4 +1,4 @@ -name: "[TEST-IGNORE] Summarize PR Impact" +name: "Summarize PR Impact" on: pull_request @@ -8,7 +8,7 @@ permissions: jobs: impact: - name: "[TEST-IGNORE] Summarize PR Impact" + name: "Summarize PR Impact" runs-on: ubuntu-24.04 steps: diff --git a/.github/workflows/swagger-modelvalidation-code.yaml b/.github/workflows/swagger-modelvalidation-code.yaml index 9ab3b15471ee..8e5bba0c8b09 100644 --- a/.github/workflows/swagger-modelvalidation-code.yaml +++ b/.github/workflows/swagger-modelvalidation-code.yaml @@ -1,4 +1,4 @@ -name: "[TEST-IGNORE] Swagger ModelValidation - Analyze Code" +name: "Swagger ModelValidation - Analyze Code" on: pull_request @@ -7,7 +7,7 @@ permissions: jobs: oav: - name: "[TEST-IGNORE] Swagger ModelValidation - Analyze Code" + name: "Swagger ModelValidation - Analyze Code" runs-on: ubuntu-24.04 steps: diff --git a/.github/workflows/swagger-modelvalidation-status.yaml b/.github/workflows/swagger-modelvalidation-status.yaml index 7310b1c94f6e..3f76adb23fd1 100644 --- a/.github/workflows/swagger-modelvalidation-status.yaml +++ b/.github/workflows/swagger-modelvalidation-status.yaml @@ -1,4 +1,4 @@ -name: "[TEST-IGNORE] Swagger ModelValidation - Set Status" +name: "Swagger ModelValidation - Set Status" on: # Must run on pull_request_target instead of pull_request, since the latter cannot trigger on @@ -15,7 +15,7 @@ on: - labeled - unlabeled workflow_run: - workflows: ["\\[TEST-IGNORE\\] Swagger ModelValidation - Analyze Code"] + workflows: ["Swagger ModelValidation - Analyze Code"] types: [completed] permissions: @@ -30,6 +30,6 @@ jobs: name: Set ModelValidation Status uses: ./.github/workflows/_reusable-set-check-status.yaml with: - monitored_workflow_name: "[TEST-IGNORE] Swagger ModelValidation - Analyze Code" - required_check_name: "[TEST-IGNORE] Swagger ModelValidation" + monitored_workflow_name: "Swagger ModelValidation - Analyze Code" + required_check_name: "Swagger ModelValidation" overriding_label: "Approved-ModelValidation" diff --git a/.github/workflows/swagger-semanticvalidation-code.yaml b/.github/workflows/swagger-semanticvalidation-code.yaml index ffe0464d4ff2..540c54de140b 100644 --- a/.github/workflows/swagger-semanticvalidation-code.yaml +++ b/.github/workflows/swagger-semanticvalidation-code.yaml @@ -1,4 +1,4 @@ -name: "[TEST-IGNORE] Swagger SemanticValidation - Analyze Code" +name: "Swagger SemanticValidation - Analyze Code" on: pull_request @@ -7,7 +7,7 @@ permissions: jobs: oav: - name: "[TEST-IGNORE] Swagger SemanticValidation - Analyze Code" + name: "Swagger SemanticValidation - Analyze Code" runs-on: ubuntu-24.04 steps: diff --git a/.github/workflows/swagger-semanticvalidation-status.yaml b/.github/workflows/swagger-semanticvalidation-status.yaml index 1166cb44ba20..62f432524f17 100644 --- a/.github/workflows/swagger-semanticvalidation-status.yaml +++ b/.github/workflows/swagger-semanticvalidation-status.yaml @@ -1,4 +1,4 @@ -name: "[TEST-IGNORE] Swagger SemanticValidation - Set Status" +name: "Swagger SemanticValidation - Set Status" on: # Must run on pull_request_target instead of pull_request, since the latter cannot trigger on @@ -15,7 +15,7 @@ on: - labeled - unlabeled workflow_run: - workflows: ["\\[TEST-IGNORE\\] Swagger SemanticValidation - Analyze Code"] + workflows: ["Swagger SemanticValidation - Analyze Code"] types: [completed] permissions: @@ -30,6 +30,6 @@ jobs: name: Set SemanticValidation Status uses: ./.github/workflows/_reusable-set-check-status.yaml with: - monitored_workflow_name: "[TEST-IGNORE] Swagger SemanticValidation - Analyze Code" - required_check_name: "[TEST-IGNORE] Swagger SemanticValidation" + monitored_workflow_name: "Swagger SemanticValidation - Analyze Code" + required_check_name: "Swagger SemanticValidation" overriding_label: "Approved-SemanticValidation" diff --git a/.github/workflows/test/summarize-checks/fixtures/RawGraphQLResponse.json b/.github/workflows/test/summarize-checks/fixtures/RawGraphQLResponse.json index 002bee336055..16d0e10c03c5 100644 --- a/.github/workflows/test/summarize-checks/fixtures/RawGraphQLResponse.json +++ b/.github/workflows/test/summarize-checks/fixtures/RawGraphQLResponse.json @@ -339,13 +339,13 @@ "id": "WFR_kwLOAlSEjc8AAAAD3GhuLA", "databaseId": 16582733356, "workflow": { - "name": "[TEST-IGNORE] Summarize PR Impact" + "name": "Summarize PR Impact" } }, "checkRuns": { "nodes": [ { - "name": "[TEST-IGNORE] Summarize PR Impact", + "name": "Summarize PR Impact", "status": "COMPLETED", "conclusion": "SUCCESS", "isRequired": false diff --git a/.github/workflows/test/summarize-checks/summarize-checks.test.js b/.github/workflows/test/summarize-checks/summarize-checks.test.js index 08a46096cb8a..32be62d3cea0 100644 --- a/.github/workflows/test/summarize-checks/summarize-checks.test.js +++ b/.github/workflows/test/summarize-checks/summarize-checks.test.js @@ -146,7 +146,7 @@ describe("Summarize Checks Unit Tests", () => { const expectedOutput = [ expectedComment, { - name: "[TEST-IGNORE] Automated merging requirements met", + name: "Automated merging requirements met", result: "FAILURE", summary: "❌ This PR cannot be merged because some requirements are not met. See the details.", @@ -256,7 +256,7 @@ describe("Summarize Checks Unit Tests", () => { const expectedOutput = [ '

Next Steps to Merge

✅ All automated merging requirements have been met! To get your PR merged, see aka.ms/azsdk/specreview/merge.', { - name: "[TEST-IGNORE] Automated merging requirements met", + name: "Automated merging requirements met", result: "SUCCESS", summary: `✅ All automated merging requirements have been met.
To merge this PR, refer to aka.ms/azsdk/specreview/merge.
For help, consult comments on this PR and see [aka.ms/azsdk/pr-getting-help](https://aka.ms/azsdk/pr-getting-help).`, }, @@ -283,7 +283,7 @@ describe("Summarize Checks Unit Tests", () => { const expectedOutput = [ '

Next Steps to Merge

✅ All automated merging requirements have been met! To get your PR merged, see aka.ms/azsdk/specreview/merge.', { - name: "[TEST-IGNORE] Automated merging requirements met", + name: "Automated merging requirements met", result: "SUCCESS", summary: `✅ All automated merging requirements have been met.
To merge this PR, refer to aka.ms/azsdk/specreview/merge.
For help, consult comments on this PR and see [aka.ms/azsdk/pr-getting-help](https://aka.ms/azsdk/pr-getting-help).`, }, @@ -391,7 +391,7 @@ describe("Summarize Checks Unit Tests", () => { const expectedOutput = [ "

Next Steps to Merge

⌛ Please wait. Next steps to merge this PR are being evaluated by automation. ⌛", { - name: "[TEST-IGNORE] Automated merging requirements met", + name: "Automated merging requirements met", result: "pending", summary: "The requirements for merging this PR are still being evaluated. Please wait.", }, @@ -499,7 +499,7 @@ describe("Summarize Checks Unit Tests", () => { const expectedOutput = [ "

Next Steps to Merge

⌛ Please wait. Next steps to merge this PR are being evaluated by automation. ⌛", { - name: "[TEST-IGNORE] Automated merging requirements met", + name: "Automated merging requirements met", result: "pending", summary: "The requirements for merging this PR are still being evaluated. Please wait.", }, @@ -564,7 +564,7 @@ describe("Summarize Checks Unit Tests", () => { const expectedOutput = [ '

Next Steps to Merge

✅ All automated merging requirements have been met! To get your PR merged, see aka.ms/azsdk/specreview/merge.', { - name: "[TEST-IGNORE] Automated merging requirements met", + name: "Automated merging requirements met", result: "SUCCESS", summary: `✅ All automated merging requirements have been met.
To merge this PR, refer to aka.ms/azsdk/specreview/merge.
For help, consult comments on this PR and see [aka.ms/azsdk/pr-getting-help](https://aka.ms/azsdk/pr-getting-help).`, }, @@ -635,7 +635,7 @@ describe("Summarize Checks Unit Tests", () => { const expectedOutput = [ '

Next Steps to Merge

✅ All automated merging requirements have been met! To get your PR merged, see aka.ms/azsdk/specreview/merge.', { - name: "[TEST-IGNORE] Automated merging requirements met", + name: "Automated merging requirements met", result: "SUCCESS", summary: `✅ All automated merging requirements have been met.
To merge this PR, refer to aka.ms/azsdk/specreview/merge.
For help, consult comments on this PR and see [aka.ms/azsdk/pr-getting-help](https://aka.ms/azsdk/pr-getting-help).`, }, @@ -691,7 +691,7 @@ describe("Summarize Checks Unit Tests", () => { const expectedOutput = [ "

Next Steps to Merge

⌛ Please wait. Next steps to merge this PR are being evaluated by automation. ⌛", { - name: "[TEST-IGNORE] Automated merging requirements met", + name: "Automated merging requirements met", result: "pending", summary: "The requirements for merging this PR are still being evaluated. Please wait.", }, @@ -739,7 +739,7 @@ describe("Summarize Checks Unit Tests", () => { const expectedOutput = [ "

Next Steps to Merge

⌛ Please wait. Next steps to merge this PR are being evaluated by automation. ⌛", { - name: "[TEST-IGNORE] Automated merging requirements met", + name: "Automated merging requirements met", result: "pending", summary: "The requirements for merging this PR are still being evaluated. Please wait.", }, @@ -784,7 +784,7 @@ describe("Summarize Checks Unit Tests", () => { const targetBranch = "main"; const labelNames = []; const expectedCheckOutput = { - name: "[TEST-IGNORE] Automated merging requirements met", + name: "Automated merging requirements met", result: "FAILURE", summary: "❌ This PR cannot be merged because some requirements are not met. See the details.", @@ -827,7 +827,7 @@ describe("Summarize Checks Unit Tests", () => { const labelNames = []; const fyiCheckRuns = []; const expectedCheckOutput = { - name: "[TEST-IGNORE] Automated merging requirements met", + name: "Automated merging requirements met", result: "FAILURE", summary: "❌ This PR cannot be merged because some requirements are not met. See the details.", diff --git a/.github/workflows/watch-breakingchange-crossversion.yaml b/.github/workflows/watch-breakingchange-crossversion.yaml index 41fa9752c676..b9cc51e051db 100644 --- a/.github/workflows/watch-breakingchange-crossversion.yaml +++ b/.github/workflows/watch-breakingchange-crossversion.yaml @@ -24,4 +24,4 @@ jobs: uses: ./.github/workflows/_reusable-verify-run-status.yaml with: check_run_name: "Breaking Change(Cross-Version)" - commit_status_name: "[TEST-IGNORE] Breaking Change(Cross-Version)" + commit_status_name: "Breaking Change(Cross-Version)" diff --git a/.github/workflows/watch-breakingchange.yaml b/.github/workflows/watch-breakingchange.yaml index 50978f8a475b..973cd767f28f 100644 --- a/.github/workflows/watch-breakingchange.yaml +++ b/.github/workflows/watch-breakingchange.yaml @@ -24,4 +24,4 @@ jobs: uses: ./.github/workflows/_reusable-verify-run-status.yaml with: check_run_name: "Swagger BreakingChange" - commit_status_name: "[TEST-IGNORE] Swagger BreakingChange" + commit_status_name: "Swagger BreakingChange" diff --git a/.github/workflows/watch-modelvalidation.yaml b/.github/workflows/watch-modelvalidation.yaml index ba3ff8165018..1332e682072e 100644 --- a/.github/workflows/watch-modelvalidation.yaml +++ b/.github/workflows/watch-modelvalidation.yaml @@ -24,4 +24,4 @@ jobs: uses: ./.github/workflows/_reusable-verify-run-status.yaml with: check_run_name: "Swagger ModelValidation" - workflow_name: "[TEST-IGNORE] Swagger ModelValidation" + workflow_name: "Swagger ModelValidation" diff --git a/.github/workflows/watch-semanticvalidation.yaml b/.github/workflows/watch-semanticvalidation.yaml index 757e55e367d6..d63d123f2341 100644 --- a/.github/workflows/watch-semanticvalidation.yaml +++ b/.github/workflows/watch-semanticvalidation.yaml @@ -24,4 +24,4 @@ jobs: uses: ./.github/workflows/_reusable-verify-run-status.yaml with: check_run_name: "Swagger SemanticValidation" - workflow_name: "[TEST-IGNORE] Swagger SemanticValidation" + workflow_name: "Swagger SemanticValidation" From e0779daae4c5524ebdb3800fbdb5f3f2538fc008 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Tue, 12 Aug 2025 08:05:06 +0000 Subject: [PATCH 2/8] fix another test --- .../workflows/test/summarize-checks/summarize-checks.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test/summarize-checks/summarize-checks.test.js b/.github/workflows/test/summarize-checks/summarize-checks.test.js index 4d78f989460b..6326bfbb26af 100644 --- a/.github/workflows/test/summarize-checks/summarize-checks.test.js +++ b/.github/workflows/test/summarize-checks/summarize-checks.test.js @@ -719,7 +719,7 @@ describe("Summarize Checks Unit Tests", () => { const expectedOutput = [ `

Next Steps to Merge

Important checks have failed. As of today they are not blocking this PR, but in near future they may.
Addressing the following failures is highly recommended:


Comment generated by summarize-checks workflow run.`, { - name: "[TEST-IGNORE] Automated merging requirements met", + name: "Automated merging requirements met", result: "pending", summary: "The requirements for merging this PR are still being evaluated. Please wait.", }, From 74034c260279caf6b66b9567731c4aeb8aedf139 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Tue, 12 Aug 2025 08:07:35 +0000 Subject: [PATCH 3/8] delete watcher workflows --- .github/workflows/watch-modelvalidation.yaml | 27 ------------------- .../workflows/watch-semanticvalidation.yaml | 27 ------------------- 2 files changed, 54 deletions(-) delete mode 100644 .github/workflows/watch-modelvalidation.yaml delete mode 100644 .github/workflows/watch-semanticvalidation.yaml diff --git a/.github/workflows/watch-modelvalidation.yaml b/.github/workflows/watch-modelvalidation.yaml deleted file mode 100644 index 1332e682072e..000000000000 --- a/.github/workflows/watch-modelvalidation.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# Use ~ to sort the workflow to the bottom of the list -name: "~Watch - Swagger ModelValidation" - -on: - # check_suite is preferred over check_run to avoid triggering on all check - # runs. In some cases, check_run must be used in testing environments. - check_suite: - types: completed - - workflow_run: - types: completed - workflows: - - "\\[TEST-IGNORE\\] Swagger ModelValidation" - -permissions: - actions: read - checks: read - contents: read - statuses: read - -jobs: - ModelValidationWatch: - name: Watch ModelValidation - uses: ./.github/workflows/_reusable-verify-run-status.yaml - with: - check_run_name: "Swagger ModelValidation" - workflow_name: "Swagger ModelValidation" diff --git a/.github/workflows/watch-semanticvalidation.yaml b/.github/workflows/watch-semanticvalidation.yaml deleted file mode 100644 index d63d123f2341..000000000000 --- a/.github/workflows/watch-semanticvalidation.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# Use ~ to sort the workflow to the bottom of the list -name: "~Watch - Swagger SemanticValidation" - -on: - # check_suite is preferred over check_run to avoid triggering on all check - # runs. In some cases, check_run must be used in testing environments. - check_suite: - types: completed - - workflow_run: - types: completed - workflows: - - "\\[TEST-IGNORE\\] Swagger SemanticValidation" - -permissions: - actions: read - checks: read - contents: read - statuses: read - -jobs: - SemanticValidationWatch: - name: Watch SemanticValidation - uses: ./.github/workflows/_reusable-verify-run-status.yaml - with: - check_run_name: "Swagger SemanticValidation" - workflow_name: "Swagger SemanticValidation" From 28d9300750f4aecb313b95e6126787456046704c Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Tue, 12 Aug 2025 08:09:29 +0000 Subject: [PATCH 4/8] [summarize-checks.js] Remove test-ignore --- .github/workflows/src/summarize-checks/summarize-checks.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/src/summarize-checks/summarize-checks.js b/.github/workflows/src/summarize-checks/summarize-checks.js index cdd4785ef80f..e50809cdf01f 100644 --- a/.github/workflows/src/summarize-checks/summarize-checks.js +++ b/.github/workflows/src/summarize-checks/summarize-checks.js @@ -737,8 +737,7 @@ export async function getCheckRunTuple( // just handling both names for ease of integration testing if ( - (latestCheck.name === "[TEST-IGNORE] Summarize PR Impact" || - latestCheck.name === IMPACT_CHECK_NAME) && + latestCheck.name === IMPACT_CHECK_NAME && latestCheck.status === "completed" && latestCheck.conclusion === "success" ) { @@ -809,7 +808,7 @@ export async function getCheckRunTuple( ); } } else { - requiredCheckNames = [IMPACT_CHECK_NAME, "[TEST-IGNORE] Summarize PR Impact"]; + requiredCheckNames = [IMPACT_CHECK_NAME]; } const filteredReqCheckRuns = unifiedCheckRuns.filter( From 0fbcc2316d5111af163624a236f4c339e4c15237 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Tue, 12 Aug 2025 08:09:41 +0000 Subject: [PATCH 5/8] [set-status.test.js] Remove test-ignore --- .github/workflows/test/set-status.test.js | 44 +++++++++++------------ 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/test/set-status.test.js b/.github/workflows/test/set-status.test.js index 26d506caa4fa..f1d0c6341f76 100644 --- a/.github/workflows/test/set-status.test.js +++ b/.github/workflows/test/set-status.test.js @@ -72,8 +72,8 @@ describe("setStatusImpl", () => { target_url: "https://test.com/set_status_url", github, core, - monitoredWorkflowName: "[TEST-IGNORE] Swagger Avocado - Analyze Code", - requiredStatusName: "[TEST-IGNORE] Swagger Avocado", + monitoredWorkflowName: "Swagger Avocado - Analyze Code", + requiredStatusName: "Swagger Avocado", overridingLabel: "Approved-Avocado", }), ).resolves.toBeUndefined(); @@ -83,7 +83,7 @@ describe("setStatusImpl", () => { repo: "test-repo", sha: fullGitSha, state: CommitStatusState.SUCCESS, - context: "[TEST-IGNORE] Swagger Avocado", + context: "Swagger Avocado", description: "Found label 'Approved-Avocado'", target_url: "https://test.com/set_status_url", }); @@ -103,8 +103,8 @@ describe("setStatusImpl", () => { target_url: "https://test.com/set_status_url", github, core, - monitoredWorkflowName: "[TEST-IGNORE] Swagger BreakingChange - Analyze Code", - requiredStatusName: "[TEST-IGNORE] Swagger BreakingChange", + monitoredWorkflowName: "Swagger BreakingChange - Analyze Code", + requiredStatusName: "Swagger BreakingChange", overridingLabel: "BreakingChange-Approved-Benign,BreakingChange-Approved-BugFix,BreakingChange-Approved-UserImpact", }), @@ -115,7 +115,7 @@ describe("setStatusImpl", () => { repo: "test-repo", sha: fullGitSha, state: CommitStatusState.SUCCESS, - context: "[TEST-IGNORE] Swagger BreakingChange", + context: "Swagger BreakingChange", description: "Found label 'BreakingChange-Approved-Benign'", target_url: "https://test.com/set_status_url", }); @@ -138,8 +138,8 @@ describe("setStatusImpl", () => { target_url: "https://test.com/set_status_url", github, core, - monitoredWorkflowName: "[TEST-IGNORE] Swagger BreakingChange - Analyze Code", - requiredStatusName: "[TEST-IGNORE] Swagger BreakingChange", + monitoredWorkflowName: "Swagger BreakingChange - Analyze Code", + requiredStatusName: "Swagger BreakingChange", overridingLabel: "BreakingChange-Approved-Benign, BreakingChange-Approved-BugFix , BreakingChange-Approved-UserImpact", }), @@ -150,7 +150,7 @@ describe("setStatusImpl", () => { repo: "test-repo", sha: fullGitSha, state: CommitStatusState.SUCCESS, - context: "[TEST-IGNORE] Swagger BreakingChange", + context: "Swagger BreakingChange", description: "Found label 'BreakingChange-Approved-UserImpact'", target_url: "https://test.com/set_status_url", }); @@ -170,8 +170,8 @@ describe("setStatusImpl", () => { target_url: "https://test.com/set_status_url", github, core, - monitoredWorkflowName: "[TEST-IGNORE] Swagger BreakingChange - Analyze Code", - requiredStatusName: "[TEST-IGNORE] Swagger BreakingChange", + monitoredWorkflowName: "Swagger BreakingChange - Analyze Code", + requiredStatusName: "Swagger BreakingChange", overridingLabel: "BreakingChange-Approved-Benign,,BreakingChange-Approved-Security,", }), ).resolves.toBeUndefined(); @@ -181,7 +181,7 @@ describe("setStatusImpl", () => { repo: "test-repo", sha: fullGitSha, state: CommitStatusState.SUCCESS, - context: "[TEST-IGNORE] Swagger BreakingChange", + context: "Swagger BreakingChange", description: "Found label 'BreakingChange-Approved-Security'", target_url: "https://test.com/set_status_url", }); @@ -205,8 +205,8 @@ describe("setStatusImpl", () => { target_url: "https://test.com/set_status_url", github, core, - monitoredWorkflowName: "[TEST-IGNORE] Swagger BreakingChange - Analyze Code", - requiredStatusName: "[TEST-IGNORE] Swagger BreakingChange", + monitoredWorkflowName: "Swagger BreakingChange - Analyze Code", + requiredStatusName: "Swagger BreakingChange", overridingLabel: "BreakingChange-Approved-Benign,BreakingChange-Approved-BugFix,BreakingChange-Approved-UserImpact", }), @@ -217,7 +217,7 @@ describe("setStatusImpl", () => { repo: "test-repo", sha: fullGitSha, state: CommitStatusState.PENDING, - context: "[TEST-IGNORE] Swagger BreakingChange", + context: "Swagger BreakingChange", target_url: "https://test.com/set_status_url", }); }); @@ -240,8 +240,8 @@ describe("setStatusImpl", () => { target_url: "https://test.com/set_status_url", github, core, - monitoredWorkflowName: "[TEST-IGNORE] Swagger BreakingChange - Analyze Code", - requiredStatusName: "[TEST-IGNORE] Swagger BreakingChange", + monitoredWorkflowName: "Swagger BreakingChange - Analyze Code", + requiredStatusName: "Swagger BreakingChange", overridingLabel: "", }), ).resolves.toBeUndefined(); @@ -251,7 +251,7 @@ describe("setStatusImpl", () => { repo: "test-repo", sha: fullGitSha, state: CommitStatusState.PENDING, - context: "[TEST-IGNORE] Swagger BreakingChange", + context: "Swagger BreakingChange", target_url: "https://test.com/set_status_url", }); }); @@ -294,7 +294,7 @@ describe("setStatusImpl", () => { github.rest.actions.listWorkflowRunsForRepo.mockResolvedValue({ data: [ { - name: "[TEST-IGNORE] Swagger Avocado - Analyze Code", + name: "Swagger Avocado - Analyze Code", status: checkStatus, conclusion: checkConclusion, updated_at: "2025-01-01", @@ -333,8 +333,8 @@ describe("setStatusImpl", () => { target_url: "https://test.com/set_status_url", github, core, - monitoredWorkflowName: "[TEST-IGNORE] Swagger Avocado - Analyze Code", - requiredStatusName: "[TEST-IGNORE] Swagger Avocado", + monitoredWorkflowName: "Swagger Avocado - Analyze Code", + requiredStatusName: "Swagger Avocado", overridingLabel: "Approved-Avocado", }), ).resolves.toBeUndefined(); @@ -344,7 +344,7 @@ describe("setStatusImpl", () => { repo: "test-repo", sha: fullGitSha, state: commitStatusState, - context: "[TEST-IGNORE] Swagger Avocado", + context: "Swagger Avocado", target_url: targetUrl, }); }, From 1011704b131d45fb59a40f585af1f9fcac7ec058 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Tue, 12 Aug 2025 08:10:48 +0000 Subject: [PATCH 6/8] comment --- .github/workflows/src/summarize-checks/summarize-checks.js | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/src/summarize-checks/summarize-checks.js b/.github/workflows/src/summarize-checks/summarize-checks.js index e50809cdf01f..b756ab67947c 100644 --- a/.github/workflows/src/summarize-checks/summarize-checks.js +++ b/.github/workflows/src/summarize-checks/summarize-checks.js @@ -735,7 +735,6 @@ export async function getCheckRunTuple( const latestCheck = sortedChecks[0]; - // just handling both names for ease of integration testing if ( latestCheck.name === IMPACT_CHECK_NAME && latestCheck.status === "completed" && From dba86f3b1b095d091212e462b18499be0036ebd6 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Wed, 13 Aug 2025 06:26:15 +0000 Subject: [PATCH 7/8] [summarize-checks] remove duplicate param docs --- .github/workflows/src/summarize-checks/summarize-checks.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/src/summarize-checks/summarize-checks.js b/.github/workflows/src/summarize-checks/summarize-checks.js index d190f33703a8..d4c98567e726 100644 --- a/.github/workflows/src/summarize-checks/summarize-checks.js +++ b/.github/workflows/src/summarize-checks/summarize-checks.js @@ -519,9 +519,6 @@ export async function updateCommitStatus(github, core, owner, repo, head_sha, ch * @param {string} owner * @param {string} repo * @param {number} issue_number - * @param {*} owner - * @param {*} repo - * @param {*} issue_number * @return {Promise} */ export async function getExistingLabels(github, owner, repo, issue_number) { From 75f0d6f71f140ddc5205b298aaef92581eb1fb08 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Wed, 13 Aug 2025 21:27:02 +0000 Subject: [PATCH 8/8] remove another test-ignore --- .../workflows/test/summarize-checks/summarize-checks.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test/summarize-checks/summarize-checks.test.js b/.github/workflows/test/summarize-checks/summarize-checks.test.js index 9b48189841e8..31cf84e215da 100644 --- a/.github/workflows/test/summarize-checks/summarize-checks.test.js +++ b/.github/workflows/test/summarize-checks/summarize-checks.test.js @@ -795,7 +795,7 @@ describe("Summarize Checks Unit Tests", () => { const expectedOutput = [ expectedComment, { - name: "[TEST-IGNORE] Automated merging requirements met", + name: "Automated merging requirements met", result: "FAILURE", summary: "❌ This PR cannot be merged because some requirements are not met. See the details.",