squalrus / merge-bot

A GitHub action that manages pull request integrations
MIT License
70 stars 12 forks source link

merge-bot failing with error on pull request #47

Closed ChrisRBe closed 3 years ago

ChrisRBe commented 3 years ago

Hi @squalrus,

thank you for this handy bot. Great stuff.

I just set up an action on one of my repositories that is for now private and only worked on by me.

When running the action in "live" mode I get the following error message:

[data] pull (checks + reviews): {"labels":["merge"],"owner":"ChrisRBe","pull_number":6,"reviews":{},"ref":"11d02790cec54a9b1bbfe445d164e4c7fb0af1b1","repo":"kitcheneer","requested_reviewers":[],"checks":{"total":5,"completed":4,"success":4}}
merge: true
Error: Reference does not exist

Do you have an idea what is happening here?

squalrus commented 3 years ago

Hey, thanks for reaching out! A couple questions:

  1. Do you happen to be using the "checks" feature?
  2. Do you mind sharing a pull request where this ran? I'd be happy to help debug.
ChrisRBe commented 3 years ago

Hey, I just gave you access to the repository in question. One of the PRs affected by the above mentioned error was this one here: https://github.com/ChrisRBe/kitcheneer/pull/6

And yes, I am using the checks feature as you can see from the merge-bot config in that PR: checks_enabled: true

squalrus commented 3 years ago

Thanks for the access.

Correct me if I'm wrong, but it seems like merge-bot was able to integrate https://github.com/ChrisRBe/kitcheneer/pull/6, https://github.com/ChrisRBe/kitcheneer/pull/7, and https://github.com/ChrisRBe/kitcheneer/pull/8

Assuming the integration happened correctly, I suspect the issue is with the delete_source_branch.

In your repo settings, do you happen to have the following checked? If so, it could be deleting the branch before merge-bot is able to delete. (I don't believe this is the case since it appears you manually deleted the branches of the PRs several minutes after integrating, but thought I'd ask.)

image

It is also very possible merge-bot has a bug. I am going to try testing in another repo of mine, see if I can reproduce.

ChrisRBe commented 3 years ago

Hey,

Thank you for checking. I checked the repo settings on my side and this particular setting is not set.

Overall: Yes, the bot is able to merge the PR but the final branch deletion seems to be bugged? It seems that this is also blocking a follow up build on the main branch.

squalrus commented 3 years ago

I am able to reproduce in another one of my repositories: https://github.com/squalrus/squalr.us/pull/19

To unblock you now, I'd recommend updating delete_source_branch to false and using the built in setting (mentioned above).

I will look into this further and test. Thanks again for raising the issue.

ChrisRBe commented 3 years ago

That's great news. Or maybe not :) Thank you for the quick response! I will change the repo settings as suggested tomorrow


From: Chad Schulz notifications@github.com Sent: Sunday, February 21, 2021 1:17:45 AM To: squalrus/merge-bot merge-bot@noreply.github.com Cc: ChrisRBe chrisrbe@outlook.com; Author author@noreply.github.com Subject: Re: [squalrus/merge-bot] merge-bot failing with error on pull request (#47)

I am able to reproduce in another one of my repositories: squalrus/squalr.us#19https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fsqualrus%2Fsqualr.us%2Fpull%2F19&data=04%7C01%7C%7Cd8b8d307edc244523bbd08d8d5fe1d3c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637494634671390637%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=LZ2L3mCqW054btKbJb2X1B0ti4claUYF9qphfOAc1SM%3D&reserved=0

To unblock you now, I'd recommend updating delete_source_branch to false and using the built in setting (mentioned above).

I will look into this further and test. Thanks again for raising the issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fsqualrus%2Fmerge-bot%2Fissues%2F47%23issuecomment-782770056&data=04%7C01%7C%7Cd8b8d307edc244523bbd08d8d5fe1d3c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637494634671400632%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=PPBa6s8Rwvu0viVlIT57yIPg4iDyoinqCGigLnl8PK8%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAHNZIGBEZ6WZDRBTCZJV24DTABGKTANCNFSM4XZCCO2Q&data=04%7C01%7C%7Cd8b8d307edc244523bbd08d8d5fe1d3c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637494634671400632%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ozsA6CNfHp5Iwj0mUU7Vt8iNzPRLGM0umBEv3wt4Yyw%3D&reserved=0.

squalrus commented 3 years ago

I made a few updates and the issue is hopefully resolved. Feel free to try out v0.4.4 and let me know!

ChrisRBe commented 3 years ago

@squalrus thanks again for the fast feedback. PRs are correctly closed now :) Thank you for your work.