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

Private repo problem #124

Closed
umaim opened this issue Apr 13, 2019 · 8 comments
Closed

Private repo problem #124

umaim opened this issue Apr 13, 2019 · 8 comments

Comments

@umaim
Copy link

umaim commented Apr 13, 2019

I've read #112 . I have the same problem. But I'm sure my repo was forked from a personal account.

image

I followed the Advanced Setup (with config) to setup my forked private repo, grand permisstion to my forked private repo.

image

.github/pull.yml file looks like

version: "1"
rules:
  - base: master
    upstream: stackia:master
    mergeMethod: hardreset
  - base: hzv2
    upstream: stackia:hzv2
    mergeMethod: hardreset

And set this branch as default.

Go to https://pull.now.sh/check/${owner}/${repo}, it said File not found.

Then I found that the commits after forked not updated.

Did I miss something?

Thank you in advance. :)

@wei
Copy link
Owner

wei commented Apr 13, 2019

The check url currently only works on public repos at this time. Is it still not creating pull requests for you?

@umaim
Copy link
Author

umaim commented Apr 13, 2019

Hey wei:
Thank you for your reply.
There is still no PR for me. 10 commits behind the original repo so far.

image

And I try to reinstall Pull App, still not work.

@wei
Copy link
Owner

wei commented Apr 13, 2019

Thanks for reporting. I will check tonight and report back.

@wei
Copy link
Owner

wei commented Apr 14, 2019

I can reproduce! The REST API Endpoint used to compare changes is returning 404 for private forks when using the Installation Token obtained by our Github App. I have opened a bug ticket with Github and will report back as soon as I hear anything.

@umaim
Copy link
Author

umaim commented Apr 14, 2019

Thank you for your patience, wei.

I look forward to your reply and wish you and your work can be better and better. ❤️

@wei
Copy link
Owner

wei commented Apr 14, 2019

Thanks for reaching out. What you're looking to do is not possible currently. It's not possible to compare two commits for private forks with a GitHub App installation token. The reason why that's not possible is that any installation has access only to public resources and private resources owned by the target of the installation. An installation for target X can't have access to private resources of target Y. The reason why that's not possible is that this is how permissions for GitHub Apps are defined -- an installation of a GitHub App has permissions only for resources owned by the target of the installation.

In most situations, this is not a problem since most functionality is related only to resources owned by a single target. But the compare endpoint is a bit different since it supports comparing across forks, which means that multiple targets are involved.

The team is aware that there are some use-cases where this would be useful, but it would be a fundamental change to how permissions for GitHub Apps work. With that in mind, I don't expect any changes will be made to support this in the near future.

Unfortunately, the installation token does not have access to your fork's parent which is a private repo. The only way around it is a personal token which pull does not currently (or likely to) support. Please let me know If you can think of any other methods.

@wei wei closed this as completed Apr 14, 2019
@dkosnak dkosnak mentioned this issue Mar 25, 2020
@b-zurg
Copy link

b-zurg commented May 3, 2020

@wei I think there might be a solution - to provide a personal access token that grants this permission.

See tgymnich/fork-sync#8

There could potentially, in the configuration, be a token field that is used in lieu of the GITHUB_TOKEN which would widen the scope of permissions.

This would be a life-saver for those of us with private repos who are working with collaborators.

@wei
Copy link
Owner

wei commented May 3, 2020

@b-zurg thanks for the suggestion. Please try out GitHub Actions: git-sync or github-sync. They will allow for maximum flexibility in syncing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants