Comments (8)
Hi, indeed I never tested the app on forks.
I will probably have to make some developments on the upstream libraries github-cherry-pick and github-rebase to make it work. Not sure yet if it will be a quick fix or not but I'm determined to support the fork use case.
from autorebase.
I have the same expectations as @gep13. It would be awesome if autorebase could meet those expectations. 😄
from autorebase.
@tibdex woo hoo! Let us know if you need any beta testers. Happy to help out!
from autorebase.
So, I investigated a bit and I have bad news. When making the necessary changes to support fork-PRs where the HEAD branch is from another repo (one that forked the original one), the Autorebase GitHub App doesn't have permission to force-push on this HEAD branch. Even if the author of the PR checked the "Allow edits from maintainers" box. The error is:
{ HttpError: Resource not accessible by integration
at response.text.then.message (/home/tibdex/autorebase/node_modules/@octokit/rest/node_modules/@octokit/request/lib/request.js:56:27)
at process._tickCallback (internal/process/next_tick.js:68:7)
name: 'HttpError',
status: 403,
headers: { /* [REDACTED] */ },
request:
{ method: 'PATCH',
url:
'https://api.github.com/repos/tibdest/github-apps-test/git/refs/heads/master',
headers:
{ accept: 'application/vnd.github.v3+json',
'user-agent': 'octokit.js/16.22.0 Node.js/10.13.0 (macOS Mojave; x64)',
authorization: 'token [REDACTED]',
'content-type': 'application/json; charset=utf-8' },
body:
'{"force":true,"sha":"51a378a1a094378768036501627f5268caddc796"}',
request: { validate: [Object] } },
documentation_url:
'https://developer.github.com/v3/git/refs/#update-a-reference' }
The rejected request is this one.
Even if the owner of the fork were to install Autorebase on its repo, the GitHub App installation ID would be different so I'm quite sure it wouldn't help.
So I guess supporting fork-PRs cannot be done with the current design.
If you have any ideas to support it, I would be happy to hear them ;)
from autorebase.
@tibdex thank you for taking the time to investigate this!
To help me understand the infrastructure a little bit...
What is the difference between me as a user force pushing to the branch on the fork, which is allowed, and the autorebase app?
from autorebase.
What is the difference between me as a user force pushing to the branch on the fork, which is allowed, and the autorebase app?
I don't know precisely how GitHub handles permissions for the "Allow edits from maintainers" option but I guess it only works for real users (actual accounts) and not GitHub applications.
from autorebase.
@tibdex said..
I don't know precisely how GitHub handles permissions for the "Allow edits from maintainers" option but I guess it only works for real users (actual accounts) and not GitHub applications.
Yeah, that could well be it.
from autorebase.
If I provide you with an OAuth token to use I think that you will have permission to act on my behalf and rebase from a fork if "Allow edits from maintainers" is checked.
That requires creating an OAuth app instead of a Github app.
So when we register you'll need to get a token from the user using the web flow authentication and you'll be able to use that token to impersonate the user.
from autorebase.
Related Issues (15)
- Describe whether the service is free or not and how long it will stay around HOT 1
- Working with CI HOT 2
- Clarify how / why labels are added or removed HOT 3
- Adding the label does not trigger autorebase HOT 8
- What if I want the autorebase feature but not the automerge ? HOT 11
- Optional rebase + merge --no-ff HOT 4
- Rebase failed: Not Found HOT 3
- Concurrent rebasing of the same PR HOT 6
- Merge strategies: How to squash'n'merge by default but also allow rebase HOT 1
- When autorebase does it's job, development status in Jira is outdated for a while HOT 1
- Missing instructions for running tests HOT 1
- Github Rate Limit HOT 1
- Public instance down HOT 3
- Explain the alternatives better in the README
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autorebase.