Skip to content

Commit d4bc69f

Browse files
authored
docs: add Git Feature Branch Workflow section to README (#1)
Merging README workflow section update. Using admin privileges for single-developer repository.
1 parent 35308bc commit d4bc69f

File tree

2 files changed

+42
-4
lines changed

2 files changed

+42
-4
lines changed

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,43 @@ The project uses **build-time version injection** - version info is automaticall
306306

307307
---
308308

309+
## Contributing & Git Workflow
310+
311+
This project uses a **Git Feature Branch Workflow** with branch protection on `main`:
312+
313+
### Quick Contribution Guide
314+
```bash
315+
# Create feature branch
316+
git checkout -b feature/your-feature-name
317+
318+
# Make changes and test
319+
npm run ci # Run all quality checks
320+
321+
# Push and create PR
322+
git push -u origin feature/your-feature-name
323+
gh pr-create # Uses our custom alias
324+
325+
# Check status
326+
gh pr-checks
327+
```
328+
329+
### Branch Protection
330+
-**No direct commits** to `main` - all changes via PRs
331+
-**Required reviews** - at least 1 approval needed
332+
-**All tests must pass** - comprehensive CI pipeline
333+
-**Up-to-date branches** - must be current with main
334+
335+
See **[CONTRIBUTING.md](./CONTRIBUTING.md)** and **[BRANCHING.md](./BRANCHING.md)** for complete workflow details.
336+
337+
### GitHub CLI Aliases
338+
Pre-configured aliases for streamlined workflow:
339+
- `gh pr-create` - Create PR with auto-fill and self-assignment
340+
- `gh pr-checks` - Check PR status and CI results
341+
- `gh pr-merge` - Squash merge with branch cleanup
342+
- `gh feature` - Create branch from GitHub issue
343+
344+
---
345+
309346
## Support
310347

311348
**Questions?** Check the issues tab or create a new issue with:

tests/unit/docs/readme-validation.test.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ describe('README Documentation Validation', () => {
148148
lines.forEach(line => {
149149
const trimmed = line.trim();
150150
if (trimmed && !trimmed.startsWith('#')) {
151-
// Should start with valid command patterns
152-
expect(trimmed).toMatch(/^(npm|npx|node|claude|mkdir|cd|ls|cat|echo|git|cp|chmod|curl|python3?|\.\/scripts)/);
151+
// Should start with valid command patterns (including GitHub CLI)
152+
expect(trimmed).toMatch(/^(npm|npx|node|claude|mkdir|cd|ls|cat|echo|git|gh|cp|chmod|curl|python3?|\.\/scripts)/);
153153
}
154154
});
155155
}
@@ -209,8 +209,8 @@ describe('README Documentation Validation', () => {
209209
bash.split('\n').forEach(line => {
210210
const trimmed = line.trim();
211211
if (trimmed && !trimmed.startsWith('#')) {
212-
// Should start with valid command patterns
213-
expect(trimmed).toMatch(/^(npm|npx|node|claude|mkdir|cd|ls|cat|echo|git|cp|chmod|curl|python3?|\.\/scripts)/);
212+
// Should start with valid command patterns (including GitHub CLI)
213+
expect(trimmed).toMatch(/^(npm|npx|node|claude|mkdir|cd|ls|cat|echo|git|gh|cp|chmod|curl|python3?|\.\/scripts)/);
214214
}
215215
});
216216
});
@@ -312,6 +312,7 @@ describe('README Documentation Validation', () => {
312312
expect(readmeContent).toMatch(/### Setup with Claude/);
313313
expect(readmeContent).toMatch(/## How It Works/);
314314
expect(readmeContent).toMatch(/## Real-World Usage Examples/);
315+
expect(readmeContent).toMatch(/## Contributing & Git Workflow/);
315316
});
316317

317318
it('should have consistent formatting', () => {

0 commit comments

Comments
 (0)