From 01dae92ac9357e746419dddde5da857fd7d9d048 Mon Sep 17 00:00:00 2001 From: lml2468 Date: Sun, 31 May 2026 11:46:58 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20finalize=20PR=20notification=20desig?= =?UTF-8?q?n=20=E2=80=94=20remove=20octo-pr-feed,=20fix=20result-notify?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Final design (per product owner): - octo-pr-result-notify.yml: terminal state only (merged/closed), routes to global pr-feed via OCTO_PR_FEED_GROUP_ID org variable - octo-pr-review-feed.yml: review events → project group Changes: - Delete octo-pr-feed.yml (pr opened events are intentionally not monitored) - Update octo-pr-result-notify.yml: - Trigger narrowed to [closed] only (drop reopened) - Simplified event_kind expression (pr_merged | pr_closed) - feed_group_id: uses vars.OCTO_PR_FEED_GROUP_ID with safe fallback --- .github/workflows/octo-pr-feed.yml | 27 --------------------- .github/workflows/octo-pr-result-notify.yml | 8 +++--- 2 files changed, 4 insertions(+), 31 deletions(-) delete mode 100644 .github/workflows/octo-pr-feed.yml diff --git a/.github/workflows/octo-pr-feed.yml b/.github/workflows/octo-pr-feed.yml deleted file mode 100644 index 7af8a88..0000000 --- a/.github/workflows/octo-pr-feed.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Octo PR Feed - -on: - pull_request_target: # zizmor: ignore[dangerous-triggers] metadata-only automation; no PR code executed - types: [opened, closed, reopened] - branches: [main] - -permissions: {} - -jobs: - notify: - if: ${{ !github.event.pull_request.draft }} - uses: Mininglamp-OSS/.github/.github/workflows/octo-pr-feed.yml@main - with: - repo_name: ${{ github.event.repository.name }} - pr_number: ${{ github.event.pull_request.number }} - pr_title: ${{ github.event.pull_request.title }} - pr_url: ${{ github.event.pull_request.html_url }} - pr_author: ${{ github.event.pull_request.user.login }} - pr_merged: ${{ github.event.pull_request.merged }} - pr_additions: ${{ github.event.pull_request.additions }} - pr_deletions: ${{ github.event.pull_request.deletions }} - pr_changed_files: ${{ github.event.pull_request.changed_files }} - event_action: ${{ github.event.action }} - project_group_id: 'bdc0df15fdb346508e4281f3df55f749' - secrets: - OCTO_BOT_TOKEN: ${{ secrets.OCTO_BOT_TOKEN }} diff --git a/.github/workflows/octo-pr-result-notify.yml b/.github/workflows/octo-pr-result-notify.yml index d6d5538..1dc8669 100644 --- a/.github/workflows/octo-pr-result-notify.yml +++ b/.github/workflows/octo-pr-result-notify.yml @@ -2,7 +2,7 @@ name: Octo PR Result Notify on: pull_request_target: - types: [closed, reopened] + types: [closed] pull_request_review: types: [submitted] @@ -18,11 +18,11 @@ jobs: pr_title: ${{ github.event.pull_request.title }} pr_url: ${{ github.event.pull_request.html_url }} pr_author: ${{ github.event.pull_request.user.login }} - event_kind: ${{ github.event.action == 'closed' && github.event.pull_request.merged == true && 'pr_merged' || github.event.action == 'closed' && 'pr_closed' || 'pr_reopened' }} + event_kind: ${{ github.event.pull_request.merged == true && 'pr_merged' || 'pr_closed' }} pr_additions: ${{ github.event.pull_request.additions }} pr_deletions: ${{ github.event.pull_request.deletions }} pr_changed_files: ${{ github.event.pull_request.changed_files }} - feed_group_id: "bdc0df15fdb346508e4281f3df55f749" + feed_group_id: ${{ vars.OCTO_PR_FEED_GROUP_ID || '1c303c142e9840f2a9b46c10b0972e8d' }} secrets: OCTO_BOT_TOKEN: ${{ secrets.OCTO_BOT_TOKEN }} @@ -40,6 +40,6 @@ jobs: pr_author: ${{ github.event.pull_request.user.login }} event_kind: ${{ github.event.review.state == 'approved' && 'review_approved' || 'review_changes_requested' }} reviewer: ${{ github.event.review.user.login }} - feed_group_id: "bdc0df15fdb346508e4281f3df55f749" + feed_group_id: ${{ vars.OCTO_PR_FEED_GROUP_ID || '1c303c142e9840f2a9b46c10b0972e8d' }} secrets: OCTO_BOT_TOKEN: ${{ secrets.OCTO_BOT_TOKEN }}