fix(ci): finalize PR notification design (remove octo-pr-feed + fix result-notify)#66
Conversation
β¦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
Jerry-Xin
left a comment
There was a problem hiding this comment.
Verdict: APPROVED
Clean follow-up to #65. Two files, +4 β29, all CI workflow changes β no application code.
What changed:
octo-pr-feed.ymldeleted β removesopenedevent notifications per product owner decision (only terminal states + review outcomes monitored)octo-pr-result-notify.yml:- Trigger narrowed
[closed, reopened]β[closed](terminal state only) event_kindternary simplified accordingly (merged == true ? pr_merged : pr_closed)feed_group_idadded to bothpr-resultandreview-resultjobs:${{ vars.OCTO_PR_FEED_GROUP_ID || '1c303c142e9840f2a9b46c10b0972e8d' }}
- Trigger narrowed
Verified against callee contract:
Mininglamp-OSS/.github/.github/workflows/octo-pr-result-notify.ymldeclaresfeed_group_idastype: string, required: false, default: '1c303c142e9840f2a9b46c10b0972e8d'β caller's fallback matches exactly.
CI: check-sprint and welcome failures are non-blocking chore checks; build, CodeQL, actionlint, sanity all pass or pending.
This directly addresses the blocking feedback from #65's last round (explicit feed_group_id with org variable + fallback, description aligned with implementation). Ship it.
yujiawei
left a comment
There was a problem hiding this comment.
Code Review β PR #66 (octo-admin)
Summary
This PR finalizes the PR-notification design with two changes:
- Deletes
.github/workflows/octo-pr-feed.yml(theopened-event notifier). - Tightens
.github/workflows/octo-pr-result-notify.yml: narrows the trigger to terminal state only, simplifiesevent_kind, and threads a configurablefeed_group_idinto both jobs.
No application code is touched. I verified the change against the shared reusable workflow it calls (Mininglamp-OSS/.github/.github/workflows/octo-pr-result-notify.yml@main) and the sibling notifier (octo-pr-review-feed.yml) to confirm cross-file behavior. The change is correct and safe to merge.
Verification
- β
event_kindsimplification is correct. Old expression branched ongithub.event.action, which was required when the trigger includedreopened. With the trigger narrowed to[closed],actionis alwaysclosed, somerged == true && 'pr_merged' || 'pr_closed'produces exactly the right kind. Bothpr_mergedandpr_closedare in the reusable workflow'sALLOWED_KINDS, so no event will be silently dropped. (octo-pr-result-notify.yml:21) - β
Removing
reopenedis consistent. Thepr_reopenedbranch is gone and no longer reachable; the reusable workflow still listspr_reopenedinALLOWED_KINDSbut that is harmless dead config living in the shared repo. - β
feed_group_idfallback is valid.${{ vars.OCTO_PR_FEED_GROUP_ID || '1c303c142e9840f2a9b46c10b0972e8d' }}β the literal fallback is a 32-char lowercase hex string and passes the reusable workflow'srequire_group_idregex ([0-9a-f]{32}). It also matches the reusable workflow's own default, so behavior is unchanged when the org var is unset. (octo-pr-result-notify.yml:23,42) - β
Security posture preserved. Both jobs run under
permissions: {}, perform no checkout, and pass metadata-only inputs that the reusable workflow sanitizes (sanitize_text, length caps). Thereview-resultjob retains thehead.repo.full_name == github.repositoryguard against fork-based review abuse.pull_request_targetis acceptable here precisely because no PR code is executed. - β
Coverage handoff is clean. Dropping
octo-pr-feed.ymlremovesopened-event notifications;ready_for_review/review_requestedremain covered byocto-pr-review-feed.yml, matching the stated "terminal states + review outcomes only" design.
Findings
No P0/P1 issues.
Suggestions (non-blocking)
- P2 β Notification gap for plain
openedPRs. Withocto-pr-feed.ymldeleted, a non-draft PR that is opened without a requested reviewer fires neitherready_for_review(only triggers on draftβready) norreview_requested, so it produces no feed entry until it is closed/merged. The PR body states this is intentional per the product owner; flagging only so the trade-off is on record. - P2 β
feed_group_idfallback duplicates the reusable default. The hardcoded'1c303c1β¦'mirrors the reusable workflow's own default value. This is defensible for explicitness, but it means the literal now lives in two repos; if the canonical group ID ever changes, both must be updated. Relying onvars.OCTO_PR_FEED_GROUP_IDplus the reusable default would centralize it. Minor. - P2 β Consistency: the
pr-result(closed) job does not carry the samehead.repo.full_name == github.repositoryguard thatreview-resulthas. Risk is negligible (terminal event, empty permissions, no checkout), but adding it would make the two jobs symmetric. Optional.
Verdict
Correct, minimal, and well-scoped. The event_kind logic is sound given the narrowed trigger, the group-id fallback validates, and the ownership split between the result-notify and review-feed workflows is clean. Approving.
lml2468
left a comment
There was a problem hiding this comment.
β APPROVED β clean finalization of the PR notification design.
What changed:
octo-pr-feed.ymldeleted βopened/reopenedevents no longer monitored per designocto-pr-result-notify.yml: trigger narrowed to[closed]only;event_kindsimplified;feed_group_idadded with||fallback
Verified:
feed_group_idfallback logic β${{ vars.OCTO_PR_FEED_GROUP_ID || '1c303c142e9840f2a9b46c10b0972e8d' }}correctly avoids the empty-string bypass that broke PR #65. If the org/repo variable is unset, the hardcoded default kicks in. No empty string will reach the reusable workflow.- Job conditionals β
pr-resultgates onevent_name == 'pull_request_target',review-resultgates onevent_name == 'pull_request_review'+ state filter (approved/changes_requestedonly). No cross-trigger leakage. event_kindsimplification β withreopenedremoved from triggers, the old ternary is dead code. Newmerged == true β pr_merged || pr_closedis correct and minimal.- Security β
permissions: {}, metadata-only automation. No code execution from PR context.
Non-blocking:
π΅ labeler.yml:11 β stale comment still references deleted octo-pr-feed.yml:
# the pattern used by auto-add-to-project.yml and octo-pr-feed.yml.
Suggest cleaning up in a follow-up.
Summary
Finalizes the PR notification design. Clean, no-overlap ownership:
octo-pr-result-notify.yml[closed]+pull_request_review: [submitted]vars.OCTO_PR_FEED_GROUP_IDwith fallback)octo-pr-review-feed.yml[ready_for_review, review_requested]Design decisions (per product owner)
opened/reopenedevents are not monitored β only terminal states (merged/closed) and review outcomesocto-pr-feed.ymlis deleted β it was added in a prior pass but is not needed under the final designChanges
octo-pr-feed.yml: deletedocto-pr-result-notify.yml:[closed, reopened]β[closed](terminal state only)event_kind: simplified topr_merged | pr_closedfeed_group_id:${{ vars.OCTO_PR_FEED_GROUP_ID || '1c303c142e9840f2a9b46c10b0972e8d' }}(org variable with safe fallback)No application code modified.