Skip to content

Commit b3d01db

Browse files
Description of changes
1 parent 374f04d commit b3d01db

7 files changed

Lines changed: 456 additions & 0 deletions

File tree

.github/CODEOWNERS

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Code Owners
2+
3+
# Default owners
4+
* @your-github-username
5+
6+
# Core application
7+
/apps/core-web/ @your-github-username
8+
9+
# Individual crates
10+
/crates/core-analytics/ @your-github-username
11+
/crates/core-cache/ @your-github-username
12+
/crates/core-cli/ @your-github-username
13+
/crates/core-codegen/ @your-github-username
14+
/crates/core-config/ @your-github-username
15+
/crates/core-data/ @your-github-username
16+
/crates/core-feature-flags/ @your-github-username
17+
/crates/core-graphql/ @your-github-username
18+
/crates/core-grpc/ @your-github-username
19+
/crates/core-ml/ @your-github-username
20+
/crates/core-observability/ @your-github-username
21+
/crates/core-performance/ @your-github-username
22+
/crates/core-resilience/ @your-github-username
23+
/crates/core-rest/ @your-github-username
24+
/crates/core-sdk-gen/ @your-github-username
25+
/crates/core-security/ @your-github-username
26+
/crates/core-tenancy/ @your-github-username
27+
/crates/wasm-plugins-host/ @your-github-username
28+
29+
# Documentation
30+
/docs/ @your-github-username
31+
/*.md @your-github-username
32+
33+
# Configuration
34+
/configs/ @your-github-username
35+
/scripts/ @your-github-username
36+
37+
# CI/CD
38+
/.github/workflows/ @your-github-username
39+
/.github/dependabot.yml @your-github-username

.github/branch-protection-rules.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Branch Protection Rules Configuration
2+
3+
This document outlines the recommended branch protection rules for the Core Web repository to ensure code quality, security, and stability.
4+
5+
## Main Branch Protection Rules
6+
7+
### Required Status Checks
8+
9+
The following status checks should be required before merging to the `main` branch:
10+
11+
1. **CI Workflow**
12+
- Status check: `ci.yml`
13+
- Require branches to be up to date before merging
14+
15+
2. **CodeQL Analysis**
16+
- Status check: `codeql.yml`
17+
- Require branches to be up to date before merging
18+
19+
3. **Security Audit**
20+
- Status check: `security-audit.yml`
21+
- Require branches to be up to date before merging
22+
23+
4. **Formatting Check**
24+
- Status check: `formatting.yml`
25+
- Require branches to be up to date before merging
26+
27+
5. **Cross-Platform Tests**
28+
- Status check: `cross-platform.yml`
29+
- Require branches to be up to date before merging
30+
31+
### Required Pull Request Reviews
32+
33+
- Require pull request reviews before merging
34+
- Require at least 1 approved review
35+
- Dismiss stale pull request approvals when new commits are pushed
36+
- Require review from Code Owners (if CODEOWNERS file exists)
37+
38+
### Additional Branch Protection Settings
39+
40+
- Require status checks to pass before merging
41+
- Require branches to be up to date before merging
42+
- Require linear history
43+
- Include administrators in restrictions
44+
- Allow force pushes: None
45+
- Allow deletions: No
46+
- Restrict who can push: None (or specify specific users/teams)
47+
48+
## Feature Branch Protection Rules
49+
50+
For important feature branches, consider:
51+
52+
- Require linear history
53+
- Allow force pushes: None
54+
- Allow deletions: No
55+
56+
## Release Branch Protection Rules
57+
58+
For release branches (e.g., `release/*`):
59+
60+
- Require pull request reviews before merging
61+
- Require at least 2 approved reviews
62+
- Require status checks to pass before merging
63+
- Require branches to be up to date before merging
64+
- Require linear history
65+
- Include administrators in restrictions
66+
- Allow force pushes: None
67+
- Allow deletions: No
68+
69+
## Implementation Instructions
70+
71+
To implement these branch protection rules:
72+
73+
1. Go to your GitHub repository
74+
2. Navigate to Settings > Branches
75+
3. Click "Add rule"
76+
4. Set the branch name pattern (e.g., `main` for main branch)
77+
5. Configure the settings as outlined above
78+
6. Save the branch protection rule
79+
80+
## CODEOWNERS File
81+
82+
Consider creating a CODEOWNERS file to automatically request reviews from code owners:
83+
84+
```
85+
# Default owners
86+
* @your-github-username
87+
88+
# Core modules
89+
/apps/core-web/ @your-github-username
90+
/crates/core-analytics/ @your-github-username
91+
/crates/core-security/ @your-github-username
92+
```
93+
94+
## Required Conversation Resolution
95+
96+
- Require conversation resolution before merging
97+
- All conversations on code must be resolved before a pull request can be merged
98+
99+
## Commit Signing
100+
101+
Consider requiring signed commits for additional security:
102+
103+
- Require signed commits
104+
- All commits must be signed before they can be merged

.github/repository-settings.md

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
# Repository Settings Configuration
2+
3+
This document provides a comprehensive guide to configuring your GitHub repository settings for optimal security, collaboration, and workflow management.
4+
5+
## General Settings
6+
7+
### Repository Name
8+
- Keep as is or rename to reflect the project accurately
9+
10+
### Description
11+
- "A production-ready, multi-protocol web platform built with Rust"
12+
13+
### Website
14+
- Link to project documentation or GitHub Pages if enabled
15+
16+
### Issues
17+
- [x] Enable issues
18+
19+
### Projects
20+
- [x] Enable projects (for roadmap and feature tracking)
21+
22+
### Wiki
23+
- [ ] Disable wiki (use documentation in repository instead)
24+
25+
### Downloads
26+
- [x] Enable downloads
27+
28+
### Merge Button
29+
- [x] Allow merge commits
30+
- [x] Allow squash merging
31+
- [ ] Allow rebase merging (optional)
32+
33+
### Template Repository
34+
- [ ] Mark as template (unless you want others to use it as a template)
35+
36+
## Collaborators & Teams
37+
38+
### Manage Access
39+
- Add collaborators with appropriate permission levels:
40+
- Admin: For repository owners
41+
- Write: For active contributors
42+
- Read: For observers and security auditors
43+
44+
## Webhooks & Services
45+
46+
### Webhooks
47+
- Configure webhooks for:
48+
- CI/CD notifications
49+
- Slack/Discord notifications
50+
- Deployment triggers
51+
52+
## Branches
53+
54+
### Default Branch
55+
- Set to `main`
56+
57+
### Branch Protection Rules
58+
See separate branch-protection-rules.md file
59+
60+
## Rulesets
61+
62+
### Branch Rulesets
63+
- Create rulesets for additional protection:
64+
- Require signed commits
65+
- Restrict file extensions
66+
- Restrict file paths
67+
68+
## Deploy Keys
69+
70+
### SSH Keys
71+
- Add deploy keys for automated deployments if needed
72+
73+
## Secrets
74+
75+
### Repository Secrets
76+
Add the following secrets for workflows:
77+
- `CRATES_TOKEN` - For publishing to crates.io
78+
- `GITHUB_TOKEN` - For GitHub Pages deployment
79+
- Any other API keys or tokens needed for CI/CD
80+
81+
## Webhooks & Services
82+
83+
### GitHub Apps
84+
- Configure GitHub Apps for enhanced functionality:
85+
- Code scanning alerts
86+
- Dependency graph updates
87+
- Security notifications
88+
89+
## Integrations & Services
90+
91+
### Third-party Applications
92+
- Configure integrations with:
93+
- Continuous integration services
94+
- Code quality tools
95+
- Monitoring services
96+
97+
## Settings for Security
98+
99+
### Security & Analysis
100+
- [x] Enable Dependabot alerts
101+
- [x] Enable Dependabot security updates
102+
- [x] Enable GitHub Advanced Security (if available)
103+
- Code scanning
104+
- Secret scanning
105+
- Dependency review
106+
107+
### Automated Security Fixes
108+
- [x] Enable automated security fixes
109+
110+
### Allow Merge Commits
111+
- [x] Allow merge commits for clear history
112+
113+
### Allow Squash Merging
114+
- [x] Allow squash merging for clean feature branches
115+
116+
### Allow Rebase Merging
117+
- [ ] Allow rebase merging (optional, can be confusing for new contributors)
118+
119+
## Settings for Collaboration
120+
121+
### Issues
122+
- Enable issues for bug tracking and feature requests
123+
124+
### Discussions
125+
- Enable discussions for community interaction
126+
127+
### Pages
128+
- Configure GitHub Pages for documentation hosting:
129+
- Source: gh-pages branch
130+
- Custom domain (if applicable)
131+
132+
### Sponsorships
133+
- Enable sponsorships if funding.yml is configured
134+
135+
## Settings for Code Review
136+
137+
### Pull Request Settings
138+
- [x] Require pull request reviews before merging
139+
- [x] Dismiss stale pull request approvals when new commits are pushed
140+
- [x] Require review from Code Owners
141+
- [x] Require branches to be up to date before merging
142+
143+
### Commit Status Checks
144+
- [x] Require status checks to pass before merging
145+
- [x] Require branches to be up to date before merging
146+
147+
## Settings for Automation
148+
149+
### Webhooks
150+
- Configure webhooks for:
151+
- CI notifications
152+
- Deployment triggers
153+
- Chat notifications
154+
155+
### GitHub Apps
156+
- Install and configure GitHub Apps for:
157+
- Code quality monitoring
158+
- Security scanning
159+
- Project management
160+
161+
## Audit Log
162+
163+
Regularly review the audit log for:
164+
- Permission changes
165+
- Branch protection changes
166+
- Secret access
167+
- Deployment activities
168+
169+
## Compliance
170+
171+
### Archive Settings
172+
- Configure repository archiving policy if needed
173+
174+
### Transfer Settings
175+
- Set up transfer ownership procedures if needed
176+
177+
## Backup and Recovery
178+
179+
### Repository Backup
180+
- Ensure regular backups of the repository
181+
- Document recovery procedures
182+
183+
## Monitoring and Alerts
184+
185+
### Notification Settings
186+
- Configure notification preferences for:
187+
- Pull requests
188+
- Issues
189+
- Commits
190+
- Security alerts

CONTRIBUTING.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,40 @@ When contributing code, please consider:
8282
- Following secure coding practices
8383
- Updating dependencies responsibly
8484

85+
## Code Review Process
86+
87+
All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more information on using pull requests.
88+
89+
Our repository uses branch protection rules to ensure code quality:
90+
91+
- All changes must be made through pull requests
92+
- Main branch requires status checks to pass before merging
93+
- Main branch requires at least one approved review
94+
- Main branch is protected from force pushes
95+
- Linear history is required
96+
97+
## Branch Protection
98+
99+
The main branch is protected with the following rules:
100+
101+
1. **Required Status Checks**
102+
- CI workflow must pass
103+
- CodeQL analysis must pass
104+
- Security audit must pass
105+
- Formatting checks must pass
106+
- Cross-platform tests must pass
107+
108+
2. **Required Pull Request Reviews**
109+
- At least one approved review is required
110+
- Stale approvals are dismissed when new commits are pushed
111+
- Code owners are automatically requested for review
112+
113+
3. **Additional Protection**
114+
- Branch must be up to date before merging
115+
- Linear history is required
116+
- Force pushes are denied
117+
- Deletion is denied
118+
85119
## Questions?
86120

87121
If you have any questions about contributing, feel free to open an issue or contact the maintainers.

0 commit comments

Comments
 (0)