Skip to content

IBX-12062: Added reusable Slack CI notification workflow - #114

Open
alongosz wants to merge 4 commits into
mainfrom
ibx-12062-reusable-slack-ci-notification
Open

IBX-12062: Added reusable Slack CI notification workflow#114
alongosz wants to merge 4 commits into
mainfrom
ibx-12062-reusable-slack-ci-notification

Conversation

@alongosz

@alongosz alongosz commented Sep 2, 2026

Copy link
Copy Markdown
Member

Caution

Merging this drops the send-success-notification input from the nightly dispatcher while ibexa/admin-ui still carries the inline notification PoC. Its own input defaults to true, so admin-ui's nightly successful runs (4.6 and 5.0) will post a green message every night until the PoC is converted to this reusable workflow. Failure reporting is unaffected.

🎫 Issue IBX-12062

Related PRs:

Description:

Extracts the Slack notification PoC from ibexa/admin-ui#1999 into a reusable workflow_call workflow, so every Cohesivo package repository can consume it from a thin, byte-identical workflow_run-triggered caller instead of copying ~40 lines with a per-repository needs: list.

Key differences from the PoC:

  • The result comes from workflow_run.conclusion, which aggregates all jobs of the notified run — no needs: list to maintain, no drift when CI jobs are added.
  • The Details link points at the notified CI run (workflow_run.html_url).
  • The workflow name in the message comes from workflow_run.name, so the same reusable serves a future Frontend CI unchanged.
  • The PoC's send-success-notification dispatch input is replaced by a send-success-notification call input: 'auto' (default) reports successes only for human-dispatched runs (a [bot] dispatcher gets failures only); 'true'/'false' force the behavior, e.g. for testing.

Requires the org-level SLACK_PHP_BACKEND_CI_WEBHOOK_URL secret, satisfied via secrets: inherit.

The nightly-backend-ci.yml dispatcher stops passing inputs[send-success-notification] here, since no converted repository declares that input any more and dispatching an undeclared input is rejected with a 422.

Follow-ups (separate PRs): roll out thin callers + workflow_dispatch: ~ across bundles_and_components, add both to the bundle-generator skeleton.

TODO:

  • Test end to end via the ibexa/gha-testing PR: dispatch the mock "Backend CI" with result=failure (expect ❌) and result=success (expect ✅)
  • Convert ibexa/admin-ui off the inline PoC onto this workflow, which also ends the green nightly messages noted above
  • Repoint the ibexa/gha-testing caller from this feature branch to @main once this is merged, before the branch is deleted

For QA:

No QA required.

🤖 Generated with Claude Code

alongosz and others added 4 commits September 2, 2026 18:32
Extracted the Slack notification PoC from ibexa/admin-ui#1999 into a
reusable workflow, so every Cohesivo package repository can consume it
from a thin, byte-identical workflow_run-triggered caller instead of
copying ~40 lines with a per-repository needs list.

The run conclusion comes from the workflow_run event, which aggregates
all jobs of the notified run. Success notifications are governed by the
send-success-notification input: 'auto' (default) notifies only when a
human dispatched the run, replacing the PoC's dispatch input, which a
workflow_run payload cannot carry.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A workflow_run payload reports 'schedule' for a CI run started by cron,
which the previous condition rejected, so such a run notified about
nothing at all - not even a failure. Repositories are free to put a
schedule trigger on their CI workflow, so accept that event too.

Scheduled runs must not report successes under 'auto', though: nobody is
waiting for them, exactly like the nightly bot dispatcher. The 'auto'
branch therefore now requires a human AND a workflow_dispatch, rather
than only a non-bot actor.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The Slack action defaults to errors: false, which downgrades a rejected
call to a warning and leaves the step green. A webhook revoked in Slack
or a rotated secret would then silence CI notifications across every
repository consuming this workflow, with nothing to show it.

The job runs on workflow_run, so a red notification cannot affect the
conclusion of the CI run it reports on.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The input cannot survive the trip: a workflow_run payload carries no
dispatch inputs, so the reusable notification takes the flag through
workflow_call from the thin caller instead. Passing it here only worked
because ibexa/admin-ui happens to declare it, being the one repository
still carrying the inline notification PoC. Every repository that gains
a plain workflow_dispatch trigger would be dispatched with an input it
does not declare, and the API rejects that with a 422.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Sep 7, 2026

Copy link
Copy Markdown

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.

1 participant