Skip to content

discord_pr: render a reopened PR, and say so when an action is dropped - #11

Merged
bjornars merged 1 commit into
mainfrom
bsn/notify-reopened
Sep 12, 2026
Merged

bjornars merged 1 commit into
mainfrom
bsn/notify-reopened

Conversation

@bjornars

Copy link
Copy Markdown
Contributor

Fixes #9. Stacked on #10 — both touch discord.yml, so this targets that branch rather than main.

Consumers have been sending reopened since novem-code/gaia#4009 landed on 2026-08-28. The composer had no branch for it, so it fell to the else and set send=false: a workflow run per reopen, saying nothing, going green. Measured on gaia, same commit two minutes apart — closed → send=success, reopened → send=skipped. Three of its PRs were reopened in one day and the channel still shows all three as closed.

Three hunks, and the middle one is the one I would argue about:

The reopened branch, draft-aware like opened, because a PR can be reopened while still a draft and "please review" about a draft is what that split exists to avoid.

The else now emits a ::warning:: instead of a plain log line. The job still succeeds — a missing message must not fail someone else's pipeline — but the run names the action it dropped. That branch is how this stayed broken for a fortnight after consumers started sending the event, and it will hide the next one identically. If you would rather not have warnings on runs that are working as intended, this hunk is separable; I think the fortnight argues for it.

This repo subscribes to reopened for its own PRs, which it could not usefully do until the composer knew the action.

Verified by extracting the decision chain and running it against every action this file subscribes to plus an unsubscribed one — seven paths including both new draft variants, and the warning firing on locked. Ordering is unchanged for merged PRs: a closed event still falls through to the PR_MERGED check first.

Consumers have been sending `reopened` since novem-code/gaia#4009 landed
on 2026-08-28. The composer had no branch for it, so it fell to the else
and set send=false — a workflow run per reopen, saying nothing, going
green. Measured on gaia, same commit two minutes apart: `closed` sent,
`reopened` skipped. Three of its PRs were reopened in one day and the
channel still shows all three as closed.

Draft-aware like `opened`, because a PR can be reopened while it is
still a draft and "please review" about a draft is what that split
exists to avoid.

The else now emits a ::warning:: rather than a plain log line. The job
still succeeds — a missing message must not fail someone else's
pipeline — but the run names the action it dropped. That branch is how
this stayed broken for a fortnight after consumers started sending the
event, and it will hide the next one the same way.

This repo also subscribes to `reopened` for its own PRs now, which it
could not usefully do until the composer knew the action.

Verified by running the decision chain against every action this file
subscribes to, plus an unsubscribed one: seven paths, the two new draft
variants among them, and the warning on `locked`.
Base automatically changed from bsn/notify-own-issues to main September 12, 2026 08:15
@bjornars
bjornars merged commit 7d5ccc2 into main Sep 12, 2026
4 checks passed
@bjornars
bjornars deleted the bsn/notify-reopened branch September 12, 2026 08:15
bjornars added a commit to novem-code/novem-python that referenced this pull request Sep 12, 2026
The message composer upstream had no branch for `reopened` and dropped
every one — a workflow run per reopen, green, saying nothing. Fixed in
novem-code/github-actions#11; pinning by ref means it arrives only when
the ref moves.

Bumps to 7d5ccc2, the current github-actions main, and adds any event
types this repo was missing so the notifications match the rest of the
org.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

discord_pr: a reopened PR sends nothing

1 participant