-
Notifications
You must be signed in to change notification settings - Fork 175
support virtual packages on generic git hosts (Gitea) #587
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
Changes from 4 commits
4d5135f
cc79114
3dedd94
8cfcd22
13dbf73
c386e89
e455776
ab09b7a
4fb6dcd
0b3460c
8cc38d8
47b8051
22cc4e7
ea3fd0c
00f88e7
fb75924
77c077d
dbaa48b
8b56ffa
d55b754
8e3e078
179ce53
1d74243
d183107
b4af12d
c1f4d49
77e2d02
4a6ea32
59308a9
825361c
2049524
a509b96
c006e9a
13fd8cd
3928c24
3c76c96
d7d7b90
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,7 @@ | |
| is_artifactory_path, | ||
| is_azure_devops_hostname, | ||
| is_github_hostname, | ||
| is_gitlab_hostname, | ||
| is_supported_git_host, | ||
| parse_artifactory_path, | ||
| unsupported_host_error, | ||
|
|
@@ -580,10 +581,18 @@ def _detect_virtual_package(cls, dependency_str: str): | |
| for seg in path_segments | ||
| ) | ||
| has_collection = "collections" in path_segments | ||
| # GitLab supports nested groups (group/subgroup/repo), so the full | ||
| # path is the repo -- no shorthand subdirectory splitting. | ||
| # Use https://gitlab.com/group/subgroup/repo.git for GitLab nested | ||
| # groups; shorthand subdirectory syntax is not supported for GitLab. | ||
| # All other generic hosts (Gitea, Bitbucket, self-hosted, etc.) use | ||
| # the owner/repo convention, so extra segments are a virtual subdir. | ||
|
danielmeppiel marked this conversation as resolved.
Outdated
|
||
| if has_virtual_ext or has_collection: | ||
| min_base_segments = 2 | ||
| else: | ||
| elif is_gitlab_hostname(validated_host): | ||
| min_base_segments = len(path_segments) | ||
| else: | ||
| min_base_segments = 2 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocking: This sets But your tests ( This is the root cause of the 4 CI failures. Either:
The Copilot bot suggested the first option -- I agree that's safer, since Gitea also supports nested orgs/groups.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, you are correct. but when I go with this logic and try to use the below structure of gitea repo to install, I am facing the issue and installation process is not completing. So, I have added this logic to work with the below structure of gitea repo to mention in apm.yml file. apm install gitea.host.com/group/repo/skills/create-pull-request#Skill_Feature |
||
| else: | ||
|
ganesanviji marked this conversation as resolved.
|
||
| min_base_segments = 2 | ||
|
|
||
|
|
@@ -734,7 +743,7 @@ def _parse_standard_url( | |
| user_repo = "/".join(parts[1:]) | ||
| else: | ||
| user_repo = "/".join(parts[1:3]) | ||
| elif len(parts) >= 2 and "." not in parts[0]: | ||
| elif len(parts) >= 2 and ("." not in parts[0] or validated_host is not None): | ||
| if not host: | ||
| host = default_host() | ||
| if is_azure_devops_hostname(host) and len(parts) >= 3: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.