Skip to content

fix(ci): finalize PR notification design (remove octo-pr-feed + fix result-notify)#176

Merged
lml2468 merged 1 commit into
mainfrom
chore/fix-pr-notify-design
May 31, 2026
Merged

fix(ci): finalize PR notification design (remove octo-pr-feed + fix result-notify)#176
lml2468 merged 1 commit into
mainfrom
chore/fix-pr-notify-design

Conversation

@lml2468
Copy link
Copy Markdown
Contributor

@lml2468 lml2468 commented May 31, 2026

Summary

Finalizes the PR notification design. Clean, no-overlap ownership:

Workflow Trigger Sends to
octo-pr-result-notify.yml [closed] + pull_request_review: [submitted] global pr-feed (vars.OCTO_PR_FEED_GROUP_ID with fallback)
octo-pr-review-feed.yml [ready_for_review, review_requested] project group (repo-specific)

Design decisions (per product owner)

  • opened/reopened events are not monitored — only terminal states (merged/closed) and review outcomes
  • octo-pr-feed.yml is deleted — it was added in a prior pass but is not needed under the final design

Changes

  • octo-pr-feed.yml: deleted
  • octo-pr-result-notify.yml:
    • Trigger: [closed, reopened][closed] (terminal state only)
    • event_kind: simplified to pr_merged | pr_closed
    • feed_group_id: ${{ vars.OCTO_PR_FEED_GROUP_ID || '1c303c142e9840f2a9b46c10b0972e8d' }} (org variable with safe fallback)

No application code modified.

…esult-notify

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
@lml2468 lml2468 requested a review from a team as a code owner May 31, 2026 03:46
@github-actions github-actions Bot added the size/S PR size: S label May 31, 2026
Copy link
Copy Markdown
Contributor

@Jerry-Xin Jerry-Xin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is in scope for Mininglamp-OSS/octo-web because it updates this repository’s GitHub Actions PR notification ownership, and I found no blocking issues.

💬 Non-blocking

  • 🔵 Suggestion: .github/workflows/labeler.yml:7 still says its security pattern matches octo-pr-feed.yml, but that workflow is now deleted. Consider updating the comment to reference an existing metadata-only workflow such as auto-add-to-project.yml or octo-pr-review-feed.yml.

✅ Highlights

  • .github/workflows/octo-pr-result-notify.yml:4-7 now matches the stated design: terminal PR close events plus submitted reviews only.
  • .github/workflows/octo-pr-result-notify.yml:21 correctly simplifies result classification to pr_merged vs pr_closed after removing the reopened trigger.
  • .github/workflows/octo-pr-result-notify.yml:25 and :43 pass feed_group_id; I verified the reusable workflow accepts that input and validates it.
  • YAML parsing and git diff --check passed locally.

Copy link
Copy Markdown
Contributor

@yujiawei yujiawei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review — PR #105 (octo-adapters)

Verdict: APPROVED

Small, well-scoped CI-config change (2 files, +4/−29). The notification-ownership redesign is internally consistent and the workflow expressions are correct. No correctness, security, or build-breaking issues found.

1. Verification

Item Result Evidence
event_kind simplification is correct octo-pr-result-notify.yml:21 — with the trigger reduced to types: [closed], github.event.action is always closed, so the old 3-way …action == 'closed' && merged && 'pr_merged' || action == 'closed' && 'pr_closed' || 'pr_reopened' collapses cleanly to github.event.pull_request.merged == true && 'pr_merged' || 'pr_closed'. The dropped pr_reopened branch is now unreachable, so removing it is right.
reopened removed from trigger octo-pr-result-notify.yml:5types: [closed]. Matches the stated design (only terminal states monitored).
feed_group_id is a valid input Reusable Mininglamp-OSS/.github/.github/workflows/octo-pr-result-notify.yml@main declares feed_group_id (string, optional, default '1c303c142e9840f2a9b46c10b0972e8d'). The PR's fallback literal matches that default, so behavior is unchanged when vars.OCTO_PR_FEED_GROUP_ID is unset.
feed_group_id added to both jobs octo-pr-result-notify.yml:24 (pr-result) and :43 (review-result) both pass `${{ vars.OCTO_PR_FEED_GROUP_ID
octo-pr-feed.yml deletion leaves no broken refs ⚠️ One stale comment reference remains (see P2). No functional reference (e.g. uses: / needs:) points at the deleted file.
Notification coverage has no unintended gap After the change: ready_for_review/review_requestedocto-pr-review-feed.yml (project group 0262…); closed (merged/closed) → octo-pr-result-notify.yml pr-result (global feed 1c303…); review submitted (approved/changes_requested) → review-result (global feed). opened/reopened intentionally unmonitored. No overlap, no duplicate sends.
Static checks actionlint, workflow sanity, and Build & Type-check all pass on the PR.

2. Findings

P2 — Stale doc comment references the deleted workflow (non-blocking)

.github/workflows/labeler.yml:11:

# the pattern used by auto-add-to-project.yml and octo-pr-feed.yml.

octo-pr-feed.yml is deleted by this PR, so this comment now points at a file that no longer exists. Purely a documentation nit — no functional impact. Suggest updating it to reference only auto-add-to-project.yml (or octo-pr-review-feed.yml) in a follow-up or a quick amend.

3. Suggestions

  • (Optional) Fix the labeler.yml:11 comment as above to keep the pull_request_target rationale comments accurate.

4. Additional observations

  • The review-result job retains its fork guard github.event.pull_request.head.repo.full_name == github.repository (octo-pr-result-notify.yml:36), so review notifications only fire for same-repo PRs. Unchanged by this PR and appropriate.
  • permissions: {} is preserved on both top-level workflows; secrets are scoped to the reusable call. Good security posture for pull_request_target.
  • Audience split is intentional and documented: lifecycle/review-request events go to the repo-specific project group, while terminal/review-outcome events go to the global PR feed. This is a design choice, not a defect.

Overall: correct, minimal, and consistent with the documented design. Approving.

@lml2468 lml2468 merged commit 13b714f into main May 31, 2026
16 of 17 checks passed
@lml2468 lml2468 deleted the chore/fix-pr-notify-design branch May 31, 2026 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants