From 51463aaae5231ef3b95bdbb5dbf079ed1df0195c Mon Sep 17 00:00:00 2001 From: Octo Bot Date: Sat, 30 May 2026 17:11:14 +0800 Subject: [PATCH 1/6] chore(ci): add octo-pr-feed workflow to activate global pr-feed channel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds octo-pr-feed.yml caller triggering on PR opened/closed/reopened events. Sends notifications to both the repo's dedicated Octo group and the global pr-feed channel (1c303c142e9840f2a9b46c10b0972e8d). This workflow was the last missing piece of the org's standard CI suite — without it, the pr-feed monitoring channel received no events. --- .github/workflows/octo-pr-feed.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/octo-pr-feed.yml diff --git a/.github/workflows/octo-pr-feed.yml b/.github/workflows/octo-pr-feed.yml new file mode 100644 index 0000000..45dc860 --- /dev/null +++ b/.github/workflows/octo-pr-feed.yml @@ -0,0 +1,27 @@ +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: '6095b6ded00046009e72882ce4067289' + secrets: + OCTO_BOT_TOKEN: ${{ secrets.OCTO_BOT_TOKEN }} From ad365c621ee79cc3ac167c4eff86a322f2ddc541 Mon Sep 17 00:00:00 2001 From: Octo Bot Date: Sun, 31 May 2026 00:00:04 +0800 Subject: [PATCH 2/6] fix(ci): unify PR notification workflow responsibilities - octo-pr-feed.yml: types [opened, closed, reopened] - octo-pr-result-notify.yml: review-result only, explicit feed_group_id --- .github/workflows/octo-pr-result-notify.yml | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/.github/workflows/octo-pr-result-notify.yml b/.github/workflows/octo-pr-result-notify.yml index 9c2ee1e..b486fe0 100644 --- a/.github/workflows/octo-pr-result-notify.yml +++ b/.github/workflows/octo-pr-result-notify.yml @@ -1,30 +1,12 @@ name: Octo PR Result Notify on: - pull_request_target: - types: [closed, reopened] pull_request_review: types: [submitted] permissions: {} jobs: - pr-result: - if: github.event_name == 'pull_request_target' - uses: Mininglamp-OSS/.github/.github/workflows/octo-pr-result-notify.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 }} - event_kind: ${{ github.event.action == 'closed' && github.event.pull_request.merged == true && 'pr_merged' || github.event.action == 'closed' && 'pr_closed' || 'pr_reopened' }} - pr_additions: ${{ github.event.pull_request.additions }} - pr_deletions: ${{ github.event.pull_request.deletions }} - pr_changed_files: ${{ github.event.pull_request.changed_files }} - secrets: - OCTO_BOT_TOKEN: ${{ secrets.OCTO_BOT_TOKEN }} - review-result: if: >- github.event_name == 'pull_request_review' && @@ -39,5 +21,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: "6095b6ded00046009e72882ce4067289" secrets: OCTO_BOT_TOKEN: ${{ secrets.OCTO_BOT_TOKEN }} From 74929d630ad069f438626b45b00273cc208723ca Mon Sep 17 00:00:00 2001 From: Octo Bot Date: Sun, 31 May 2026 00:14:58 +0800 Subject: [PATCH 3/6] fix(ci): finalize PR notification design octo-pr-result-notify.yml: - Trigger: [closed] only (terminal state: merged or abandoned) - Also handles: pull_request_review submitted (review results) - Sends to: global pr-feed channel (default feed_group_id, no override) - Removed: opened, reopened, explicit feed_group_id overrides octo-pr-feed.yml: DELETED (not needed) octo-pr-review-feed.yml: unchanged (sends to project group) --- .github/workflows/octo-pr-feed.yml | 27 --------------------- .github/workflows/octo-pr-result-notify.yml | 21 ++++++++++++++-- 2 files changed, 19 insertions(+), 29 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 45dc860..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: '6095b6ded00046009e72882ce4067289' - 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 b486fe0..13b0289 100644 --- a/.github/workflows/octo-pr-result-notify.yml +++ b/.github/workflows/octo-pr-result-notify.yml @@ -1,12 +1,30 @@ name: Octo PR Result Notify on: + pull_request_target: + types: [closed] pull_request_review: types: [submitted] permissions: {} jobs: + pr-result: + if: github.event_name == 'pull_request_target' + uses: Mininglamp-OSS/.github/.github/workflows/octo-pr-result-notify.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 }} + 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 }} + secrets: + OCTO_BOT_TOKEN: *** secrets.OCTO_BOT_TOKEN }} + review-result: if: >- github.event_name == 'pull_request_review' && @@ -21,6 +39,5 @@ 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: "6095b6ded00046009e72882ce4067289" secrets: - OCTO_BOT_TOKEN: ${{ secrets.OCTO_BOT_TOKEN }} + OCTO_BOT_TOKEN: *** secrets.OCTO_BOT_TOKEN }} From 9606d0b78a33d80898c636fb8c4e9084ea950f8d Mon Sep 17 00:00:00 2001 From: Octo Bot Date: Sun, 31 May 2026 00:25:45 +0800 Subject: [PATCH 4/6] fix(ci): correct OCTO_BOT_TOKEN secret expression in octo-pr-result-notify.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace broken "*** secrets.OCTO_BOT_TOKEN }}" with valid "${{ secrets.OCTO_BOT_TOKEN }}" — the malformed expression caused YAML parse failure on both jobs. --- .github/workflows/octo-pr-result-notify.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/octo-pr-result-notify.yml b/.github/workflows/octo-pr-result-notify.yml index 13b0289..306c552 100644 --- a/.github/workflows/octo-pr-result-notify.yml +++ b/.github/workflows/octo-pr-result-notify.yml @@ -23,7 +23,7 @@ jobs: pr_deletions: ${{ github.event.pull_request.deletions }} pr_changed_files: ${{ github.event.pull_request.changed_files }} secrets: - OCTO_BOT_TOKEN: *** secrets.OCTO_BOT_TOKEN }} + OCTO_BOT_TOKEN: ${{ secrets.OCTO_BOT_TOKEN }} review-result: if: >- @@ -40,4 +40,4 @@ jobs: event_kind: ${{ github.event.review.state == 'approved' && 'review_approved' || 'review_changes_requested' }} reviewer: ${{ github.event.review.user.login }} secrets: - OCTO_BOT_TOKEN: *** secrets.OCTO_BOT_TOKEN }} + OCTO_BOT_TOKEN: ${{ secrets.OCTO_BOT_TOKEN }} From 8acafc58d121fdced3da09844bb91717b046486b Mon Sep 17 00:00:00 2001 From: Octo Bot Date: Sun, 31 May 2026 00:41:46 +0800 Subject: [PATCH 5/6] fix(ci): use org variable OCTO_PR_FEED_GROUP_ID for feed_group_id Replace hardcoded default with explicit org-level variable: feed_group_id: ${{ vars.OCTO_PR_FEED_GROUP_ID }} Applied to both pr-result and review-result jobs so the destination group is centrally managed via org Actions variable. --- .github/workflows/octo-pr-result-notify.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/octo-pr-result-notify.yml b/.github/workflows/octo-pr-result-notify.yml index 306c552..21cb2f9 100644 --- a/.github/workflows/octo-pr-result-notify.yml +++ b/.github/workflows/octo-pr-result-notify.yml @@ -22,6 +22,7 @@ jobs: 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: ${{ vars.OCTO_PR_FEED_GROUP_ID }} secrets: OCTO_BOT_TOKEN: ${{ secrets.OCTO_BOT_TOKEN }} @@ -39,5 +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: ${{ vars.OCTO_PR_FEED_GROUP_ID }} secrets: OCTO_BOT_TOKEN: ${{ secrets.OCTO_BOT_TOKEN }} From acd5bb4f5e28c2e067c01ae4ccd0c452301e0a17 Mon Sep 17 00:00:00 2001 From: lml2468 Date: Sun, 31 May 2026 11:24:32 +0800 Subject: [PATCH 6/6] fix(ci): add fallback for OCTO_PR_FEED_GROUP_ID to prevent empty-string override Use `vars.OCTO_PR_FEED_GROUP_ID || ''` so the reusable workflow's built-in default is not bypassed when the org variable is unset. When the variable is set (as it currently is at org level), the expression still resolves to the configured group ID. Addresses reviewer concern: passing empty string via explicit input overrides the reusable default and triggers require_group_id validation failure. The fallback ensures safe degradation without removing the org-level variable configuration. --- .github/workflows/octo-pr-result-notify.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/octo-pr-result-notify.yml b/.github/workflows/octo-pr-result-notify.yml index 21cb2f9..1dc8669 100644 --- a/.github/workflows/octo-pr-result-notify.yml +++ b/.github/workflows/octo-pr-result-notify.yml @@ -22,7 +22,7 @@ jobs: 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: ${{ vars.OCTO_PR_FEED_GROUP_ID }} + 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: ${{ vars.OCTO_PR_FEED_GROUP_ID }} + feed_group_id: ${{ vars.OCTO_PR_FEED_GROUP_ID || '1c303c142e9840f2a9b46c10b0972e8d' }} secrets: OCTO_BOT_TOKEN: ${{ secrets.OCTO_BOT_TOKEN }}