Skip to content
Merged
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
9 changes: 3 additions & 6 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This file provides repository guidance for AI coding agents working in this repo

## What this repo is

`j7an/shared-workflows` publishes **reusable GitHub Actions workflows** that other repos consume via `uses: j7an/shared-workflows/.github/workflows/<file>@v2`. There is no application code — the deliverables are the workflow YAMLs in `.github/workflows/` and the bash logic in `scripts/`.
`j7an/shared-workflows` publishes **reusable GitHub Actions workflows** that other repos consume via `uses: j7an/shared-workflows/.github/workflows/<file>@v3`. There is no application code — the deliverables are the workflow YAMLs in `.github/workflows/` and the bash logic in `scripts/`.

## Commands

Expand All @@ -30,8 +30,7 @@ A reusable workflow cannot reliably check out *its own* repo's scripts: in a `wo

`scripts/*.sh` is the source of truth; the inline copy is a derived artifact. **Editing a script means updating its inline copy too**, or `check-inline-sync.sh` fails CI. The sync is byte-for-byte after known normalizations (10-space YAML indent strip, shebang strip, function-wrapper strip). The pairs are listed in `check-inline-sync.sh` (`INLINE_PAIRS`):

- `dependency-cooldown.yml` embeds `extract-deps.sh`, `check-release-age.sh`, `diff-touches-lockfile.sh`, `pr-body-to-deps.sh`, `classify-touched-paths.sh`, `pyproject-bump-extract.sh`
- `dependency-safety.yml` embeds the same six scripts plus `safety-verdict.sh`
- `dependency-safety.yml` embeds `extract-deps.sh`, `check-release-age.sh`, `diff-touches-lockfile.sh`, `pr-body-to-deps.sh`, `classify-touched-paths.sh`, `pyproject-bump-extract.sh`, and `safety-verdict.sh`
- `tag-release.yml` embeds `bump-version-files.sh`

`lint-workflow-call.sh` is the partner guard: it fails CI if any `workflow_call` file reintroduces a caller-scoped ref as a checkout `ref:`.
Expand All @@ -40,9 +39,7 @@ A reusable workflow cannot reliably check out *its own* repo's scripts: in a `wo

**Consumer-facing reusable workflows:**

- `dependency-safety.yml` — verifies the native-Dependabot-cooldown invariant on each Dependabot PR. Pipeline mirrors `dependency-cooldown.yml` (extract → fallback → guard → age check → GHSA/OSV scan → scorecard → comment → labels) but the verdict layer is deterministic: `failure` on age violation (when `fail_on_age_violation: true`), `error` on extraction/scan failure, `success` otherwise. Verdict translation lives in `safety-verdict.sh`. No rescan companion — verifier is single-shot per PR event.
- `dependency-cooldown.yml` — **legacy**, retained for Phase 2 migration window. Scans Dependabot PRs. Pipeline: parse diff → `extract-deps.sh` (with `pr-body-to-deps.sh` as fallback when the diff yields zero rows, and `diff-touches-lockfile.sh` as a fail-loud guard so a clean-but-wrong extraction can't produce a false-green gate) → `check-release-age.sh` for the cooldown gate → GHSA/OSV advisory scan → single update-or-create comment + label reconciliation.
- `cooldown-rescan.yml` — **legacy**, retained for Phase 2 migration window. Scheduled re-scan of PRs stuck in the `pending` cooldown state.
- `dependency-safety.yml` — verifies the native-Dependabot-cooldown invariant on each Dependabot PR. Pipeline: extract → fallback → guard → age check → GHSA/OSV scan → scorecard → comment → labels; the verdict layer is deterministic: `failure` on age violation (when `fail_on_age_violation: true`), `error` on extraction/scan failure, `success` otherwise. Verdict translation lives in `safety-verdict.sh`. No rescan companion — verifier is single-shot per PR event.
- `tag-release.yml` — computes the next semver tag from Conventional Commits, optionally runs `bump-version-files.sh` against `.version-bump.json`, creates the tag via the GitHub Git Data API (so commits/tags auto-sign under the App identity). Requires a GitHub App key (`RELEASE_BOT_PRIVATE_KEY` secret, `RELEASE_BOT_APP_ID` var).
- `publish-pypi.yml` — `uv build` → TestPyPI (with install verification) → PyPI via OIDC trusted publishing → GitHub Release.

Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Reusable Workflows

This directory hosts reusable workflows under `j7an/shared-workflows`. Consumers reference them via `uses: j7an/shared-workflows/.github/workflows/<file>@v2`.
This directory hosts reusable workflows under `j7an/shared-workflows`. Consumers reference them via `uses: j7an/shared-workflows/.github/workflows/<file>@v3`.

> **Note:** `@v2` continues to work for `tag-release.yml`, `publish-pypi.yml`, and `dependency-safety.yml` at their last-released v2 revision, but receives no further updates.

## `tag-release.yml`

Expand Down Expand Up @@ -30,7 +32,7 @@ on:

jobs:
tag:
uses: j7an/shared-workflows/.github/workflows/tag-release.yml@v2
uses: j7an/shared-workflows/.github/workflows/tag-release.yml@v3
with:
bump: ${{ inputs.bump }}
# tag-prefix omitted → defaults to "v" → produces v1.2.3
Expand All @@ -47,7 +49,7 @@ on:

jobs:
tag:
uses: j7an/shared-workflows/.github/workflows/tag-release.yml@v2
uses: j7an/shared-workflows/.github/workflows/tag-release.yml@v3
with:
bump: ${{ inputs.bump }}
tag-prefix: "tools/v" # produces tools/v0.1.0
Expand Down Expand Up @@ -184,7 +186,7 @@ on:

jobs:
publish:
uses: j7an/shared-workflows/.github/workflows/publish-pypi.yml@v2
uses: j7an/shared-workflows/.github/workflows/publish-pypi.yml@v3
with:
tag: ${{ github.ref_name }}
package-dir: tools
Expand All @@ -196,7 +198,7 @@ jobs:
For each new PyPI package that uses this workflow, complete **once**:

- [ ] Claim the package name on [PyPI](https://pypi.org/) and [TestPyPI](https://test.pypi.org/).
- [ ] On PyPI, configure trusted publisher: workflow `j7an/shared-workflows/.github/workflows/publish-pypi.yml`, ref `v2`, environment `pypi`.
- [ ] On PyPI, configure trusted publisher: workflow `j7an/shared-workflows/.github/workflows/publish-pypi.yml`, ref `v3`, environment `pypi`.
- [ ] On TestPyPI, configure the same trusted publisher with environment `testpypi`.
- [ ] Confirm GitHub Environments `testpypi` and `pypi` exist in `j7an/shared-workflows` repo settings.

Expand Down
146 changes: 0 additions & 146 deletions .github/workflows/cooldown-rescan.yml

This file was deleted.

Loading
Loading