mirror of
https://github.com/rothgar/awesome-tuis.git
synced 2026-10-17 13:21:14 -05:00
Auto-close PRs and check alphabetical order
- readme_pr_repo_first_commit.py:
- Close a PR when every added GitHub repo is confirmed younger than
the 6-month minimum. Unknown/unparseable dates are treated as
comment-only and do not trigger close.
- Append an alphabetical-order section to the marker comment when
the PR adds a list item out of order in any `<details><h2>` or
`<h3>` sub-section of README.md. Only flags violations that
involve a line added by the PR.
- Reconstructs the post-PR README from base + diff so the check
works on PRs from forks without needing fork-head access.
- readme_pr_alphabetical.py (new): shared helper for the alphabetical
check.
- workflows/awesome_bot.yaml: removed. awesome_bot was running on
every push and PR, frequently failing on transient network issues
and 404s.
- workflows/link_check.yml (new): weekly lychee check on README.md
(Mon 06:17 UTC + manual dispatch). Tolerant of transient errors,
posts results back to the Actions run summary.
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
name: Link Checker
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '17 6 * * 1'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
|
||||
concurrency:
|
||||
group: link-check
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
link-check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Lychee link checker
|
||||
uses: lycheeverse/lychee-action@v2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
args: >-
|
||||
--verbose
|
||||
--no-progress
|
||||
--accept 100,101,200,202,203,204,205,206,300,301,302,303,304,307,308,403,429
|
||||
--retry 3
|
||||
--retry-wait-time 5
|
||||
--timeout 20
|
||||
--max-redirects 5
|
||||
--exclude-loopback
|
||||
--exclude-mail
|
||||
--exclude 'github\.com/.*/(issues|pulls|actions)'
|
||||
README.md
|
||||
output: github
|
||||
fail: true
|
||||
Reference in New Issue
Block a user