diff --git a/.github/workflows/check-base-branch.yml b/.github/workflows/check-base-branch.yml index a977a320..42c4bb96 100644 --- a/.github/workflows/check-base-branch.yml +++ b/.github/workflows/check-base-branch.yml @@ -8,8 +8,12 @@ jobs: check-base-branch: name: Validate Base Branch runs-on: ubuntu-latest + permissions: + pull-requests: read steps: - name: Ensure PR targets allowed base branch + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | BASE="${{ github.base_ref }}" HEAD="${{ github.head_ref }}" diff --git a/.opencode/skills/maintenance/SKILL.md b/.opencode/skills/maintenance/SKILL.md index 5effc59e..f552ad12 100644 --- a/.opencode/skills/maintenance/SKILL.md +++ b/.opencode/skills/maintenance/SKILL.md @@ -5,7 +5,9 @@ description: Use when making ANY code change to pytrendy, creating issues, or op # Maintenance & API evolution -This is the consolidated context issue #141 asked for — the design principles agents keep re-litigating on PRs. +> **CRITICAL: Before EVERY `git commit`, verify the message matches `^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\(.+\))?!?: .+`. If not, rewrite it. No exceptions.** +> +> **CRITICAL: Before EVERY PR title creation, verify the title matches the same pattern. `lint-pr-title.yml` enforces this in CI — PRs with non-conforming titles are blocked.** ## Public API surface @@ -84,6 +86,7 @@ Segment dicts have at minimum: `direction` ('Up'/'Down'/'Flat'/'Noise'), `start` - `lint-pr-title.yml` rejects titles not matching `^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\(.+\))?!?: .+`. - semantic-release maps: `feat`→minor, `fix`→patch, `!`/`BREAKING CHANGE:`→major, others→no bump. - Deprecating a public API param = `feat:` (minor), *not* `refactor:` — see "Deprecation policy" section above. +- **`chore` vs `fix`**: `fix:` triggers a **patch release** via semantic-release. Use `chore:` or `ci:` for maintenance-only changes that have zero user-facing code impact. Using `fix:` on non-bugfix work causes accidental auto-releases. - Imperative, lowercase, <72 chars, no trailing period. ## Don't touch these manually diff --git a/AGENTS.md b/AGENTS.md index 8d1b3345..f42e2581 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -19,5 +19,7 @@ Other skills (`test`, `cicd`, `debug`, `pr-plots`) load on demand for specific t - Lowercase, imperative, <72 chars, no trailing period - This applies to all commit messages you generate, including auto-generated summaries - `lint-pr-title.yml` enforces the `type: description` prefix and allowed types on PR titles (regex: `^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\(.+\))?!?: .+`) + - **PR titles use the same pattern** — non-conforming titles are blocked in CI - Deprecating a public param = `feat:` (minor), NOT `refactor:` +- **`chore` vs `fix`**: `fix:` triggers a **patch release** via semantic-release. Use `chore:` or `ci:` for maintenance-only changes that have zero user-facing code impact. Using `fix:` on non-bugfix work causes accidental auto-releases. - Never hand-edit `pyproject.toml` version or `CHANGELOG.md`