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

Don't require write access to repository when moderation=true, fork instead of branch #98

Open
meygerjos opened this issue Apr 18, 2017 · 4 comments

Comments

@meygerjos
Copy link

The staticman github bot shouldn't need write access to the repository if moderation is set to true. Instead of branching and making a pull request, it can fork and make a pull request. This way there is less at stake if the bot is compromised.

@meygerjos meygerjos changed the title Don't require write access to repository when moderation=true, clone instead of branch Don't require write access to repository when moderation=true, clone instead of branch Apr 18, 2017
@meygerjos meygerjos changed the title Don't require write access to repository when moderation=true, clone instead of branch Don't require write access to repository when moderation=true, fork instead of branch Apr 18, 2017
@fabacab
Copy link

fabacab commented Apr 20, 2017

The Gitter Badger works this way, FWIW.

@meygerjos
Copy link
Author

meygerjos commented Apr 20, 2017

So I tracked down the documentation for the github Node.js module being used, and apparently it explicitly disallows pull requests from separate repositories. In Pull Requests - Create:

The branch (or git ref) you want your changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repo that requests a merge to a base of another repo.

This is strange. This Node.js module is a wrapper for the github API, which allows such pull requests. The notorious GitHub bot image-optimiser used the Ruby gem httparty to directly access the API and make such pull requests, as can be seen in its source code. The github API has not disallowed this since image-optimiser was active, since Gitter Badger still does it, as @meitar pointed out.

@eduardoboucas
Copy link
Owner

This sounds interesting. I'd love to see a PR! :)

@meygerjos
Copy link
Author

Actually I misinterpreted the documentation for the github module. It's totally possible to pull in changes from a separate repository. All that the passage in the documentation said is that the repository that changes are being pulled into must be the same repository that has the pull request on it, which makes a lot of sense.

caiopavanelli pushed a commit to caiopavanelli/staticman that referenced this issue Aug 17, 2020
Add background-position to bigimg's configurable per image.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants