How to trigger job on branch deletion?


#1

How can I trigger a job to be run when a branch gets deleted?


#2

There is no way to do this from within CircleCI. You could set up a lambda job or something though to do this via the API.

So something like this might work:

  1. Send Webhook from GitHub to Lambda when branch gets deleted
  2. Trigger build via the API from Lambda

#3

Thanks for your answer. Is this planned? F.e. Gitlab CI can do with a so-called stop job: https://docs.gitlab.com/ce/ci/environments.html#stopping-an-environment


#4

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.