Compare commits
6 Commits
v0.21.0
...
2962b82017
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2962b82017 | ||
|
|
a68c251d0a | ||
|
|
e63ebd1401 | ||
|
|
b26ded951f | ||
|
|
8bb1b99ae9 | ||
|
|
0d8bf04446 |
14
.claude/commands/pr.md
Normal file
14
.claude/commands/pr.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
Create a PR on Gitea, wait for CI, and squash-merge it. Push code to both remotes.
|
||||||
|
|
||||||
|
1. If in a worktree (working directory contains `.claude/worktrees/`), you are already on a feature branch — do NOT create a new one. Otherwise, create a new branch from main with a descriptive name.
|
||||||
|
2. Stage and commit all changes with a clean, semantic commit message. No Claude attribution lines.
|
||||||
|
3. Fetch latest main and rebase: `git fetch gitea main && git rebase gitea/main`.
|
||||||
|
- If conflicts occur, abort the rebase (`git rebase --abort`), analyze the conflicting files, write a plan to resolve them, and present the plan to the user before proceeding.
|
||||||
|
4. Push the branch to both remotes: `git push -u gitea <branch> && git push origin <branch>` (use `--force-with-lease` if already pushed).
|
||||||
|
5. Create a Gitea PR: `tea pr create --head <branch> --base main`. Reference related issues with `#X`. Only use `Closes #X` if the PR fully resolves the issue.
|
||||||
|
6. Wait for CI to pass: poll Gitea CI status. If CI fails, report the failure and stop — do not merge.
|
||||||
|
7. Once CI passes, squash-merge on Gitea: `tea pr merge <index> --style squash` with a clean, semantic commit message including the PR number. No Claude attribution lines.
|
||||||
|
8. Update local main and push to both remotes: `git checkout main && git pull gitea main && git push origin main`.
|
||||||
|
9. Clean up remote branches: `git push gitea --delete <branch> && git push origin --delete <branch>`.
|
||||||
|
10. Prune refs: `git remote prune gitea && git remote prune origin`.
|
||||||
|
11. Report the merged PR URL.
|
||||||
@@ -1,14 +1,20 @@
|
|||||||
Create a new release for this project. Steps:
|
Create a new release on Gitea. Push tags to both remotes.
|
||||||
|
|
||||||
1. Fetch tags from all remotes so the version list is current.
|
## Pre-flight
|
||||||
2. Check for uncommitted changes. If any exist, commit them with a clean semantic commit message. No Claude attribution lines.
|
|
||||||
3. Review the commits since the last tag. Based on their content, recommend a semver bump:
|
1. **Worktree guard**: If the working directory is inside `.claude/worktrees/`, STOP and tell the user: "Releases must be created from a non-worktree session on main. Exit this worktree or start a new session, then run /release." Do not proceed.
|
||||||
|
2. Verify you are on `main`. If not, STOP.
|
||||||
|
3. Verify there are no uncommitted changes. If there are, STOP — they should go through a PR.
|
||||||
|
4. Run `git pull --ff-only` on main. Fetch tags from all remotes.
|
||||||
|
|
||||||
|
## Release
|
||||||
|
|
||||||
|
5. Review commits since the last tag. Recommend a semver bump:
|
||||||
- **major**: breaking/incompatible API changes
|
- **major**: breaking/incompatible API changes
|
||||||
- **minor**: new features, meaningful new behavior
|
- **minor**: new features, meaningful new behavior
|
||||||
- **patch**: bug fixes, docs, refactoring with no new features
|
- **patch**: bug fixes, docs, refactoring with no new features
|
||||||
Present the proposed version, the bump rationale, and the commit list. Wait for user approval before continuing.
|
Present the proposed version, bump rationale, and commit list. Wait for user approval.
|
||||||
4. Tag the new version and push the tag + commits to all remotes (origin, gitea, etc.).
|
6. Tag the new version. Push the tag to both remotes: `git push gitea <tag> && git push origin <tag>`.
|
||||||
5. Generate release notes from the commits since the last tag, grouped by type (features, fixes, docs/refactoring).
|
7. Generate release notes grouped by type (features, fixes, chores).
|
||||||
6. Create a GitHub release using `gh release create`.
|
8. Create a Gitea release with `tea releases create` using the notes.
|
||||||
7. Create a Gitea release using `tea releases create` with the same notes.
|
9. Report the release URL and confirm all remotes are up to date.
|
||||||
8. Report both release URLs and confirm all remotes are up to date.
|
|
||||||
|
|||||||
@@ -8,9 +8,6 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- '**'
|
- '**'
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-test:
|
build-test:
|
||||||
name: Build and Test
|
name: Build and Test
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -52,3 +52,6 @@ internal/examples/nats-chatroom/nats-chatroom
|
|||||||
|
|
||||||
# NATS data directory
|
# NATS data directory
|
||||||
data/
|
data/
|
||||||
|
|
||||||
|
# Claude Code worktrees
|
||||||
|
.claude/worktrees/
|
||||||
|
|||||||
20
CLAUDE.md
Normal file
20
CLAUDE.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# Via Project Instructions
|
||||||
|
|
||||||
|
## Workflow
|
||||||
|
|
||||||
|
All changes go through PRs:
|
||||||
|
|
||||||
|
1. Enter a worktree (`EnterWorktree`) at session start.
|
||||||
|
2. Make changes, commit with semantic messages.
|
||||||
|
3. `/pr` to push, open a PR, wait for CI, and squash-merge.
|
||||||
|
|
||||||
|
## Releasing
|
||||||
|
|
||||||
|
Run `/release` from a **non-worktree session on main**. It tags and publishes
|
||||||
|
what is already on main — it does not commit new changes.
|
||||||
|
|
||||||
|
## Worktree Usage
|
||||||
|
|
||||||
|
Always enter a worktree at the start of a session using the `EnterWorktree`
|
||||||
|
tool. This prevents parallel Claude Code sessions from interfering with each
|
||||||
|
other.
|
||||||
Reference in New Issue
Block a user