From 64bdbced0e50abe669d4cab62a7efa976828cd70 Mon Sep 17 00:00:00 2001 From: andig Date: Sun, 12 Jul 2026 18:40:47 +0200 Subject: [PATCH] CI: mark /build and /nightly command comment resolved when done (#31734) --- .github/workflows/command-nightly.yml | 10 ++++++++++ .github/workflows/command-pr-build.yml | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/.github/workflows/command-nightly.yml b/.github/workflows/command-nightly.yml index 795a28371..625f5dbc0 100644 --- a/.github/workflows/command-nightly.yml +++ b/.github/workflows/command-nightly.yml @@ -76,3 +76,13 @@ jobs: ? '✅ Nightly build from master finished.' : `❌ Nightly build from master failed. See the [run logs](${runUrl}).`; await github.rest.issues.createComment({ owner, repo, issue_number: num, body }); + + - name: Resolve command comment + uses: actions/github-script@v8 + with: + script: | + // collapse the /nightly comment as resolved now that the build is done + await github.graphql( + `mutation($id:ID!){minimizeComment(input:{subjectId:$id,classifier:RESOLVED}){minimizedComment{isMinimized}}}`, + { id: context.payload.comment.node_id } + ); diff --git a/.github/workflows/command-pr-build.yml b/.github/workflows/command-pr-build.yml index cc5c601dc..a3b90f6cf 100644 --- a/.github/workflows/command-pr-build.yml +++ b/.github/workflows/command-pr-build.yml @@ -181,3 +181,13 @@ jobs: const body = [`Test binaries for the fix in #${num} are ready to test:`, '', ...artifacts].join('\n'); await github.rest.issues.createComment({ owner, repo, issue_number, body }); } + + - name: Resolve command comment + uses: actions/github-script@v8 + with: + script: | + // collapse the /build comment as resolved now that the build is done + await github.graphql( + `mutation($id:ID!){minimizeComment(input:{subjectId:$id,classifier:RESOLVED}){minimizedComment{isMinimized}}}`, + { id: context.payload.comment.node_id } + );