This directory contains GitHub-specific configuration, workflows, and documentation for the netballstats repository.
The main branch is protected with strict rules to ensure code quality, security, and reliable deployments.
Start here: CONTRIBUTING.md
- How to set up your environment
- Development workflow (branches → PR → review → merge)
- Code style and conventions
- Testing and validation
See: TROUBLESHOOTING.md
- Status check failures (build, security scan)
- Review and approval issues
- Git and merge conflicts
- Local development problems
Read: BRANCH_PROTECTION.md
- Complete policy reference
- Why each rule exists
- FAQ and examples
See: CODEOWNERS
- Who reviews what code
- Auto-enforced by GitHub
- Defines which files may request specific reviewers
| File | Purpose | Audience |
|---|---|---|
| CONTRIBUTING.md | Development workflow and contribution guide | Everyone |
| AGENTS.md | Canonical agent operating guidance | Agents, maintainers |
| CLAUDE.md | Product design context | Agents, designers |
| DESIGN.md | Design tokens and system spec | Agents, designers |
| BRANCH_PROTECTION.md | Branch protection policy and rules | Everyone |
| TROUBLESHOOTING.md | Solutions for common issues | Developers |
| CODEOWNERS | Code ownership definitions | Developers, Maintainers |
| SETUP_SUMMARY.md | Configuration details and record | Maintainers |
| File | Purpose |
|---|---|
| branch-protection-config.sh | Automated branch protection setup (executable) |
| CODEOWNERS | Code ownership definitions for review guidance |
| dependabot.yml | Automated dependency updates |
GitHub Actions workflows in workflows/:
| Workflow | Trigger | Purpose |
|---|---|---|
| deploy-azure-static-web-app.yml | Push to main |
Build and deploy frontend to Azure Static Web Apps |
| scan-container.yml | PR to main |
Security scan of container images |
| cleanup-registry.yml | Manual trigger | Remove old container images from registry |
These are referenced in branch protection rules and must pass before merge.
# 1. Read the workflow
cat CONTRIBUTING.md
# 2. Clone the repo
git clone https://github.com/craigmoyle/netballstats.git
cd netballstats
# 3. Create a feature branch
git checkout -b feature/my-feature
# 4. Make your changes
npm run build:verify # Frontend validation
Rscript -e "..." # Backend validation
# 5. Push and create PR
git add .
git commit -m "Add my feature"
git push origin feature/my-feature
# Open PR on GitHub
# 6. Wait for review and status checks
# 7. Merge when approved- Workflow questions? → CONTRIBUTING.md
- PR is blocked? → TROUBLESHOOTING.md
- Policy questions? → BRANCH_PROTECTION.md
# View current rules
gh api -X GET repos/craigmoyle/netballstats/branches/main/protection
# Modify rules
vim branch-protection-config.sh
./branch-protection-config.sh
# Verify changes
gh api -X GET repos/craigmoyle/netballstats/branches/main/protection✅ 1 approval required
✅ Status checks must pass (strict mode)
✅ Conversation resolution required
✅ Linear history (squash/rebase, no merge commits)
✅ Force push prevention
✅ Deletion prevention
✅ Admin enforcement
Scan container image / scan— Security scanning
- API (
api/,api/R/) → @craigmoyle - Infrastructure (
infra/,azure.yaml) → @craigmoyle - Frontend (
assets/,*.html) → @craigmoyle - Default → @craigmoyle
(See CODEOWNERS for complete list)
| Issue | Solution |
|---|---|
| "Scan container image / scan failed" | Fix vulnerable dependencies, push again |
| "PR is blocked from merging" | Check approval, status checks, conversation resolution |
| "Branch is behind main" | git rebase origin/main && git push --force-with-lease |
| "Can't push to main" | Use a feature branch; all changes go through PRs |
See TROUBLESHOOTING.md for detailed solutions.
- Contributions: See CONTRIBUTING.md
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Last Updated: May 27, 2026
Status: ✅ Active and enforced