-
Notifications
You must be signed in to change notification settings - Fork 55
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
With github pullrequests work on target repo rather than the source #816
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Timor Raiman <[email protected]>
Any change someone can take a look on this 2 PR's? |
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## master #816 +/- ##
==========================================
- Coverage 47.87% 47.53% -0.34%
==========================================
Files 2 2
Lines 282 284 +2
Branches 76 77 +1
==========================================
Hits 135 135
- Misses 147 149 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
The problem is that there is currently no active maintainer for We could consider using a custom/forked version of |
@@ -555,10 +555,13 @@ done`; | |||
// being built. | |||
let repoFullName = process.env.GITHUB_REPOSITORY as string; | |||
if (github.context.payload.pull_request) { | |||
repoFullName = github.context.payload.pull_request.head.repo.full_name; | |||
repoFullName = github.context.payload.pull_request.base.repo.full_name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correctly, the git commit for the "PR merge" commit that we are trying to check out is only available on the target repo (i.e., the original repo against which the PR was opened), correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct. But even more critically, the token which GH generates automatically in the target repo is not valid in the source repo (which is not public).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@christophebedard since there is no one maintaining vcstool, and this tool is maintained.
Would you consider dropping usage of vctools and clone repos in a different way?
Might be easier then trying to fix it in 2 repos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But even more critically, the token which GH generates automatically in the target repo is not valid in the source repo (which is not public).
Got it.
since there is no one maintaining vcstool, and this tool is maintained.
The goal is for OSRF to get maintainer access eventually, but that's going to take some time.
Would you consider dropping usage of vctools and clone repos in a different way?
Might be easier then trying to fix it in 2 repos
For the repo being tested, yes, that's a good idea. Running plain old git
commands instead of using vcstool
would just be simpler here. Would you be willing to make this change? I wouldn't change anything about the vcs-repo-file-url
option (for other repos), though.
This provides support for private forks, where GITHUB_TOKEN generated by GH in the target repo pull request context does not provide access to the pull request's source repo.
This requires vcstool to be fixed to properly support checking out sources by hash, rather than a branch or tag, because a pull request's source branch does not exist in the destination repository. Rather, the patch can be accessed as refs/pr/123/head or refs/pr/123/merge. With github.context.sha being equivalent to the resolved commit hash of refs/pr/123/merge.