fix: file labels in GitLab releases, to ensure they're unique.
Previously GitLab lables were just the basename for files uploaded as part of the release. This is problematic because GitLab doesn't allow conflicting labels -- a condition that could be caused by uploading a release with two files by the same name in different directories. This would generate a 409 Conflict error.
This changes the labels for files uploaded as part of a release to the name relative to pkgRoot, or the package.
A project may look like this
pkg pkg \ foo \ baz pkg \ bar \ baz
This would previously result in two conflicting labels of 'baz'. Now you would have {"foo/baz", "bar/baz"} with no conflict.
GitHub issues: #265, #158
The force pushes are all commit message. I linked it to the issues and fixed some typos.
It may be worth documenting too, but you would use this feature like this
["@semantic-release/gitlab", {
"gitlabUrl": "https://gitlab.awe.eco.cpanel.net/",
"pkgRoot": "dist/cpanel/angular-validators",
"assets": [
{"path": "dist/cpanel/angular-validators/**", "label": "Dist output"}
]
}]
Now all things found in dist/cpanel/angular-validators/ have their label in the release relative to the pkgRoot
I rebased this can I get some input on it?
This PR has been stale for nearly two years now, so I'm closing it.
Feel free to send a new PR if you want this 🙇
It was stale because you never gave any input on it lol. Despite being asked by others in the same issues https://github.com/semantic-release/gitlab/issues/265#issuecomment-1009940657
Ha wow, too ambitious in cleaning up. Sorry!
@EvanCarroll I'll review tomorrow or early next week. Can you rebase once more? 🙇
@EvanCarroll Do you still want to tackle this? If not someone else could take over.
@EvanCarroll shall somebody else take over for you or do you want to continue here?