Skip to content

Commit e6e1226

Browse files
committed
ci(workflows): reduce Actions noise and flakiness
- commitlint: skip Dependabot/Renovate PRs via actor+branch guards\n- ci: skip vsce packaging and vsix upload on PR events\n- release: guard publish job to tag refs only to avoid stray push runs\n- dependabot-auto-merge: enable auto-merge only if PR state is open
1 parent 0b92b02 commit e6e1226

11 files changed

Lines changed: 141 additions & 3 deletions

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,11 @@ jobs:
6161
run: npm run package
6262

6363
- name: Package VSIX (sanity)
64+
if: github.event_name != 'pull_request'
6465
run: npx --yes @vscode/vsce package
6566

6667
- name: Upload VSIX artifact
67-
if: always()
68+
if: github.event_name != 'pull_request' && always()
6869
uses: actions/upload-artifact@v4
6970
with:
7071
name: vsix

.github/workflows/commitlint.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ permissions:
1010

1111
jobs:
1212
lint:
13-
if: github.actor != 'dependabot[bot]'
13+
# Skip bot-authored dependency PRs and bot edits to those PRs
14+
# Commitlint failures on long Dependabot titles are noisy and non-blocking
15+
if: >
16+
github.event.pull_request.user.login != 'dependabot[bot]' &&
17+
!startsWith(github.head_ref, 'dependabot/') &&
18+
!startsWith(github.head_ref, 'renovate/')
1419
runs-on: ubuntu-latest
1520
steps:
1621
- uses: actions/checkout@v5

.github/workflows/dependabot-auto-merge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ jobs:
2525
github-token: ${{ secrets.GITHUB_TOKEN }}
2626

2727
- name: Enable auto-merge
28+
if: github.event.pull_request.state == 'open'
2829
uses: peter-evans/enable-pull-request-automerge@v3
2930
with:
3031
token: ${{ secrets.GITHUB_TOKEN }}
3132
pull-request-number: ${{ github.event.pull_request.number }}
3233
merge-method: squash
33-

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ env:
1919

2020
jobs:
2121
publish:
22+
# Extra guard to avoid stray runs if GitHub creates a run on branch pushes
23+
if: startsWith(github.ref, 'refs/tags/')
2224
runs-on: ubuntu-latest
2325
steps:
2426
- name: Checkout

.serena/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/cache
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# AutoPathComment (VS Code Extension)
2+
3+
- Purpose: On each file save, ensure a file-relative path comment is present at the top of the file using the correct single-line comment syntax; supports user overrides per extension.
4+
- Tech stack: TypeScript, esbuild (CJS bundle), VS Code extension API.
5+
- Entry: `src/extension.ts` → builds to `dist/extension.js`.
6+
- Tests: Mocha via `@vscode/test-cli` (integration-style, drives a VS Code instance), located in `src/test/*.test.ts`.
7+
- Structure:
8+
- `src/extension.ts`: activation + logic; exports `getCommentSyntax` for tests.
9+
- `src/test/*.test.ts`: tests (compiled to `out/test`).
10+
- `dist/extension.js`: built output (generated by `esbuild.js`).
11+
- `.github/workflows/`: `ci.yml`, `release.yml`, `release-please.yml`, etc.
12+
- `CHANGELOG.md`: maintained by Release Please.
13+
- Node/VS Code: engines `^1.104.0`, CI uses Node 24.

.serena/memories/release_flow.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Release Flow
2+
3+
- Managed by Release Please (`.github/workflows/release-please.yml`).
4+
- On pushes to `main`, Release Please updates/opens a PR (e.g., `chore(main): release 0.0.x`) with version bump + CHANGELOG.
5+
- Merge the release PR → tag is created automatically (`vX.Y.Z` or `autopathcomment-vX.Y.Z`).
6+
- Tag triggers `Release` workflow:
7+
- Build (`npm run package`) and package VSIX (`vsce package`).
8+
- Upload VSIX to GitHub Release (generate notes).
9+
- If `VSCE_PAT` secret is configured, `vsce publish` pushes to Marketplace.
10+
- Manual fallback: `npm version <bump>` + `git push --follow-tags` triggers `Release` workflow but bypasses Release Please PR/CHANGELOG authoring.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Style and Conventions
2+
3+
- Language: TypeScript.
4+
- Linting: ESLint 9 with @typescript-eslint 8; project policy is zero warnings (lint runs with `--max-warnings=0`).
5+
- ESLint rules emphasized: `curly`, `eqeqeq`, `no-throw-literal`, `semi` (project-level severities may be `warn` but CI enforces zero warnings).
6+
- Code style: 2-space indent; keep lines focused and readable.
7+
- Exports: Prefer named exports; avoid default exports.
8+
- Functions: Small and pure where possible; explicit types where helpful.
9+
- Commit messages: Conventional Commits required; e.g., `feat: ...`, `fix: ...`, `docs: ...`, `chore: ...`. Include `BREAKING CHANGE:` in body for majors. Dependabot PRs use `fix(deps): bump ...` to trigger patch releases.
10+
- Release Please: Relies on Conventional Commits to drive version and CHANGELOG.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Suggested Commands
2+
3+
Development
4+
- `npm run watch` – parallel watch: esbuild and `tsc --noEmit`.
5+
- `npm run compile` – typecheck, lint (zero warnings), build dev bundle.
6+
- `npm run package` – production build for releases.
7+
8+
Quality
9+
- `npm run check-types``tsc --noEmit`.
10+
- `npm run lint``eslint src --max-warnings=0`.
11+
- `npm test` – run VS Code tests via `@vscode/test-cli`.
12+
- `npm run check` – typecheck + lint + tests.
13+
14+
VSIX
15+
- `npx @vscode/vsce package` – create `.vsix` locally.
16+
- `npx @vscode/vsce publish` – publish (requires `VSCE_PAT`).
17+
18+
Git/Release
19+
- Normal flow: push Conventional Commits → Release Please PR → merge → tag + release automation.
20+
- Manual fallback: `npm version <patch|minor|major> && git push --follow-tags` (bypasses Release Please).
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Task Completion Checklist
2+
3+
- Run `npm run check-types` (TypeScript typecheck clean).
4+
- Run `npm run lint` (must be zero warnings/errors).
5+
- Run `npm test` and ensure all integration tests pass.
6+
- Ensure commit message follows Conventional Commits (subject ≤ 72 chars; scope optional; no stray escapes like `\n`).
7+
- If the change warrants a release, let Release Please open its PR; do not tag manually.
8+
- Verify CI (GitHub Actions) green.
9+
- For release PRs: skim CHANGELOG/versions, then merge when satisfied.

0 commit comments

Comments
 (0)