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
324 stars 55 forks source link

Github Teams Support #117

Closed whyman closed 4 years ago

whyman commented 4 years ago

Hi,

We would like to adopt this app for our org (I used it at my old place and it was awesome) but do not want it across every repo.

Please add a way to limit it to a teams repos only.

Thanks!

SvanBoxel commented 4 years ago

This is unfortunately not how GitHub Apps and permissions scopes work in GitHub.

https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/#available-scopes

whyman commented 4 years ago

Some configuration option to filter the retrieved list of repos could work? Installing it at org level is fine.

cyberhck commented 4 years ago

That's not how github apps and permissions work, without a config to read from that's simply not possible? How do you grant permissions? Why not just install this app where it'll be used, even better, why not just use github actions?

Or now a days github allows you to delete head branches once it's merged, use that instead?

If we wanted to make that happen, there's a way, one is to make everyone have a config file if they want to delete merged branch, it's a breaking change and everyone would have to do a lot of work. OR have a config file to disable this app.

The only way I can think of is have a environment variable which changes the default settings for a particular instance of a app, so you can host your own app which defaults to not run on any repo without a config and add a config for every repo you want to run on.

Trying to figure out teams isn't in the scope of this app IMHO.

SvanBoxel commented 4 years ago

I'm with @cyberhck on this one, this is not within the scope of this app, and is also not covered by GitHub's permission system. Please re-open if anyone has specific suggestions.