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

Fix pointing GitHub sources to PRs #6241

Merged
merged 2 commits into from
Jan 6, 2023
Merged

Conversation

deivid-rodriguez
Copy link
Member

@deivid-rodriguez deivid-rodriguez commented Jan 5, 2023

What was the end-user or developer problem that led to this PR?

Recent refactorings in git sources to use shallow clones when possible broke pointing to GitHub PRs.

Git sources are now more strict and require that the parameter the :branch to be an actual branch, and the parameter to :tag to be an actual branch. For arbitrary refs, which is what pointing to GitHub pull requests use under the hood, ref should be used.

What is your fix for the problem, implemented in this PR?

This PR changes Bundler to use ref internally for handling PR URLs given as the value for the :github parameter.

Fixes #6239.

Make sure the following tasks are checked

Copy link

@etiennebarrie etiennebarrie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works for me. Thanks for the quick fix!

Maybe there's some kind of integration test missing showing that gem "foo", github: "https://github.com/foo/foo/pull/123" works in its entirety, from the DSL to the fetching and installing.

@deivid-rodriguez
Copy link
Member Author

Definitely, otherwise we would've caught this. It did not seem super easy though, so I decided to pass on adding a spec here.

@deivid-rodriguez
Copy link
Member Author

I added a realworld spec in the end, just to get the feature covered.

@deivid-rodriguez deivid-rodriguez changed the title Fix pointing git sources to PRs Fix pointing GitHub sources to PRs Jan 6, 2023
@deivid-rodriguez deivid-rodriguez merged commit d824d4e into master Jan 6, 2023
@deivid-rodriguez deivid-rodriguez deleted the fix-pointing-to-pr branch January 6, 2023 13:13
deivid-rodriguez added a commit that referenced this pull request Jan 6, 2023
Fix pointing git sources to PRs

(cherry picked from commit d824d4e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't fetch GitHub gem with pull request URL starting with 2.4.0
2 participants