Skip to content

Commit 479ec1c

Browse files
nullvariantclaude
andauthored
docs: document branch protection rules in README and CONTRIBUTING (#61)
Add branch protection information to help contributors understand the new workflow: - README.md: Update Publishing section to clarify PR-required flow - CONTRIBUTING.md: Add Branch Protection section with rule details The main branch now requires PRs, CI checks, signed commits, and linear history. 🖥️ IDE: [Cursor](https://cursor.sh) 🔌 Extension: [Claude Code](https://claude.ai/download) Model-Raw: claude-opus-4-5-20251101 Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent b3c8cb4 commit 479ec1c

2 files changed

Lines changed: 28 additions & 4 deletions

File tree

CONTRIBUTING.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
Thank you for your interest in contributing to nullvariant-vscode-extensions!
44

5+
## Branch Protection
6+
7+
The `main` branch is protected with the following rules:
8+
9+
- **Pull Request required**: All changes must go through a PR (direct push is disabled)
10+
- **CI status checks**: The `build` check must pass before merging
11+
- **Signed commits required on main**: Commits merged to `main` must be GPG signed (handled by maintainers during merge)
12+
- **Linear history**: Rebase/squash merging is required (no merge commits)
13+
14+
> **Note for contributors**: You don't need to GPG-sign your commits. The maintainer will handle signing when merging your PR.
15+
516
## Getting Started
617

718
1. Fork the repository
@@ -11,6 +22,7 @@ Thank you for your interest in contributing to nullvariant-vscode-extensions!
1122
5. Commit with a descriptive message
1223
6. Push to your fork
1324
7. Open a Pull Request
25+
8. Wait for CI checks to pass, then a maintainer will merge
1426

1527
## Development Setup
1628

@@ -19,6 +31,9 @@ Thank you for your interest in contributing to nullvariant-vscode-extensions!
1931
git clone https://github.com/your-username/nullvariant-vscode-extensions.git
2032
cd nullvariant-vscode-extensions
2133

34+
# Set up git hooks (recommended)
35+
git config core.hooksPath .githooks
36+
2237
# Install dependencies
2338
npm install
2439

README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,24 @@ nullvariant-vscode-extensions/
8787
└── README.md
8888
```
8989

90-
## Publishing
90+
## Publishing (Maintainers Only)
9191

92-
Extensions are automatically published when a tag is pushed:
92+
> **Note**: The `main` branch is protected. All changes must go through a Pull Request.
93+
94+
Extensions are automatically published when a release tag is pushed:
95+
96+
1. Ensure all changes are merged to `main` via Pull Request
97+
2. Create and push a release tag from the latest `main`:
9398

9499
```bash
95-
git tag git-id-switcher-v0.1.0
96-
git push origin git-id-switcher-v0.1.0
100+
git checkout main
101+
git pull origin main
102+
git tag git-id-switcher-v1.0.0
103+
git push origin git-id-switcher-v1.0.0
97104
```
98105

106+
The [publish workflow](.github/workflows/publish.yml) will automatically build and publish the extension to VS Code Marketplace and Open VSX.
107+
99108
## License
100109

101110
MIT

0 commit comments

Comments
 (0)