SvanBoxel / delete-merged-branch

No more manually deleting merged branches, this lovely app does it for you.
https://github.com/apps/delete-merged-branch/
ISC License
322 stars 55 forks source link

Exclude branches in Git Actions #209

Open kosiakMD opened 3 years ago

kosiakMD commented 3 years ago

Big thanks for the solution. I have a question - how to add excluded branches in Git Actions .yml file? Is this right?

     env:
         exclude: [development]
         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SvanBoxel commented 3 years ago

Hi @kosiakMD, that work with the same way as when you'd use the app. Meaning it'll look for a config file (`.github/delete-merged-branch-config.yml) in your repository which contains a list of repositories it should ignore. Eg.

exclude: 
  - foor
  - qa
  - feature-*

I do agree it would make sense to add an input to the action where you list branches it should ignore. Feel free to open a PR for that.

agudecima-sinapsis commented 1 year ago
Captura de pantalla 2023-02-01 a la(s) 10 37 10 Captura de pantalla 2023-02-01 a la(s) 10 39 38

Hi guys, I have this in my project but I'm not getting it to ignore those branches that I indicate, in the same way it eliminates them. Do you know what could be my mistake?

This is the result in the logs actions

Run SvanBoxel/delete-merged-branch@main 13:22:48.222Z INFO probot: Loaded delete-merged-branch GitHub Application 13:22:48.9[5](https://*/test-delete-branch/actions/runs/4064814791/jobs/6998693574#step:2:6)7Z INFO event: Successfully deleted*/test-delete-branch/heads/dev which was merged (id=20fd5eb7-[6](https://github.com/*/test-delete-branch/actions/runs/4064814791/jobs/6998693574#step:2:7)e89-4092-9891-5780e504a7ac)