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

ASH - URL Check Broken #126

Closed
Ki-er opened this issue Dec 5, 2023 · 3 comments
Closed

ASH - URL Check Broken #126

Ki-er opened this issue Dec 5, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@Ki-er
Copy link

Ki-er commented Dec 5, 2023

https://github.com/awesome-selfhosted/awesome-selfhosted-data/actions/runs/7093386497/job/19306662014#step:4:2210

ASH link check seems to have died. The maintained project is alive though.

@nodiscc
Copy link
Owner

nodiscc commented Dec 5, 2023

Thanks for reporting this.

This is because an invalid URL was supplied in one of the homepage_url attributes:

requests.exceptions.InvalidURL: Invalid URL 'https:/stalw.art': No host supplied

The URL is missing a /. The easiest fix is, of course, to correct it.

This error was not detected early (during checks on the pull request awesome-selfhosted/awesome-selfhosted-data#318) because URL checks are not run on Pull Requests in awesome-selfhosted-data (https://github.com/awesome-selfhosted/awesome-selfhosted-data/blob/master/.github/workflows/pull-request.yml). Adding automatic URL checks on Pull Requests would re-check all URLs in all data files (very long, lots of useless requests, URL check errors on other files will still cause the workflow to fail), because hecat currently lacks the capability to work on a diff/modified files between two branches in a git repository.

I originally reported this in #77, then closed it because it was not apparent what problem it would solve. But now I think we have a prime example.

The url_check module should be able to only check URLs in files that were changed between two branches.

Github actions provides environment variables GITHUB_BASE_REF and GITHUB_HEAD_REF which could be passed to the url_check module (e.g. URL_CHECK_BASE_REF=$GITHUB_BASE_REF HEAD_REF=$GITHUB_HEAD_REF hecat --config .hecat/url-check.yml)

@nodiscc
Copy link
Owner

nodiscc commented Dec 5, 2023

#77 reopened to track this possible enhancement.

URL checks on awesome-selfhosted-data fixed in awesome-selfhosted/awesome-selfhosted-data#415

Thanks again

@nodiscc nodiscc closed this as completed Dec 5, 2023
nodiscc added a commit to awesome-selfhosted/awesome-selfhosted-data that referenced this issue Dec 5, 2023
@nodiscc
Copy link
Owner

nodiscc commented Dec 5, 2023

See also #127 (the program should just report this InvalidURL as an error, and carry on with other checks)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants