Expose les outputs de l'action de notification#14
Merged
Conversation
Add `sent`, `status`, `error`, and `attempts` outputs so consumer workflows can branch on the notification result without parsing logs. Introduce a `dry_run` input that publishes `status=dry_run` without issuing an HTTP request, and route `event: auto` to `status=skipped` when no template maps the event. Sanitize the `webhook_url` (and any URL leaked in server error bodies) from the `error` output before writing to `GITHUB_OUTPUT`.
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.
Résumé
outputsdansaction.ymldéclarantsent,status,erroretattemptssendStoatWebhook()pour retourner le nombre de tentatives HTTPsetOutput()pour publier les outputs viaGITHUB_OUTPUTdry_run(booléen, défautfalse)webhook_urlREADME.mdavec tableau des outputs et exemple de workflowdist/index.jsviapnpm buildCritères d'acceptation
action.ymlcontient une sectionoutputsavecsent,status,erroretattempts${{ steps.notify.outputs.sent }}et${{ steps.notify.outputs.status }}sendStoatWebhook()retourne{ attempts: number }avec les valeurs attendues (1, 2, ou 0)errordry_runproduitstatus=dry_runsans appel HTTPpnpm typecheck,pnpm testetpnpm buildpassent sans erreurdist/index.jsest régénéré et inclus dans le commitREADME.mdcontient le tableau des outputs avec exemple d'utilisationCloses #1