github3.py icon indicating copy to clipboard operation
github3.py copied to clipboard

Add support for delete_branch_on_merge flag

Open nwalters512 opened this issue 5 years ago • 10 comments

Repos can be configured to delete branches when PRs are merged, as described here: https://help.github.com/en/github/administering-a-repository/managing-the-automatic-deletion-of-branches

The GitHub API now supports a delete_branch_on_merge flag on the following endpoints:

  • https://developer.github.com/v3/repos/#create
  • https://developer.github.com/v3/repos/#edit

This PR adds support for that flag to everywhere that repos can be created or edited.

I wasn't sure how to re-record the cassettes for the integration tests that are now failing. Any assistance with this would be appreciated!

nwalters512 avatar Jan 21 '20 21:01 nwalters512

The cassettes are from betamax, and the docs here can get you started.

However the downside here is that it uses personal GitHub access tokens to record the interactions, and your account may not have the rights to do the things you need to re-record. You may have to create new test repos/issues/etc. if you run into that, or one of us will have to record it for you.

omgjlk avatar Aug 21 '20 00:08 omgjlk

@omgjlk I looked at rerecording the cassettes so we can get this merged. It's a feature that would save me some clicks. Unfortunately it requires admin level privileges on the github3/urllib repo.

skwashd avatar Sep 11 '20 07:09 skwashd

Alright, I'll set aside some time to get a cassette recorded for this. In the mean time can you fix up the merge conflict?

omgjlk avatar Sep 15 '20 00:09 omgjlk

@omgjlk it's not my pull request. I can fork it and propose a new PR with the AUTHORS.txt fixed, but that doesn't feel fair to @nwalters512. If he doesn't reply soon I'll sort it.

skwashd avatar Sep 15 '20 15:09 skwashd

Starting third-party-check jobs. Warning: Failed to update check run openstack/third-party-check: 403 Resource not accessible by integration

opendev-zuul[bot] avatar Sep 15 '20 20:09 opendev-zuul[bot]

Just resolved the merge conflict! @omgjlk it sounds like I won't be able to record the cassette since it would require me to have admin privileges; it'd be much appreciated if you could do that on my behalf as you indicated.

nwalters512 avatar Sep 15 '20 20:09 nwalters512

Build failed (third-party-check pipeline) integration testing on OpenDev. For information on how to proceed, see https://docs.opendev.org/opendev/infra-manual/latest/developers.html#automated-testing

Warning: Failed to update check run openstack/third-party-check: 403 Resource not accessible by integration Failed to create check run openstack/third-party-check: 403 Resource not accessible by integration

opendev-zuul[bot] avatar Sep 15 '20 20:09 opendev-zuul[bot]

@staticdev as mentioned previously in the thread, I'm unable to record the cassettes as I don't have admin permissions for the repos used in the tests. I wish I could help out here, but I really need a maintainer (or someone with the right permissions) to do that on my behalf.

nwalters512 avatar Dec 29 '21 22:12 nwalters512

Hi, any update on this, it would be really useful if this was back as a feature :)

dtroup-global avatar Feb 25 '22 13:02 dtroup-global

I am sorry for late response, I also don't have admin permissions. Maybe @sigmavirus24 can give a hint on that?

staticdev avatar Feb 28 '22 21:02 staticdev

It doesn't seem like there's interest in merging this.

nwalters512 avatar Jun 21 '23 23:06 nwalters512