Repository navigation
ci(github-actions): consolidate 3 workflows into single lint.yml with 3 jobs - #159
Merged
Merged
Conversation
… 3 jobs Per user request 2026-05-26: - Merge pr-metadata.yml + docs-link-check.yml + lint.yml → single lint.yml with 3 sibling jobs (pr-metadata / docs-link-check / swift-lint). Simpler required-status-check setup when branch protection lands (one workflow name, three job names). Key changes vs prior 3-file setup: - pr-metadata job: ubuntu-latest (was already; no change) - docs-link-check job: ubuntu-latest; gh api fetches changed markdown files (per user: drop fetch-depth: 0) - swift-lint job: macos-latest (toolchain requirement); gh api replaces `git diff --diff-filter` (per user: drop fetch-depth: 0); strict swiftlint + hard-fail swiftformat preserved All 3 jobs now use `gh api repos/.../pulls/<num>/files` to enumerate changed files instead of `git diff` against the base ref. Benefits: - Faster checkout (no full history) - Smaller runner workspace - Single canonical source of changed-file list (the PR API) - No risk of merge-base resolution edge cases Workflow-level path filter removed so the consolidated workflow always runs; per-job logic decides what to do based on changed-files list (empty → skip with explanatory log line). Closes user 2026-05-26 requests: - #2 pr-metadata: linux + drop fetch-depth + use gh api ✓ - #3 consolidate to single lint.yml with 3 jobs ✓ - #1 docs-link-check failure (apple.com 403?): NOT addressed in this PR — will need .lycheeignore follow-up after first run shows actual failing URLs Co-Authored-By: Claude Opus 4.7 <[email protected]>
… 2026-05-26) Per user decision 2026-05-26: - swiftlint coverage sufficient; swiftformat is redundant + double-tool maintenance cost not justified - swift-lint job runner: macos-latest → ubuntu-latest (swiftlint has linux x86_64 binary via mise; no Swift toolchain needed for lint-only) ### Removed - `.swiftformat` (config file, deleted) - `.mise.toml` swiftformat pin - `lefthook.yml` swiftformat hook - `.github/workflows/lint.yml` SwiftFormat lint step - `docs/foundations.md §7.5.1` option-b doc (strikethrough + obsolete note; historical impl-notes preserved at meetings/2026-05-26_swiftformat-option-b.impl-notes.md) - `docs/foundations.md §Backlog` "swiftformat 加入 lefthook" entry (strikethrough + CANCELLED tag) ### Updated foundations §4 Phase 1 GH Actions description - Reflects consolidated lint.yml (3 jobs in one workflow) - Reflects swift-lint on ubuntu + swiftformat removal - Cross-refs issues #156 #157 #158 for Phase 2/3 follow-ups Co-Authored-By: Claude Opus 4.7 <[email protected]>
wei18
force-pushed
the
ci/consolidate-lint-workflows
branch
from
May 26, 2026 09:31
4fddf13 to
43b6f92
Compare
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Per user 2026-05-26 request:
Why consolidate
Job layout
All 3 use `gh api repos/.../pulls//files` to enumerate changed files; empty list → skip with log line.
NOT in this PR (#1 deferred)
Test plan
🤖 Generated with Claude Code