How can I make the CircleCI Slack orb mention the user that pushed the commit that triggered the build?

Viewed 18

This is the documentation for the slack orb: https://circleci.com/developer/orbs/orb/circleci/slack

This is the slack relevant part of my config.yml file:

            - slack/notify:
                  event: fail
                  mentions: "<@U0XXXXXXXXX>" # @Joe Blogs
                  template: basic_fail_1

            - slack/notify:
                  event: pass
                  template: success_tagged_deploy_1

I'm currently just hardcoding one specific slack user by their slack user id. Is there a pattern to get the GitHub user that pushed the commit which triggered this build and then resolve it to a slack user id?

0 Answers
Related