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

Configuring Ranger #3931

Closed
mfix22 opened this issue Aug 28, 2019 · 28 comments
Closed

Configuring Ranger #3931

mfix22 opened this issue Aug 28, 2019 · 28 comments
Labels
question Support questions, usage questions, unconfirmed bugs, discussions, ideas

Comments

@mfix22
Copy link

mfix22 commented Aug 28, 2019

📋 Description

I noticed that you installed Ranger but have not yet used it to automate merging PRs, closing issues, or handling other tasks.

Have you had any trouble with it, or need any help configuring it? I am here to help! 👍

If not, feel free to close this issue (or have Ranger do it for you 🙂)

@mfix22 mfix22 added the service-badge Accepted and actionable changes, features, and bugs label Aug 28, 2019
@calebcartwright calebcartwright added question Support questions, usage questions, unconfirmed bugs, discussions, ideas and removed service-badge Accepted and actionable changes, features, and bugs labels Aug 28, 2019
@calebcartwright
Copy link
Member

hi @mfix22, thanks for reaching out. We did try to use it a while back on our PRs but were unable to get it to work. I still think we'd really benefit from the functionality, but we didn't really have time to dig into why it wasn't working/what we may have been missing/etc.

If you have any insight on how we could get it working that would be great!

One example of a PR where we tried: #3526

@mfix22
Copy link
Author

mfix22 commented Aug 29, 2019

Hey @calebcartwright sorry to hear that! I would love to help make sure it is working correctly for you. I see that all the checks passed on your PR, so that is looking good ✅ Did you have any other protections on the master branch at all?

On a fresh clone of the repo, I see that Ranger is working fine, mfix22#1 (comment), so I am assuming it has something to do with your other integrations, most likely CI/CD.

If you could try again with a small/dummy PR, that would be great, otherwise I will try and set up CircleCI on my fork to better recreate the situation.

@chris48s
Copy link
Member

We use quite a lot of branch protection rules on this repo. My assumption is that one of these rules is preventing repo ranger from being able to merge for us. We have the following rules enabled:

  • Require pull request reviews before merging
  • Required approving reviews: 1
  • Dismiss stale pull request approvals when new commits are pushed
  • Require status checks to pass before merging
  • Require branches to be up to date before merging
  • Include administrators
  • Restrict who can push to matching branches: Organization and repository administrators, badges/shields-core

Any thoughts?

While its nice that you've proactively contacted us about this, one of the reasons we've not followed this up at all is that its not very obvious how to contact you with a support query. Even if your code is not public, have you considered setting up a public issues-only repo or something?
Thanks

@paulmelnikow
Copy link
Member

Just wanted to say @mfix22 that a merge queue we could kick off after an approving review that would take care of updating the branch, waiting for tests to pass (except LGTM and Docker, which take too long), and then squash-merging, would be super helpful for this project. I'd estimate it would save 1–2 hours of maintainer time a week.

@mfix22
Copy link
Author

mfix22 commented Aug 29, 2019

While it's nice that you've proactively contacted us about this, one of the reasons we've not followed this up at all is that its not very obvious how to contact you with a support query. Even if your code is not public, have you considered setting up a public issues-only repo or something?
Thanks

@chris48s this is great feedback, thank you. We have a public feedback form you can contact me at here: https://reporanger.com/feedback, however, I will also set up a public issues-only repo for tracking bugs/issues here: https://github.com/reporanger/feedback.

@mfix22
Copy link
Author

mfix22 commented Aug 29, 2019

@paulmelnikow that is great to hear — I would absolutely love to help you save those hours.

If you add the "squash when passing" label to a PR, Ranger will automatically squash-merge the PR once all the required statuses are passing, following all integration status checks, branch protection rules, etc.

I you can add the label to a branch in need of merging, I can investigate why it might not be being merged.

@paulmelnikow
Copy link
Member

paulmelnikow commented Aug 29, 2019

Can you look at the example @calebcartwright posted? #3526

I just added it to #3880 which is already up to date, with tests already passing. I don't see an out-of-date branch ready to merge, though if someone sees one, let's try adding the label.

@mfix22
Copy link
Author

mfix22 commented Aug 29, 2019

Can you look at the example @calebcartwright posted? #3526

On it 👌

@paulmelnikow
Copy link
Member

#3880 has the necessary approvals.

Screen Shot 2019-08-29 at 1 34 23 PM

