feat(notify): support alert cards via header/color/status overrides - #17
Closed
arnavchachra wants to merge 1 commit into
Closed
feat(notify): support alert cards via header/color/status overrides#17arnavchachra wants to merge 1 commit into
arnavchachra wants to merge 1 commit into
Conversation
The notify card was locked to a deploy result: a green/red header derived from `result`, a Version field, and a pass/fail color bar. Callers that need the same card shape for a non-deploy alert (e.g. a merge-revert / guard notice) had to hand-roll the whole jq payload and curl themselves. Add three optional, backward-compatible inputs: - `header` — full header line, verbatim, overriding the default "<emoji> <label> — <status>". May carry Slack emoji shortcodes. - `color` — hex color bar overriding the result-derived green/red. - `status` — when set, the first field renders as "Status" with this text in place of the "Version" field. PR/commit resolution, the body section, and the context line are untouched, so an alert card still shows the PR (or commit) that `target-sha` traces to. With none of the three set the payload is byte-identical to before, so existing deploy callers are unaffected. Documented in the README notify table.
7 tasks
Contributor
Author
|
Superseded by #19, which folds these notify alert inputs together with the reusable empty-pr-guard workflow that consumes them (one feature, one release). Branch feat/notify-alert-card left intact as the base of feat/empty-pr-guard. |
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.
What
Extend the
notifyaction so the same rich card can render a general alert, not just a deploy result.Three optional, backward-compatible inputs:
header<emoji> <label> — <status>. May carry Slack emoji shortcodes.colorstatusPR/commit resolution, the body section, and the context line are unchanged, so an alert card still shows the PR (or commit) that
target-shatraces to.Why
Callers that want the same card shape for a non-deploy alert (e.g. an automated merge-revert / guard notice) currently have to hand-roll the entire jq payload + curl. These inputs let them reuse
notifyinstead.Compatibility
With none of the three inputs set, the emitted payload is byte-identical to before — existing deploy callers are unaffected. Verified the alert-mode payload is valid Slack JSON locally;
actionlint+shellcheckclean.Testing
A consumer repo will pin
uses: nurdsoft/ci-workflows/actions/notify@feat/notify-alert-card(per CONTRIBUTING) to validate end-to-end before this merges and thev3tag moves forward.