Skip to content

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

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)#98
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

@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.

Clean follow-up to #97. Two files changed, both correct.

Deleted octo-pr-feed.yml: Removes the opened trigger workflow — per design, only terminal states (merged/closed) and review outcomes are monitored. No orphaned references remain.

octo-pr-result-notify.yml changes verified:

  • types: [closed, reopened][closed]: Correct. reopened is not a terminal state; removing it aligns with the stated design.
  • event_kind simplified to ${{ github.event.pull_request.merged == true && 'pr_merged' || 'pr_closed' }}: Correct. Since the only trigger is closed, the ternary covers both merged and non-merged cases. The removed pr_reopened branch is dead code now.
  • feed_group_id: ${{ vars.OCTO_PR_FEED_GROUP_ID || '1c303c142e9840f2a9b46c10b0972e8d' }} added to both pr-result and review-result jobs: Addresses #97's blocking issue. The || fallback ensures the workflow works even without the org variable — matches the reusable workflow's own default value.

CI: yamllint ✅ actionlint ✅ kustomize ✅ (check-sprint fail is unrelated sprint tracking).

No blocking issues.

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 #98 (octo-deployment)

Verdict: APPROVED

A clean, well-scoped CI-only change. No application code touched. The two changes are correct and consistent with the stated final notification design. No P0/P1 issues found.

What changed

  1. octo-pr-feed.yml deleted — removed the opened-event "new PR" feed.
  2. octo-pr-result-notify.yml
    • Trigger pull_request_target narrowed from [closed, reopened][closed].
    • event_kind simplified from a 3-way (pr_merged | pr_closed | pr_reopened) to a 2-way (pr_merged | pr_closed).
    • Added feed_group_id: ${{ vars.OCTO_PR_FEED_GROUP_ID || '1c303c142e9840f2a9b46c10b0972e8d' }} to both the pr-result and review-result jobs.

Verification

event_kind logic is correct. The pr-result job is guarded by if: github.event_name == 'pull_request_target', and the only pull_request_target type is now closed. Therefore github.event.action is always closed in this job, so dropping the action checks is safe. The new expression github.event.pull_request.merged == true && 'pr_merged' || 'pr_closed' resolves correctly: merged → pr_merged, otherwise (closed-without-merge) → pr_closed. Removing the pr_reopened branch is consistent with dropping the reopened trigger.

feed_group_id fallback is correct. vars.OCTO_PR_FEED_GROUP_ID evaluates to an empty (falsy) string when unset, so the || fallback '1c303c142e9840f2a9b46c10b0972e8d' engages. This matches the reusable workflow's own input default (Mininglamp-OSS/.github/.github/workflows/octo-pr-result-notify.yml@main declares feed_group_id default '1c303c142e9840f2a9b46c10b0972e8d'), so behavior is identical whether the org variable is set or not.

Reusable workflow accepts the new input. Confirmed the called reusable workflow declares feed_group_id (type string, optional) — no contract mismatch.

No-overlap ownership holds. octo-pr-result-notify.yml handles terminal/review events (closed + review:submitted) → global feed; octo-pr-review-feed.yml handles [ready_for_review, review_requested] → project group. The event-type sets are disjoint, so no double-notification.

Clean deletion. octo-pr-feed.yml is fully removed at HEAD; no other workflow uses:/calls it.

Findings

P2 (non-blocking) — stale comment reference. .github/workflows/labeler.yml:11 still reads:

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

octo-pr-feed.yml no longer exists after this PR. Purely cosmetic — does not affect any workflow execution — but worth tidying in a follow-up to avoid confusing future readers.

Observation (informational, not a defect)

This is an intentional behavior change per the PR description: opened/reopened PRs no longer generate a feed notification. Note that a non-draft PR opened directly (not via draft→ready) does not emit ready_for_review; such a PR will only surface in a feed once a reviewer is requested (review_requested) or on a terminal/review event. This matches the documented "only terminal states and review outcomes" design decision, so it is by design — flagging only so the team is aware of the coverage gap for directly-opened PRs.

@lml2468 lml2468 merged commit 7b22e6a into main May 31, 2026
14 of 15 checks passed
@lml2468 lml2468 deleted the chore/fix-pr-notify-design branch May 31, 2026 04:36
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