This is what we have under "restrict who can push to matching branches".

Screen Shot 2019-08-29 at 1 34 48 PM

Do we need to add a user for Ranger?

@mfix22
Copy link
Author

mfix22 commented Aug 29, 2019

Hey @paulmelnikow I think you are right! The public status listing (https://api.github.com/repos/badges/shields/pulls/3880) shows that the PR has a mergeable_state of clean, which means "good to go", however Ranger is getting the status: blocked which means that is is not able to merge the PR.

Can you try adding Ranger to an approved list you mentioned above? We have never seen this specific set of branch blocking rules before so I really appreciate you are letting me debug this 🙂

@paulmelnikow
Copy link
Member

I can only add GitHub users. Which user is it?

@mfix22
Copy link
Author

mfix22 commented Aug 29, 2019

@repo-ranger is the username.

@paulmelnikow
Copy link
Member

It's added!

Screen Shot 2019-08-29 at 2 16 52 PM

@calebcartwright
Copy link
Member

Looks like the PR was merged!

@mfix22
Copy link
Author

mfix22 commented Aug 29, 2019

Great! 👍 Thanks for working through this with me. I added another set of logging to our backend that will help me understand this issue faster in the future 👌

Now that we got it working, are there any other features you would like help automating? On other repos I maintain, I configure things like: automatically deleting HEAD branches, deleting ":+1:" comments, stuff like that 🙂

@paulmelnikow
Copy link
Member

Awesome!

Will it update an out-of-date branch before attempting to merge it? That's the thing we need for this to be useful.

@calebcartwright
Copy link
Member

calebcartwright commented Aug 29, 2019

Will it update an out-of-date branch before attempting to merge it?

And would we need that to be done via a dependabot command on dependabot opened PRs to avoid merge conflicts, and if so can ranger support that?

Something like: If author is dependabot AND branch out-of-date then comment @dependabot rebase (code fenced here to avoid actually mentioning and confusing dependabot 😄)

@mfix22
Copy link
Author

mfix22 commented Aug 29, 2019

We are actively building out that feature, but trying to figure out how to best fit it in with the rest of Ranger's config.

I will ping in this thread, or in a new issue immediately once the feature ships.

@chris48s
Copy link
Member

chris48s commented Aug 30, 2019

Thanks for helping with this. Even without the ability to auto-@dependabot rebase this will probably save a bit of time.
It would be helpful to mention in the documentation that users need to manually give @repo-ranger write access to master in the branch protection config as well as authorising the app. I suspect we won't be the only users not to understand this.

@mfix22
Copy link
Author

mfix22 commented Aug 30, 2019

@chris48s done! reporanger.com/docs#e526831839a841748cc551d214f0c546

Also I have just pushed the feature that will keep a branch up to date as long as your branch protection rules require that. Would you like me to enable that feature for you repo?

@chris48s
Copy link
Member

Nice. Yes. Lets give it a try. Thanks

@paulmelnikow
Copy link
Member

@mfix22 I noticed the merge queue is waiting on LGTM to run, which is not a required check, mostly because it is sometimes very slow!

Can I request a feature that only the required checks must pass in order to merge?

Or alternatively, that we can list certain checks to ignore?

@paulmelnikow
Copy link
Member

The automatic branch updating is working!

Screen Shot 2019-09-03 at 8 25 59 PM

@mfix22
Copy link
Author

mfix22 commented May 2, 2020

Hey @paulmelnikow 👋 looks like Ranger no longer has permission to merge your branches. Did a branch protection rule recently get updated? You might have to give Ranger write access to re-enable PR merging.

You can find how to handle this under the "Branch Protection" section of the Repo Ranger docs

@calebcartwright
Copy link
Member

Seems to have just merged one in #5026 no?

@mfix22
Copy link
Author

mfix22 commented May 2, 2020

Oh, okay. Great!

@paulmelnikow
Copy link
Member

Thanks for reaching out!

We had an issue where maintainers couldn't click the "Update Branch" button. It might have been due to a setting on the PR or maybe it was some GitHub fluke. See #5008 (comment)

Maybe that was related?

@mfix22
Copy link
Author

mfix22 commented May 4, 2020

That could be! Thanks @paulmelnikow. I'm just glad it is still working 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Support questions, usage questions, unconfirmed bugs, discussions, ideas
Projects
None yet
Development

No branches or pull requests

4 participants