-
Notifications
You must be signed in to change notification settings - Fork 255
Unexpected & Invalid urls generated in changelog #1204
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
Labels
bug
Something isn't working properly
Comments
Thanks. Will take a look. |
It has been 60 days since the last update on this confirmed issue. @python-semantic-release/team can you provide an update on the status of this issue? |
codejedi365
added a commit
to codejedi365/python-semantic-release
that referenced
this issue
May 5, 2025
…are common letters The change adjusts the url normalization computation to remove any path prefix and only the path prefix even when letters are shared with the rest of the url path. Resolves: python-semantic-release#1204
6 tasks
codejedi365
added a commit
to codejedi365/python-semantic-release
that referenced
this issue
May 5, 2025
…are common letters The change adjusts the url normalization computation to remove any path prefix and only the path prefix even when letters are shared with the rest of the url path. Resolves: python-semantic-release#1204
codejedi365
added a commit
to codejedi365/python-semantic-release
that referenced
this issue
May 5, 2025
…are common letters The change adjusts the url normalization computation to remove any path prefix and only the path prefix even when letters are shared with the rest of the url path. Resolves: python-semantic-release#1204
codejedi365
added a commit
to codejedi365/python-semantic-release
that referenced
this issue
May 5, 2025
…are common letters The change adjusts the url normalization computation to remove any path prefix and only the path prefix even when letters are shared with the rest of the url path. Resolves: python-semantic-release#1204
codejedi365
added a commit
to codejedi365/python-semantic-release
that referenced
this issue
May 5, 2025
…are common letters The change adjusts the url normalization computation to remove any path prefix and only the path prefix even when letters are shared with the rest of the url path. Resolves: python-semantic-release#1204
codejedi365
added a commit
to codejedi365/python-semantic-release
that referenced
this issue
May 5, 2025
…are common letters The change adjusts the url normalization computation to remove any path prefix and only the path prefix even when letters are shared with the rest of the url path. Resolves: python-semantic-release#1204
🎉 This issue has been resolved in Version 9.21.1 🎉You can find more information about this release on the GitHub Releases page. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
Description
In remote_hvcs_base.py, the following functions have an improper usage of lstrip:
They are all accompanied by the comment:
"Ensure any path prefix is transfered but not doubled up on the derived url"
The code: path=f"{self.hvcs_domain.path or ''}/{path.lstrip(self.hvcs_domain.path)}",
Does not work as desired. lstrip does not look for the entire input as a whole, rather it processes it character by character. This causes issues if the domain from the configuration file has additional path parameters, and the repo "owner" have over lapping characters. This leads to improper URLs being given for links in the changelog.
For example:
domain = "https://bitbucket.company.com/projects/demo-foo"
owner (taken from git) = foo
repo (taken from git) = baz
Expected behavior
The URL for the commit in the changelog is:
https://bitbucket.company.com/projects/demo-foo/foo/baz/commit/
Actual behavior
The URL for the commit in the changelog is:
https://bitbucket.company.com/projects/demo-foo/baz/commit/
The /foo is now missing because it is being removed by the lstrip, since the characters o/f all existing at the start of the commit string.
Environment
pip freeze
certifi==2025.1.31
charset-normalizer==3.4.1
click==8.1.8
click-option-group==0.5.6
coverage==7.6.12
darglint==1.8.1
Deprecated==1.2.18
docutils==0.21.2
dotty-dict==1.3.1
flake8==6.1.0
flake8-docstrings==1.7.0
Flake8-pyproject==1.2.3
gitdb==4.0.12
GitPython==3.1.44
idna==3.10
importlib_resources==6.5.2
isort==6.0.1
Jinja2==3.1.5
lxml==5.3.1
m2r2==0.3.3.post2
markdown-it-py==3.0.0
MarkupSafe==3.0.2
mccabe==0.7.0
mdurl==0.1.2
mistune==0.8.4
mypy==1.15.0
mypy-extensions==1.0.0
parameterized==0.9.0
pep8-naming==0.14.1
pycodestyle==2.11.1
pydantic==2.0.3
pydantic_core==2.3.0
pydocstyle==6.3.0
pyflakes==3.1.0
Pygments==2.19.1
python-gitlab==4.13.0
python-semantic-release==9.21.0
regex==2024.11.6
requests==2.32.3
requests-toolbelt==1.0.0
rich==13.9.4
shellingham==1.5.4
smmap==5.0.2
snowballstemmer==2.2.0
Sphinx==8.2.3
sphinx-argparse==0.5.2
sphinxcontrib-confluencebuilder==2.11.0
toml==0.10.2
toml-cli==0.7.0
tomlkit==0.13.2
typer==0.15.2
types-toml==0.10.8.20240310
typing_extensions==4.12.2
unittest-xml-reporting==3.2.0
urllib3==2.3.0
wrapt==1.17.2
git log --oneline --decorate --graph --all -n 50
N/A
Configuration
Semantic Release Configuration
Build System Configuration
[tool.semantic_release.remote]
type = "bitbucket"
domain = 'https://bitbucket.company.com/bddc/projects'
GitHub Actions Job Definition
N/A
Execution Log
N/A
semantic-release -vv command
N/A
Additional context
The text was updated successfully, but these errors were encountered: