Trigger webhook on branch removal
Problem to solve
Our development process is pretty straight forward:
Idea -> feature spec -> branch -> qa -> merge to develop -> qa -> deploy
Every time there is a new branch we create a new env using the CI pipelines. Unfortunately it is hard to maintain hundreads of them. After successful QA and merge requests, the source branches are removed. Unfortunately there are no events to inform the CI to remove the affected containers/etc.
Proposal
Emit an webhook every time a branch is deleted.
What does success look like, and how can we measure that?
- Create a branch > delete that branch > "branch_deleted" webhook is triggered
- Create a branch > create a merge request > delete source branch after merge requested is successful > "branch_deleted" webhook is triggered
Links / references
Edited by Oskar Ha