Closed Jared-Dev closed 3 years ago
Hi @Jared-Dev , sound reasonable. I don't have a lot of bandwidth at the moment, but looking at your profile you're comfortable with javascript and probot apps. If you want to you can open a PR. 😄
If I have some time open up I can try to take a stab. Can you point me in a sensible direction or basic structure you'd like to see?
You need to extract the label from the issue, this is part of the event payload.
You probably want to look at an implementation that is similar to what is happening here:
in the snippet above it looks in de app config for branchnames to exclude.
Since exclude
is in use, do you have a preference on the name? I've started working on it a bit (I also don't have much bandwidth atm) and just added excludeLabels
, but I really don't have much of an opinion there so...
Something like "Don't delete if label exists" or "Delete only if label exists" would be a very good feature to have in my opinion. The option 2) can even help with https://github.com/SvanBoxel/delete-merged-branch/issues/8
Closing this feature request as it won't be implemented anytime soon. (Feel free to open a pr yourself if you want to see this functionality added)
It would be handy if similar to
exclude
we could set an array of labels that, when present, prevent the branch from being deleted!