[PR #359] [MERGED] fix: CI workflow bugs and lychee config improvements #5573

Closed
opened 2026-06-10 11:43:04 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shuaibiyy/awesome-tf/pull/359
Author: @chenrui333
Created: 5/12/2026
Status: Merged
Merged: 5/12/2026
Merged by: @chenrui333

Base: masterHead: rchen.ci-improvements


📝 Commits (1)

  • b6d3e84 fix: CI workflow bugs and lychee config improvements

📊 Changes

4 files changed (+13 additions, -3 deletions)

View changed files

📝 .github/workflows/link-checker.yml (+1 -1)
📝 .github/workflows/misspell.yml (+8 -1)
📝 .github/workflows/notfound.yml (+2 -0)
📝 lychee.toml (+2 -1)

📄 Description

Four improvements found during repo audit.

notfound.yml — push trigger fires on every branch

on:
  push:        # ← no branch filter

This workflow has contents: write and pull-requests: write permissions. Running on every push to any branch (including feature branches, Dependabot bumps) means the bot could open fix PRs from unreviewed branches. Added branches: [master] to restrict to master-only.

git diff ... HEAD^1 HEAD   # ← only last commit in the PR

For multi-commit PRs, HEAD^1 is the previous commit in the PR branch, not the base branch. Links added in all but the last commit are silently skipped. Fixed to use ${{ github.event.pull_request.base.sha }} as the base.

misspell.yml — unnecessary trigger noise

  • types: [assigned, ...] — reviewer assignment re-runs spellcheck with no file changes. Removed assigned.
  • No paths filter — ran on every push even when only non-text files changed. Added paths: ['**.md'].
  • No permissions block — added contents: read for least-privilege.

lychee.toml — misleading comment

The commented-out exclude = ['...'] line would replace the entire exclude array if uncommented (TOML array assignment), not add to it. Added a warning so future maintainers don't accidentally drop all existing exclusions.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/shuaibiyy/awesome-tf/pull/359 **Author:** [@chenrui333](https://github.com/chenrui333) **Created:** 5/12/2026 **Status:** ✅ Merged **Merged:** 5/12/2026 **Merged by:** [@chenrui333](https://github.com/chenrui333) **Base:** `master` ← **Head:** `rchen.ci-improvements` --- ### 📝 Commits (1) - [`b6d3e84`](https://github.com/shuaibiyy/awesome-tf/commit/b6d3e8458d4be5847899f7d625bc3536eb98f7ee) fix: CI workflow bugs and lychee config improvements ### 📊 Changes **4 files changed** (+13 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/link-checker.yml` (+1 -1) 📝 `.github/workflows/misspell.yml` (+8 -1) 📝 `.github/workflows/notfound.yml` (+2 -0) 📝 `lychee.toml` (+2 -1) </details> ### 📄 Description Four improvements found during repo audit. ## notfound.yml — push trigger fires on every branch ```yaml on: push: # ← no branch filter ``` This workflow has `contents: write` and `pull-requests: write` permissions. Running on every push to any branch (including feature branches, Dependabot bumps) means the bot could open fix PRs from unreviewed branches. Added `branches: [master]` to restrict to master-only. ## link-checker.yml — PR diff misses earlier commits ```bash git diff ... HEAD^1 HEAD # ← only last commit in the PR ``` For multi-commit PRs, `HEAD^1` is the previous commit in the PR branch, not the base branch. Links added in all but the last commit are silently skipped. Fixed to use `${{ github.event.pull_request.base.sha }}` as the base. ## misspell.yml — unnecessary trigger noise - `types: [assigned, ...]` — reviewer assignment re-runs spellcheck with no file changes. Removed `assigned`. - No `paths` filter — ran on every push even when only non-text files changed. Added `paths: ['**.md']`. - No `permissions` block — added `contents: read` for least-privilege. ## lychee.toml — misleading comment The commented-out `exclude = ['...']` line would **replace** the entire `exclude` array if uncommented (TOML array assignment), not add to it. Added a warning so future maintainers don't accidentally drop all existing exclusions. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-06-10 11:43:05 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/awesome-tf#5573