Reputation: 1138
I have 3 branches
Branch of PR is feature and it gonna be merged into master. However, all branches should be merged into develop before merged into master. But, I forgot this action many times. Therefore, I want notification of Slack before a specific branch is merged into master.
How can I implement this? I searched for Github actions or Slack app, but couldn't find.
Upvotes: 6
Views: 6431
Reputation: 2600
/github subscribe owner/repo commits:all
This will subscribe to all the branches
Upvotes: 0
Reputation: 101
It was late, But the answer might help someone else
/github subscribe owner/repo commits:master
You can mention any branch name in the place of master
Upvotes: 10
Reputation: 41
You can create your own GitHub action to notify you in Slack when a pull request is created and display the base ref/branch. That way you can see which branch you will be merging into.
Here is a helpful article for creating a custom GitHub action for Slack notifications for pull requests: https://spacejelly.dev/posts/how-to-use-github-actions-to-automate-tests-and-slack-notifications/
Here is the data you can get from the github.event.pull_request object: https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request
Upvotes: 2
Reputation: 2814
You can add github to your slack workspace to get updates on different things: https://slack.github.com/
In your channel you go /github subscribe [yourRepo]
to activate updates.
Upvotes: 0