Giter Site home page Giter Site logo

Comments (6)

lindell avatar lindell commented on August 15, 2024

Could you provide more info on the problem?

My understanding is that you have approval requirements on repositories, but not administrator bypassing. What addition to the merge command would resolve this?

from multi-gitter.

Sam13 avatar Sam13 commented on August 15, 2024

Yes. You cannot merge any PR then when not approved.

GitHub API will provide the following error message if you try to do so:

At least 1 approving review is required by reviewers with write access.

To enable merge, a review with approval review action (event=APPROVE) is required.
The GitHub API is documented here:
https://docs.github.com/en/rest/pulls/reviews#create-a-review-for-a-pull-request
https://docs.github.com/en/graphql/reference/input-objects#addpullrequestreviewinput

I think your GO GitHub library supports that:
https://github.com/google/go-github/blob/master/github/pulls_reviews.go

I suggest to make this approval an optional option maybe with some additional review comments which can be provided?

from multi-gitter.

lindell avatar lindell commented on August 15, 2024

I don't think you can approve your own PR?

Even if you could, this would only work when exactly one required reviewer is set, anything more than that would not work.

from multi-gitter.

Sam13 avatar Sam13 commented on August 15, 2024

I don't think you can approve your own PR?

No you can't. Sorry for being unprecise in my initial description.

This feature would be useful e.g. to bulk approve and merge Dependabot PRs or PRs that somebody else created (with multi-gitter).
If you have the policy that administrators cannot bypass branch protection and use multi-gitter, you'll end up with hundreds of pull request which need to be manually approved and merged.

Even if you could, this would only work when exactly one required reviewer is set, anything more than that would not work.

Valid point, then maybe approval should be a separate command?

from multi-gitter.

lindell avatar lindell commented on August 15, 2024

This feature would be useful e.g. to bulk approve and merge Dependabot PRs or PRs that somebody else created (with multi-gitter).

Even though the merge/close/status commands can be used on PRs not created by multi-gitter, it's not really the use case. If users use those commands for it, that's fine, but changes will not be made because of it.

then maybe approval should be a separate command?

I think this is the solution if one were to be implemented 🙂
But currently, I think this is a special case since the setting, that not even administrators should be able to override a merge indicate that it should indeed not be overridden in any way. And creating a new sub command for this special case is today not relevant. But I'm open to having my mind changed if a lot of people have this use case. I will therefore leave this open and allow others to comment if they have this use case.

from multi-gitter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.