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

Use GitHub Pull Request reference for merging #257

Merged
merged 1 commit into from
Oct 29, 2019

Conversation

sbesson
Copy link
Member

@sbesson sbesson commented Oct 25, 2019

Rather than fetching the forks, this fetches the remote associated with the
pull request as described in https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/checking-out-pull-requests-locally.

In the case of deleted forks, this should improve the robustness of the merge
command. It might also result in slight performance improvements as only the
relevant commits will be fetched as opposed to all the branches of the forks.

See also #219 which is a RFE using a similar strategy for the rebase command

Rather than fetching the forks, this fetches the remote associated with the
pull request as described
https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/checking-out-pull-requests-locally.
In the case of deleted forks, this should improve the robustness of the merge
command. It might also result in slight performance improvements as only the
relevant commits will be fetches rather than all the branches of the forks.
@knabar
Copy link
Member

knabar commented Oct 29, 2019

After initial testing, it looks like this PR also solves an issue I ran into with private repositories, where the build system does not have access to the private forks.

My approach was to use the GitHub token and the https://user:token@github.com/... style for remote URLs, but this approach is much simpler and cleaner, as it does not require passing the token all the way from argument parsing down to the merge method.

@sbesson
Copy link
Member Author

sbesson commented Oct 29, 2019

Thanks @knabar for testing this and glad to see it is helping in a different context than the one targeted originally.
Proposing to get this merged and released as a quick 0.12.6 /cc @joshmoore

@sbesson sbesson merged commit fb9a742 into ome:master Oct 29, 2019
@sbesson sbesson deleted the merge_pull branch October 29, 2019 12:17
@sbesson
Copy link
Member Author

sbesson commented Oct 29, 2019

Now released as https://pypi.org/project/scc/0.12.6/

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

Successfully merging this pull request may close these issues.

2 participants