Skip to content

Commit b14947b

Browse files
authored
chore: add CodeQL workflow, PR template, and Dependabot config (#4)
* chore: add CodeQL workflow, PR template, and Dependabot version updates * docs: add CI workflows and branch/merge rules to AGENTS.md
1 parent 0b44671 commit b14947b

4 files changed

Lines changed: 86 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: npm
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
day: monday
8+
open-pull-requests-limit: 10
9+
labels:
10+
- dependencies
11+
commit-message:
12+
prefix: "chore(deps):"
13+
14+
- package-ecosystem: github-actions
15+
directory: /
16+
schedule:
17+
interval: weekly
18+
day: monday
19+
open-pull-requests-limit: 5
20+
labels:
21+
- dependencies
22+
- ci
23+
commit-message:
24+
prefix: "ci(deps):"

.github/pull_request_template.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Summary
2+
3+
Brief description of the changes.
4+
5+
## Changes
6+
7+
-
8+
9+
## Testing
10+
11+
- [ ] `bun run build` passes
12+
- [ ] `bun test` passes
13+
- [ ] Manual testing done (if applicable)
14+
15+
## Notes
16+
17+
Any additional context or trade-offs worth mentioning.

.github/workflows/codeql.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CodeQL
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
schedule:
9+
- cron: '0 6 * * 1'
10+
11+
jobs:
12+
analyze:
13+
name: Analyze TypeScript
14+
runs-on: ubuntu-latest
15+
16+
permissions:
17+
security-events: write
18+
contents: read
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Initialize CodeQL
25+
uses: github/codeql-action/init@v3
26+
with:
27+
languages: javascript-typescript
28+
29+
- name: Perform CodeQL Analysis
30+
uses: github/codeql-action/analyze@v3

AGENTS.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,21 @@ If tests fail, identify whether failures are pre-existing vs introduced by your
4242
- Use the **Nuclear Cleanup** sequence before and after manual testing to avoid leftover tmux sessions, worktrees, branches, and state files.
4343
- Follow plan safety rules exactly: `tmc-` test naming, no remote push flows during testing (`mc_pr` is structural only), and explicit SHA-based resets.
4444

45+
## CI & GitHub Workflows
46+
47+
- **CI** (`.github/workflows/ci.yml`) — Runs `bun run build` and `bun test` on PRs and pushes to `main`.
48+
- **Conventional Commits** (`.github/workflows/conventional-commits.yml`) — Validates PR titles follow the convention.
49+
- **CodeQL** (`.github/workflows/codeql.yml`) — Static analysis for TypeScript; runs on PRs, pushes to `main`, and weekly.
50+
- **Publish** (`.github/workflows/publish.yml`) — semantic-release to npm on `main`.
51+
- **Dependabot** (`.github/dependabot.yml`) — Opens weekly PRs for npm and GitHub Actions dependency updates. These use `chore(deps):` and `ci(deps):` commit prefixes.
52+
53+
## Branch & Merge Rules
54+
55+
- Direct pushes to `main` are blocked; all changes go through PRs.
56+
- Merge commits are disabled — only **squash** and **rebase** merges are allowed.
57+
- PRs require 1 approving review, passing `build-and-test` and `conventional-commits` checks, and all conversations resolved.
58+
- A PR template (`.github/pull_request_template.md`) is provided — fill it out when opening PRs.
59+
4560
## Release Notes for Agents
4661

4762
- npm package output is `dist/` only (`package.json -> files`).

0 commit comments

Comments
 (0)