delete-merged-branch icon indicating copy to clipboard operation
delete-merged-branch copied to clipboard

Exclude branches in Git Actions

Open kosiakMD opened this issue 4 years ago • 2 comments

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 }}

kosiakMD avatar Apr 14 '21 19:04 kosiakMD

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.

SvanBoxel avatar Apr 14 '21 19:04 SvanBoxel

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)

agudecima-sinapsis avatar Feb 01 '23 13:02 agudecima-sinapsis