Commit e1ea1c5
chore(repo): improve publish workflow slack notifications for reviewers and threaded status updates (#36502)
<!-- ccr-slack-attribution -->
_Requested by **Jason Jean, Craigory Coppola, Jack Hsu** · [Slack
thread](https://nrwl.slack.com/archives/C024JCL7TST/p1785288124781459?thread_ts=1785288124.781459&cid=C024JCL7TST)_
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->
## Current Behavior
`report-pending-publish` always mentions Jason (`U9NPA6C90`) in the
"manual review is required" Slack message, even when Jason is the one
who triggered the release himself. It also uses
`ravsamhq/notify-slack-action` (an incoming webhook), which cannot
return a message timestamp, so there is no way for the workflow to later
reply in that same Slack thread once the release is approved and
published.
## Expected Behavior
**1. Reviewer mentions (bystander effect / self-ping avoidance)**
A new `reviewers` step compares `github.triggering_actor` against
Jason's GitHub login and mentions Craigory (`U020RK8EMRR`) + Jack
(`UD688H84E`) instead of Jason when Jason is the one who kicked off the
run — pinging the trigger is pointless noise, and he already knows he's
publishing. In every other case, the mention stays exactly as before
(Jason). We deliberately avoid a blanket group/`@here`-style tag, since
spreading the ping across a group invites the bystander effect where
everyone assumes someone else will do the review.
Jason Jean's GitHub login is `FrozenPandaz` — confirmed by fetching his
GitHub profile (`github.com/FrozenPandaz`), which displays "Jason Jean"
as the account's real name, and cross-checked against his extensive
merged-PR history on `nrwl/nx`.
**2. Threaded status updates**
Per Jason's request in the linked Slack thread ("is there a way we can
get the workflow to also respond to this slack thread once it has been
approved and also once the release has been successfully published?"),
the workflow now:
- Posts the initial pending-review message via
`slackapi/slack-github-action` (`chat.postMessage`) instead of the
incoming-webhook action, since only a bot-token-based post returns a
`ts` that can be threaded against. The job now exposes
`outputs.slack_thread_ts`.
- Has `publish` depend on `report-pending-publish` (so it can read that
`ts`) and, right after checkout, post a threaded "✅ Approved —
publishing now." reply once the manual-review environment gate has let
the job start. Note this means `publish` now starts slightly later,
after the initial Slack post completes — an intentional, acceptable
tradeoff.
- Adds a new `report-published` job that runs after `publish` succeeds
and posts a threaded "🎉 Version {version} was published to NPM
successfully." reply, with a link back to the run.
The message text for the initial post is now assembled in a plain shell
step (`id: message`) from `needs.resolve-required-data.outputs.*` and
the new `reviewers` output, rather than as nested GitHub Actions
expressions inside the YAML `payload:` block, to keep it readable and
avoid escaping pitfalls.
**1 parent aacc429 commit e1ea1c5
1 file changed
Lines changed: 179 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
573 | 573 | | |
574 | 574 | | |
575 | 575 | | |
| 576 | + | |
576 | 577 | | |
577 | 578 | | |
578 | 579 | | |
| |||
581 | 582 | | |
582 | 583 | | |
583 | 584 | | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
584 | 625 | | |
585 | 626 | | |
586 | 627 | | |
| |||
664 | 705 | | |
665 | 706 | | |
666 | 707 | | |
| 708 | + | |
| 709 | + | |
667 | 710 | | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
668 | 784 | | |
669 | | - | |
| 785 | + | |
| 786 | + | |
670 | 787 | | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
686 | 808 | | |
687 | | - | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
688 | 850 | | |
689 | 851 | | |
690 | 852 | | |
| |||
0 commit comments