check-issue-refs: scan .yml/.yaml too, closes #4148
This commit is contained in:
parent
a5b07c55c8
commit
948525de09
1 changed files with 5 additions and 2 deletions
|
|
@ -11,8 +11,10 @@
|
|||
# Emits a CI error annotation per hit, exits 1 if any hit is found. Its own
|
||||
# required CI job (branch protection) — a hit blocks merge.
|
||||
#
|
||||
# Scope: every tracked `*.rs *.nix *.js *.ts *.tsx *.css *.html *.md`. Two
|
||||
# alternatives: a hash, 2-5 digits, then non-alphanumeric-or-EOL (skips
|
||||
# Scope: every tracked `*.rs *.nix *.js *.ts *.tsx *.css *.html *.md *.yml
|
||||
# *.yaml`. CI workflow files (`.forgejo/workflows/*.yml`) are explicitly in
|
||||
# scope: a step comment is still a comment. The pattern matches a hash,
|
||||
# 2-5 digits, then a non-alphanumeric char or end-of-line (skips
|
||||
# letter-bearing hex colours and digit-runs-then-letter, e.g. `#24h`;
|
||||
# residual: a pure-numeric short hex trips it, write the six-digit form to
|
||||
# dodge); or an `/issues/N` path segment, catching a full link via
|
||||
|
|
@ -32,6 +34,7 @@ pattern='#[0-9]{2,5}([^0-9a-zA-Z]|$)|/issues/[0-9]+([^0-9a-zA-Z]|$)'
|
|||
# (legitimate non-tracker hit; see the header).
|
||||
hits="$(
|
||||
git ls-files -z '*.rs' '*.nix' '*.js' '*.ts' '*.tsx' '*.css' '*.html' '*.md' \
|
||||
'*.yml' '*.yaml' \
|
||||
| xargs -0 -r grep -nE "$pattern" /dev/null 2>/dev/null \
|
||||
| grep -v 'lint:allow' || true
|
||||
)"
|
||||
|
|
|
|||
Loading…
Reference in a new issue