astral-sh / ruff-pre-commit

A pre-commit hook for Ruff.
Apache License 2.0
919 stars 41 forks source link

Remove "v" from the Ruff version number in link to release notes #92

Closed Tenzer closed 3 months ago

Tenzer commented 3 months ago

Summary

Starting with version 0.5.0 of Ruff, the release/tag name doesn't have a leading "v". This has broken the link to the release notes that get added to the release notes for the pre-commit hook.

This fixes it by stripping any "v" from the version number string.

See #91.

Test Plan

Tested in a bash shell:

bash-5.2$ TAG_NAME=v0.5.0
bash-5.2$ echo ${TAG_NAME/v}
0.5.0

Will otherwise have to be tested on the next Ruff release.

CoderJoshDK commented 3 months ago

The actual fix is to remove v from the tag. I can do that alongside the changes in https://github.com/astral-sh/uv-pre-commit/pull/11. Just need to know if I am clear to make the changes from that PR in this repo too (all changes made after notes, if there are any)

Tenzer commented 3 months ago

I didn't want to change the format of the tag created in this repository, in case it would break how pre-commit autouodate works.

Have you checked that it still works and picks up the latest version if the "v" prefix is removed?

CoderJoshDK commented 3 months ago

Very understandable concern. pre-commit autoupdate grabs the FETCH_HEAD's tag. (The command is slightly more complicated; but it basically is git describe FETCH_HEAD --tags --abbrev=0)

But more generally, we know that it doesn't require the v, because uv-pre-commit doesn't have a v. (https://github.com/astral-sh/uv-pre-commit/issues/5)