nephila / giturlparse

Parse & rewrite git urls (supports GitHub, Bitbucket, Assembla ...)
https://pypi.python.org/pypi/giturlparse
Apache License 2.0
29 stars 22 forks source link

Fix Gitlab parsing for repo with `-` #76

Closed boozec closed 10 months ago

boozec commented 10 months ago

Hi all :wave: unfortunately the branch rename closed the old PR at https://github.com/nephila/giturlparse/pull/74

Description

Gitlab URLs has the format with "/-/blob/". This PR fixs the parser editing the FORMAT string with the "/-/" before the ('blob'|'tree').

eg: The string "https://gitlab.com/gitlab-org/gitlab/blob/master/README.md" is valid as "https://gitlab.com/gitlab-org/gitlab/-/blob/master/README.md".

References

Fixs https://github.com/nephila/giturlparse/issues/42

Checklist

protoroto commented 10 months ago

@boozec Thanks a lot! Will make @yakky review the code!

codecov[bot] commented 10 months ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@4f783b3). Click here to learn what that means. Patch has no changes to coverable lines.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #76 +/- ## ========================================= Coverage ? 94.22% ========================================= Files ? 12 Lines ? 225 Branches ? 49 ========================================= Hits ? 212 Misses ? 10 Partials ? 3 ``` | [Flag](https://app.codecov.io/gh/nephila/giturlparse/pull/76/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nephila) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/nephila/giturlparse/pull/76/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nephila) | `94.22% <0.00%> (?)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nephila#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

protoroto commented 10 months ago

@boozec Sorry to bother, but after merging master branch into yours tests are broken: is there any chance you can have a look at it?

boozec commented 10 months ago

Hi @protoroto it was caused by a typo with a ~. It should work again now :)

protoroto commented 10 months ago

Hi @protoroto it was caused by a typo with a ~. It should work again now :)

Thank you very much! I really hope we'll be able to merge this and release a new version as soon as possible!