ci: require Mantis app for QA comments (#76834) · openclaw/openclaw@2416bc6
steipete
·
2026-05-04
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -33,7 +33,6 @@ env:
|
33 | 33 | PNPM_VERSION: "10.33.0" |
34 | 34 | OPENCLAW_BUILD_PRIVATE_QA: "1" |
35 | 35 | OPENCLAW_ENABLE_PRIVATE_QA_CLI: "1" |
36 | | -HAS_MANTIS_GITHUB_APP: ${{ secrets.MANTIS_GITHUB_APP_ID != '' && secrets.MANTIS_GITHUB_APP_PRIVATE_KEY != '' }} |
37 | 36 | |
38 | 37 | jobs: |
39 | 38 | authorize_actor: |
@@ -269,7 +268,7 @@ jobs:
|
269 | 268 | |
270 | 269 | - name: Create Mantis GitHub App token |
271 | 270 | id: mantis_app_token |
272 | | -if: ${{ always() && inputs.pr_number != '' && env.HAS_MANTIS_GITHUB_APP == 'true' }} |
| 271 | +if: ${{ always() && inputs.pr_number != '' }} |
273 | 272 | uses: actions/create-github-app-token@v3 |
274 | 273 | with: |
275 | 274 | app-id: ${{ secrets.MANTIS_GITHUB_APP_ID }} |
@@ -283,11 +282,12 @@ jobs:
|
283 | 282 | - name: Comment PR with inline QA screenshots |
284 | 283 | if: ${{ always() && inputs.pr_number != '' && steps.run_mantis.outputs.output_dir != '' }} |
285 | 284 | env: |
286 | | -GH_TOKEN: ${{ steps.mantis_app_token.outputs.token || github.token }} |
| 285 | +GH_TOKEN: ${{ steps.mantis_app_token.outputs.token }} |
287 | 286 | TARGET_PR: ${{ inputs.pr_number }} |
288 | 287 | ARTIFACT_URL: ${{ steps.upload_artifact.outputs.artifact-url }} |
289 | 288 | BASELINE_SHA: ${{ needs.validate_refs.outputs.baseline_revision }} |
290 | 289 | CANDIDATE_SHA: ${{ needs.validate_refs.outputs.candidate_revision }} |
| 290 | +MANTIS_COMMENT_BOT_LOGIN: openclaw-mantis-qa[bot] |
291 | 291 | shell: bash |
292 | 292 | run: | |
293 | 293 | set -euo pipefail |
@@ -366,7 +366,7 @@ jobs:
|
366 | 366 | |
367 | 367 | comment_id="$( |
368 | 368 | gh api --paginate "repos/${GITHUB_REPOSITORY}/issues/${TARGET_PR}/comments" \ |
369 | | - --jq '.[] | select(.body | contains("<!-- mantis-discord-status-reactions -->")) | .id' \ |
| 369 | + --jq ".[] | select(.body | contains(\"<!-- mantis-discord-status-reactions -->\")) | select(.user.login == \"${MANTIS_COMMENT_BOT_LOGIN}\") | .id" \ |
370 | 370 | | tail -n 1 |
371 | 371 | )" |
372 | 372 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -355,9 +355,9 @@ messages, and other bulky evidence stay in the Actions artifact.
|
355 | 355 | Production workflows should post those comments with the Mantis GitHub App, not |
356 | 356 | with `github-actions[bot]`. Store the app id and private key as |
357 | 357 | `MANTIS_GITHUB_APP_ID` and `MANTIS_GITHUB_APP_PRIVATE_KEY` GitHub Actions |
358 | | -secrets. If those secrets are missing, the workflow may fall back to |
359 | | -`github-actions[bot]` for local bring-up, but that is not the desired long-term |
360 | | -identity. |
| 358 | +secrets. The workflow should update an existing Mantis-owned comment when one |
| 359 | +exists; if only an older `github-actions[bot]` comment exists, it should create a |
| 360 | +new Mantis-owned comment instead of rewriting the legacy bot comment. |
361 | 361 | |
362 | 362 | The PR comment should be short and visual: |
363 | 363 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。