Closed trakos closed 3 years ago
Merging #3 (b2ab777) into master (ae1fca2) will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## master #3 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 133 133
===========================================
Files 16 16
Lines 364 365 +1
===========================================
+ Hits 364 365 +1
Impacted Files | Coverage Δ | |
---|---|---|
src/Url/GitGenerator.php | 100.00% <100.00%> (ø) |
|
src/Url/GitlabGenerator.php | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update ae1fca2...b2ab777. Read the comment docs.
Thanks @trakos! ❤️
I appreciate the quick merge @IonBazan ! 🙇 Your change definitely makes sense, it's better to give link to the target release.
Hey,
first of all, thanks for the great package. I found a minor bug when using it with gitlab repositories.
Gitlab allows creating subgroups, for instance here is one of the gitlab repostiories: https://gitlab.com/gitlab-org/ci-cd/shared-runners/images/gcp/windows-containers . The source git path for that repo has many
/
signs:The regex that is used to substitute package url does not allow for that, it only allows single
/
sign in path. As a result, it generated a line like that for me:As you can see, it left the
git@
part in the comparison link, becausepreg_replace
pattern didn't match anything.I propose a simple fix that allows
/
in repository namespaces.Additionally, comparison links across forks like:
don't work on gitlab for me, they have slightly different syntax:
Unfortunately, we cannot generate it without knowing internal numerical project id, so I propose to simply return null in gitlab links generator when project namespaces don't match.