-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat(git): add subdir support to GitReference #12131
Conversation
- Add subdir field to GitReference class for specifying subdirectory - Update get_url_for_file_path to handle subdir correctly - Add test cases for both GitHub and GitLab URL generation Co-Authored-By: [email protected] <[email protected]>
…tation Co-Authored-By: [email protected] <[email protected]>
git_ref = GitReference(repo="https://gitlab.com/org/repo", url_subdir="dbt") | ||
assert ( | ||
git_ref.get_url_for_file_path("model.sql") | ||
== "https://gitlab.com/org/repo/-/blob/main/dbt/model.sql" |
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.
I'm not familiar with gitlab and this -
in the middle called my attention.
Apparently, the dashless variant also works https://gitlab.com/gitlab-org/gitlab/-/issues/365984
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.
huh interesting
The /-/
stuff was already in there, and given that it still works, I don't think it makes sense to change right now
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.
LGTM
Checklist