nodiscc / hecat

Generic automation tool around data stored as plaintext YAML files
GNU General Public License v3.0
29 stars 5 forks source link

processors/awesome-lint/url_check: add an option to only check contents of a diff #77

Open nodiscc opened 1 year ago

nodiscc commented 1 year ago

E.g. for https://github.com/awesome-selfhosted/awesome-selfhosted-data/pull/10/files, only files that have changed should be checked.

~/GIT/awesome-selfhosted-data (master *%=)$ git diff master...add-glewlwyd --name-only 
software/glewlwyd.yml
nodiscc commented 10 months ago

Reopening, as diagnosed in https://github.com/nodiscc/hecat/issues/126

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)