Following git workflows, there is a branch called activesprint, or develop. It is the release candidate. Most of active branches should base on it.
Team need to be notified, whenever a new activesprint branch has been created. To lower the communication effort, we can automate the detection process and get slack notifications.
Why We Need Slack Notifications
- When a new active sprint is created, we usually need to merge our private branches as soon as possible. The earlier we do the branch merge, the fewer merge effort we could expect.
- Config files might need to be updated accordingly. Especially the bump version.
Backbone: Jenkins + Slack
First of all, we need to detect when a new git branch has been created.
Apparently we have 2 ways: push or poll. If we have the admin privilege of git repo, we can define a git hook. The hook subscribes to git branch create event. Or we can define a crontab, which will periodically poll latest branch list, via git ls-remote –heads origin.
Fortunately activesprint usually has a strong naming convention. Say sprint-37/sprint-38 or 1.37/1.38. Once we figure out latest branch list, we can easily detect whether a new activesprint branch has been created.
Any improvements or suggestions? Share your experience with us!
Original URL: https://dennyzhang.com/slack_activesprint