Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions .github/workflows/lint-on-push-pr.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
name: Lint pushes/PRs
on: [push, pull_request]

on:
push:
branches:
- master
pull_request:
branches:
- master

permissions:
contents: read

concurrency:
group: lint-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-24.04
permissions:
contents: read
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24
Expand All @@ -16,4 +31,5 @@ jobs:
npm install --global --prefix "$RUNNER_TEMP/npm-tools" npm@11.21.0 --ignore-scripts --no-audit --no-fund --before="$(node -e 'process.stdout.write(new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString())')"
echo "$RUNNER_TEMP/npm-tools/bin" >> "$GITHUB_PATH"
- run: npm ci --ignore-scripts
- run: npm run lint
- run: npm run lint:all
- run: npm run check:readme
28 changes: 0 additions & 28 deletions .github/workflows/sync-changes-to-gitlab.yml

This file was deleted.

4 changes: 3 additions & 1 deletion .github/workflows/validate-links-on-push-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Validate links
id: links
Expand All @@ -40,7 +42,7 @@ jobs:

- name: Wait before retry
if: steps.links.outcome == 'failure'
run: sleep 15
run: sleep 30

- name: Retry failed link check
if: steps.links.outcome == 'failure'
Expand Down
4 changes: 2 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ NC="\033[0m" # no color
BR="\033[1;91m" # bright red
BY="\033[1;33m" # bright yellow

# Run ESLint
# Run ESLint and README checks
echo -e "\n${BY}Running ESLint...${NC}"
if npm ls -g eslint &> /dev/null || npm ls eslint &> /dev/null ; then
npm run lint
npm run lint && npm run check:readme
else
PROJECT_ROOT=$(
cd "$(dirname "$0")/.." && # nav to root
Expand Down
4 changes: 2 additions & 2 deletions .lychee.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cache = false
timeout = 30
max_retries = 3
retry_wait_time = 5
max_concurrency = 8
retry_wait_time = 10
max_concurrency = 4
include_mail = true
include_fragments = "anchor-only"
index_files = ["README.md"]
Expand Down
5 changes: 3 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,14 @@ Use Node.js 24, matching CI:
```sh
npm ci --ignore-scripts
npm run lint
npm run check:readme
```

Also open every added or changed link and verify that the install link serves the intended userscript.

### Automated link checks

The required `lychee` check scans `README.md` and `CONTRIBUTING.md` on pull requests, pushes to `master`, and daily at 06:17 UTC. Each run checks links without a persistent cache and saves its report in the Actions job summary and `link-check-report` artifact. A failed scan is retried once after 15 seconds; a second failure blocks the check. Maintainers can also use **Run workflow** under **Actions > Validate links**.
The required `lychee` check scans `README.md` and `CONTRIBUTING.md` on pull requests, pushes to `master`, and daily at 06:17 UTC. Each run checks links without a persistent cache and saves its report in the Actions job summary and `link-check-report` artifact. A failed scan is retried once after 30 seconds; a second failure blocks the check. Maintainers can also use **Run workflow** under **Actions > Validate links**.

To reproduce the check locally with Lychee 0.24.2:

Expand All @@ -84,4 +85,4 @@ See `.lychee.toml` for timeouts and exclusions. HTTP 403 and 429 responses are t
- Description is concise, factual, and ends with a period.
- Install, documentation, image, and support links work.
- Script was tested, with browser and userscript manager named in the pull request.
- `npm run lint` passes.
- `npm run lint` and `npm run check:readme` pass.
Loading
Loading