workflow announce

Announce the branch’s pull or merge request to your team’s chat

Synopsis

Announce what the messaging pane would — the branch’s pull request, its issue, and where it stands (ready for review, or merged) — to the configured Slack, Teams, Discord or webhook. A preview is printed and confirmed before anything is announced.

With a Slack user token, a ready-for-review announcement tags the code owners of the branch’s changes already linked to Slack, and the user groups chosen for the repository, on a line after the text. It never asks: an owner not linked yet is named in the preview, to link in the interface’s People and groups. A token without the scopes tagging needs posts untagged, naming the scope to add.

What it announces is remembered, with what the interface announces: a pull request already announced at the moment it is at is said to be, and asked about again rather than repeated — with –yes, it is left as it is. –channel announces in another channel than messaging.channel, which only a Slack user token can.

Nothing is announced while a check has failed on the pull request, or while GitLab is merging the merge request: announce it once it has merged. With –when-green, announce waits in the foreground for its CI to pass, through a failed run, then announces it; ctrl+c stops waiting without announcing. It waits on the branch it started on, whatever is checked out meanwhile, and gives up on a pull request that is closed, replaced, merged or begins merging before its CI passes, that reports no check for ten minutes, whose CI runs unchanged for two hours, or whose CI cannot be read, or announcement posted, for ten minutes.

workflow announce [flags]

Examples

  workflow --dry-run announce            # the announcement, and where it would go
  workflow announce --yes                # announce it, unattended
  workflow announce --when-green --yes   # announce it once CI passes, unattended

Options

      --channel CHANNEL           announce in CHANNEL instead of messaging.channel; a Slack user token only
  -h, --help[=true|false]         help for announce
      --when-green[=true|false]   wait in the foreground for the pull request's CI to pass, then announce it
  -y, --yes[=true|false]          go ahead without the confirmation

Options inherited from parent commands

  -n, --dry-run[=true|false]   hold back every write to Jira, the forge, the messaging service, Taskwarrior, git and files, and say what it would have done
      --log-format FORMAT      say what goes to stderr as FORMAT: text, or json or logfmt, an entry a line stamped with its time (default text)
  -q, --quiet[=true|false]     say only warnings, errors and questions on stderr, leaving every note out
      --request-log FILE       append a one-line outline of each request (method, path, status, duration) to FILE, for a bug report
      --verbose[=true|false]   also say each request's outline on stderr, as a debug line (not while the terminal interface draws)

SEE ALSO

  • workflow - Run your Jira, Git forge and messaging workflow, in the terminal or a browser