From 7e97f588e2e26a467195507c3a716f7305b18f56 Mon Sep 17 00:00:00 2001 From: nodiscc Date: Sat, 29 Jul 2023 17:57:57 +0200 Subject: [PATCH] tools: github actions: fail/display red badge when unmaintained projects are detected - lower error/warning days threshold, but only for the scheduled/daily check (leave thresholds unchanged for pull requests/pre-build checks) - error if 365 days without updated, warning if 186 days without updates - update hecat to v1.1.0 https://github.com/nodiscc/hecat/releases/tag/1.1.0 - fixes https://github.com/awesome-selfhosted/awesome-selfhosted-data/issues/50 --- .github/workflows/check-unmaintained-projects.yml | 2 +- .hecat/awesome-lint-strict.yml | 12 ++++++++++++ .hecat/awesome-lint.yml | 2 +- Makefile | 7 ++++++- 4 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 .hecat/awesome-lint-strict.yml diff --git a/.github/workflows/check-unmaintained-projects.yml b/.github/workflows/check-unmaintained-projects.yml index 97827eb020..3320632627 100644 --- a/.github/workflows/check-unmaintained-projects.yml +++ b/.github/workflows/check-unmaintained-projects.yml @@ -18,4 +18,4 @@ jobs: steps: - uses: actions/checkout@v3 - run: make install - - run: make awesome_lint + - run: make awesome_lint_strict diff --git a/.hecat/awesome-lint-strict.yml b/.hecat/awesome-lint-strict.yml new file mode 100644 index 0000000000..15229411b2 --- /dev/null +++ b/.hecat/awesome-lint-strict.yml @@ -0,0 +1,12 @@ +# doc: https://github.com/nodiscc/hecat/blob/master/hecat/processors/awesome_lint.py +steps: + - name: check data against awesome-selfhosted guidelines (strict) + module: processors/awesome_lint + module_options: + source_directory: ./ + items_in_delegate_to_fatal: False + last_updated_error_days: 365 + last_updated_warn_days: 186 + licenses_files: + - licenses.yml + - licenses-nonfree.yml diff --git a/.hecat/awesome-lint.yml b/.hecat/awesome-lint.yml index fd9cec04ef..2f74378836 100644 --- a/.hecat/awesome-lint.yml +++ b/.hecat/awesome-lint.yml @@ -1,6 +1,6 @@ # doc: https://github.com/nodiscc/hecat/blob/master/hecat/processors/awesome_lint.py steps: - - name: data against awesome-selfhosted guidelines + - name: check data against awesome-selfhosted guidelines module: processors/awesome_lint module_options: source_directory: ./ diff --git a/Makefile b/Makefile index d9498ccf09..b87ba92ab9 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ install: python3 -m venv .venv source .venv/bin/activate && \ pip3 install wheel && \ - pip3 install --force git+https://github.com/nodiscc/hecat.git@1.0.2 + pip3 install --force git+https://github.com/nodiscc/hecat.git@1.1.0 .PHONY: import # import data from original list at https://github.com/awesome-selfhosted/awesome-selfhosted import: clean install @@ -30,6 +30,11 @@ awesome_lint: source .venv/bin/activate && \ hecat --config .hecat/awesome-lint.yml +.PHONY: awesome_lint # check data against awesome-selfhosted guidelines (strict) +awesome_lint_strict: + source .venv/bin/activate && \ + hecat --config .hecat/awesome-lint-strict.yml + .PHONY: export_markdown # render markdown export from YAML data (https://github.com/awesome-selfhosted/awesome-selfhosted) export_markdown: rm -rf awesome-selfhosted/