IBX-12062: Added reusable Slack CI notification workflow - #114
Open
alongosz wants to merge 4 commits into
Open
Conversation
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>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Caution
Merging this drops the
send-success-notificationinput from the nightly dispatcher whileibexa/admin-uistill carries the inline notification PoC. Its own input defaults totrue, 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.Related PRs:
Description:
Extracts the Slack notification PoC from ibexa/admin-ui#1999 into a reusable
workflow_callworkflow, so every Cohesivo package repository can consume it from a thin, byte-identicalworkflow_run-triggered caller instead of copying ~40 lines with a per-repositoryneeds:list.Key differences from the PoC:
workflow_run.conclusion, which aggregates all jobs of the notified run — noneeds:list to maintain, no drift when CI jobs are added.workflow_run.html_url).workflow_run.name, so the same reusable serves a future Frontend CI unchanged.send-success-notificationdispatch input is replaced by asend-success-notificationcall 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_URLsecret, satisfied viasecrets: inherit.The
nightly-backend-ci.ymldispatcher stops passinginputs[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: ~acrossbundles_and_components, add both to the bundle-generator skeleton.TODO:
result=failure(expect ❌) andresult=success(expect ✅)ibexa/admin-uioff the inline PoC onto this workflow, which also ends the green nightly messages noted above@mainonce this is merged, before the branch is deletedFor QA:
No QA required.
🤖 Generated with Claude Code