Skip to content

discord: notify this repo about its own issues - #10

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

bjornars merged 1 commit into
mainfrom
bsn/notify-own-issues

Conversation

@bjornars

Copy link
Copy Markdown
Contributor

Fixes #9 — or rather, makes it visible. This repo supplies every other repo's Discord notifications and had none for its own issues, so #9 was filed into silence.

Adds an issues trigger and an inline job using this repo's own discord-notify action.

Inline rather than a fourth reusable workflow. A reusable workflow here is an interface other repos pin by SHA, and adding one is a bigger decision than this repo notifying itself. gaia keeps its own issue notifier inline for the same reason. If a reusable discord_issue.yml is wanted so gaia can drop its copy, that is worth doing deliberately rather than as a side effect of this.

Spend attention on the second hunk, not the first. notify_pr had no if, which was harmless while only pull_request and push fired this file: on a push github.event.action is empty, the composer's else drops the message, and the stray job is invisible. An issue is not like that — its action is literally opened, which the composer's first branch matches. Without the gate, every issue would post a PR notification carrying an empty title and number. I found that by listing the job conditions after adding the trigger, not by reasoning about it.

Not fixed here: this repo's own pull_request types are opened, closed with no reopened, so it has the same gap #9 describes for consumers. That wants the composer fix first, since subscribing to an event the composer drops is what #9 is about.

To verify, file a throwaway issue here and close it.

This repo supplies every other repo's Discord notifications and had
none for its own issues. An issue filed here reached nobody, which is
how #9 was filed into silence.

Adds an `issues` trigger and an inline job using this repo's own
discord-notify action. Inline rather than a fourth reusable workflow: a
reusable workflow here is an interface other repos pin, and adding one
is a bigger decision than this repo notifying itself. gaia keeps its
own issue notifier inline for the same reason.

Also gates notify_pr on `github.event_name == 'pull_request'`, which it
did not need while only pull_request and push fired this file. On a push
`github.event.action` is empty, so the composer's else branch drops the
message and the stray job is invisible. An issue is not like that — its
action is literally `opened`, which the composer's first branch matches,
so without the gate every issue would post a PR notification carrying an
empty title and number.
@bjornars
bjornars merged commit b57f644 into main Sep 12, 2026
6 checks passed
@bjornars
bjornars deleted the bsn/notify-own-issues branch September 12, 2026 08:15
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