Skip to content

feat: add reusable pre-commit workflow - #89

Open
chris11-taylor-nttd wants to merge 3 commits into
mainfrom
reusable-pre-commit-checks
Open

feat: add reusable pre-commit workflow#89
chris11-taylor-nttd wants to merge 3 commits into
mainfrom
reusable-pre-commit-checks

Conversation

@chris11-taylor-nttd

@chris11-taylor-nttd chris11-taylor-nttd commented May 29, 2026

Copy link
Copy Markdown
Contributor

Perform a lift-and-shift of pre-commit actions to a reusable workflow that can be called by other repos. Additionally, cleans up a tag reference on actions/checkout by replacing the tag with a SHA.

We'll need to do some work to update the downstreams to consume pre-commit in this way, but for the most part that change will roll out through the auto-update system on the skeleton.

@bryce-lynn-nttd bryce-lynn-nttd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lift-and-shift shape is right, and the actions/checkout SHA pin closes my prior tag-pinning note from PR #88. One copy-paste bug worth fixing before this lands:

Blocking:

  • name: Dependabot Auto-Merge on line 1 of reusable-pre-commit-checks.yml is a copy-paste from the dependabot-automerge workflow. The file's actual purpose is pre-commit, but every Actions UI in every consumer that uses this workflow will display "Dependabot Auto-Merge" as the workflow name. Once this propagates downstream via the skeleton auto-update flow, every converted repo's Actions tab will have the wrong label. One-line fix: change to name: Pre-Commit Checks (or similar).

Non-blocking:

  • _placeholder input appears unnecessary. on: workflow_call: without an inputs: block is valid YAML — no placeholder needed. If there's a specific reason for scaffolding future inputs, worth a code comment explaining; otherwise drop the block.
  • actions/checkout SHA ff7abcd0... doesn't map to any released tag in actions/checkout — it's a between-releases commit from 2025-08. This is the same SHA already used elsewhere in launch-workflows, so consistent with the repo, but worth knowing for a future bulk refresh to a tagged release (e.g., the SHA underlying v6).
  • Cache pattern (restore-only) still appears here, but that's intentional now since PR #90 is the paired producer for those caches. Together the two PRs address the cache concern from PR #88.

Generated with Claude Code (Opus 4.7)

chris11-taylor-nttd and others added 2 commits June 1, 2026 08:28
Missed this during copy/paste cleanup.

Signed-off-by: Chris Taylor <132399041+chris11-taylor-nttd@users.noreply.github.com>
@chris11-taylor-nttd

Copy link
Copy Markdown
Contributor Author

Fixed the workflow name, and dropped the placeholder input. Going to blame this on it being late on a Friday afternoon.

@ben-vaughan-nttd ben-vaughan-nttd left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex PR Review

Note: This pull request review was generated by Codex.

Review Decision

APPROVE

High Findings

  • (none)

Medium Findings

  • (none)

Low Findings

  • (none)

Nitpicks

  • (none)

Previously Raised Findings Confirmed

  • The prior reviewer’s blocking workflow-name finding and placeholder-input note appear resolved in the current revision. Codex is not claiming these as new findings.

Open Questions / Assumptions

  • (none)

Required Workflow Status

  • Required workflows overall: pass
  • Failing required workflows: none
  • Pending required workflows: none

Validation Notes

  • Local checkout used: yes
  • Existing PR comments/reviews checked: yes
  • Existing findings confirmed but not claimed as new: prior workflow name and placeholder input findings were checked and appear resolved
  • Net-new blocking findings from Codex: none
  • Unresolved blocking findings from other reviewers: none observed in the current revision
  • Required workflow checks evaluated: yes
  • Required workflow failures found: none
  • Required workflow failure investigation performed: not needed
  • Instruction files discovered: none found
  • Instruction files applied: workspace-level review guidance
  • Instruction files skipped as out-of-scope: none
  • User clarification requested for ambiguous scope: no
  • Older duplicate Codex blocking review dismissed: no
  • Checks/tests executed: pre-commit run --files .github/workflows/pull-request-precommit-checks.yml .github/workflows/reusable-pre-commit-checks.yml docs/reusable-pre-commit-checks.md

@bryce-lynn-nttd bryce-lynn-nttd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This supersedes my prior CHANGES_REQUESTED. Both findings cleanly addressed and empirically verified:

  • Line 1 is now name: Pre-Commit Checks (was name: Dependabot Auto-Merge) — the copy-paste blocker is fixed.
  • on: workflow_call: is now bare with no body — the unnecessary _placeholder input is dropped.

Two commits: fix: workflow name and fix: drop placeholder input. CI green. Approving.

Generated with Claude Code (Opus 4.7)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants