-
Notifications
You must be signed in to change notification settings - Fork 93
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
Handle Gitlab subgroups #74
Comments
Are you working on a PR for this @mspangdal ? How do you use the library? Jenkins plugin? |
Yeah, Jenkins plugin. I don't have a clear idea of how to solve it yet so just looking at the code for now |
Ok. When using it in Jenkins, in a pipeline, you can probably determine the group somehow using plain old groovy code. And then use that value in the template... So that Groovy will substitute that variable first, before Mustache will substitute the other variables. Something like this: def groupName = //TODO: parse values from git clone URL here...
def changelogString = gitChangelog returnType: 'STRING',
from: [type: 'REF', value: 'git-changelog-1.50'],
to: [type: 'REF', value: 'master'],
template: """
GroupName: ${groupName}
...
Rest of the template here...
""" |
Thats a good point, quick way forward! |
The {{ownerName}} and {{repoName}} doesn't seem to be correctly populated given a gitlab url such as:
https://gitlab.server/Group/SubGroup/Project.git
In this case ownerName is set to SubGroup and Group is ignored
More on subgroups in Gitlab: https://docs.gitlab.com/ee/user/group/subgroups/
For our use case it would be sufficient if Subgroups are treated as part of the Project name ownerName is set to the parent Group as would be expected
But I suppose this introduces more edge cases where gitlab is not hosted at the root of the domain?
The text was updated successfully, but these errors were encountered: