Skip to content

Commit

Permalink
COMP: Fix pull request description generated by pre-commit-autoupdate…
Browse files Browse the repository at this point in the history
… workflow

Update workflow introduced in 0f047b6 ("COMP: Add Github workflow for
keeping pre-commit configuration up-to-date", 2024-03-17) ensuring the
compare links referenced in the pull request description are correct.
  • Loading branch information
jcfr authored and jamesobutler committed Apr 11, 2024
1 parent 00878d6 commit 0e6b779
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/pre-commit-autoupdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,12 @@ jobs:
import sys
for line in sys.stdin:
match = re.match(r"\[https://github.com/([^/]+/[^/]+)\] updating (v[\d.]+) -> (v[\d.]+)\.", line.strip())
match = re.match(r"\[https://github.com/([^/]+/[^/]+)\] updating (v[\d.]+) -> (v[\d.]+)", line.strip())
if match:
repo_url = match.group(1)
old_version = match.group(2)
new_version = match.group(3)
repo_name = repo_url.split('/')[-1]
print(f"- [{repo_url}: {old_version} -> {new_version}](pre-commit/{repo_name}@{old_version}...{new_version})")
print(f"- [{repo_url}: {old_version} -> {new_version}](https://github.com/{repo_url}/compare/{old_version}...{new_version})")
EOF
- name: Parse autoupdate output
Expand Down

0 comments on commit 0e6b779

Please sign in to comment.