Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto deletion of branches doesn't seem to work #32

Closed
jamiepinheiro opened this issue Nov 21, 2019 · 13 comments
Closed

Auto deletion of branches doesn't seem to work #32

jamiepinheiro opened this issue Nov 21, 2019 · 13 comments

Comments

@jamiepinheiro
Copy link

Even with the setting on in the repo settings, branches are not being deleted. I'm wondering if this is a GitHub Api issue or an issue with the action?

@ymwymw
Copy link

ymwymw commented Nov 21, 2019

We are having this issue as well

@jamiepinheiro
Copy link
Author

Confirmed that merging a pull request via the V3 api follows the repos rules. @pascalgn Any idea if your action does anything differently :)

@pascalgn
Copy link
Owner

The action just calls merge: https://github.com/pascalgn/automerge-action/blob/master/lib/merge.js#L175

I'm pretty sure it's an issue on GH's side. I ran the action locally yesterday, for testing the MERGE_RETRY parameters and the branch was deleted successfully. To be honest, I'm not particularly surprised, I've ran into a lot of small bugs with the GH actions so far.

If you find any issues, I'm happy to fix it, but I think this is an issue on GH's side.

@pascalgn
Copy link
Owner

I noticed that it's not just sometimes working, sometimes not working, but it seems to never work anymore. I created a PR for it, no full release yet, but I still have a little hope that GH will fix this issue in the next days.

In the meantime, you should be able to use this version, which re-adds the previously removed feature of branch deletion after merge:

    steps:
      - name: automerge
        uses: "pascalgn/automerge-action@8bab27d2212be1b3a0767ee5ee58f7a255b38812"

@jamiepinheiro
Copy link
Author

Aah okay i see, thanks for jumping on this very quickly! Unfortunately we also using the retry stuff you just added, so just gonna wait on the PR merging. Thanks :)

@pascalgn
Copy link
Owner

The PR is based on the latest master, so the retry configuration should also be included! 👍

@pascalgn
Copy link
Owner

Even though GH support never got back to me, I think this has been fixed now. At least we had a few PRs closed where the branches were deleted, too. Can anyone confirm this?

@pascalgn
Copy link
Owner

I'm closing this now, but feel free to reopen it if you're facing problems again!

@pascalgn
Copy link
Owner

So I just tested it in a private repository and for a private repository on my personal account the automatic branch deletion didn't work. GH support, as usual, wasn't helpful either.

So I've now added a new option MERGE_DELETE_BRANCH (see current README), with default false. Set it like MERGE_DELETE_BRANCH: "true" to have the action delete branches after merge!

@karfau
Copy link

karfau commented Jan 23, 2020

After three month of mail contact with github support (just 6 mails in total), they finally confirmed the issue. I asked them for a timeline will update here in case they reply.
Thx for the option as a work around!

@karfau
Copy link

karfau commented Feb 3, 2020

I recieved this mail on the first of February:

Thanks for hanging in there. We received an update internally that we'd like to share here. Our engineers deployed an update that ensures that pull requests merged by GitHub App installations (including the GitHub Actions App via the GITHUB_TOKEN) should be automatically deleted.

If you're seeing any behavior to the contrary, you're welcome to write back referencing an example in the form of a public repository and we'll do our best to help.

In case you have any public example at hand let me know, so I can forward the information :)

@pascalgn
Copy link
Owner

pascalgn commented Feb 4, 2020

The funny thing is that I never experienced issues with public repositories. For me, the issue only occurred in private repositories, so even if I see any issues again, I'm quite sure it won't be in a public repository. But let's just hope that it's fixed now :) Thanks for letting me know!

@karfau
Copy link

karfau commented Feb 4, 2020

Also with your action when the deletion is enabled, I will not invest time to disable it, just to check if it's fixed...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants