Skip to content
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

Fix URL links of logs in Github Actions #3185

Closed

Conversation

geokats7
Copy link

The Problem
In GitHub Actions the URL generated from the following log output is not parsed correctly because of the trailing period(.)
logger.info(f'Initializing environment for {repo}.') and it leads to a 404/Not Found page.

These are some examples:

[INFO] Initializing environment for https://github.com/Yelp/detect-secrets.git.
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-isort.
[INFO] Initializing environment for https://github.com/ambv/black.
[INFO] Initializing environment for https://github.com/PyCQA/flake8.git.

The Effect
Having a broken link in the logs output undermines the project's credibility and could frustrate users. It's unfortunate because "pre-commit" is a widely-used and highly maintained project.

The Fix
The PR just removes the trailing period from the log output.
I believe this is a useful change because it doesn't remove any information while it restores the functionality of the URL links in GitHub Actions console.

@geokats7
Copy link
Author

Hmm...I'm not sure why some of the tests are still failing.
@asottile Any help would be appreciated, thanks!

@asottile
Copy link
Member

please search for duplicates

@asottile asottile closed this Apr 22, 2024
@geokats7
Copy link
Author

@asottile You're right I just saw the duplicate. However, I wonder why the change shouldn't be incorporated since the issue keeps coming up every now and then.

@asottile
Copy link
Member

for the same reasons it was declined in the duplicate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants