|
1 | 1 | # template-rust-lib |
2 | 2 | Base template for a Rust library crate with CI, config files, and branch protection |
3 | 3 |
|
4 | | -## Notes |
5 | | -- The generated repo will have a protected `main` branch with the following required status checks: |
6 | | - - `linux-tests` |
7 | | - - `code-quality/msrv` |
8 | | - - `code-quality/lints` |
9 | | - - `code-quality/wasm-build` |
10 | | -- If the generated repo is public, it will enforce a merge queue using `squash and merge` by default |
11 | | -- Run the following after generating the new repo: |
| 4 | +## Usage |
| 5 | +- Generate a new repo via the green "Use this template" button |
| 6 | +- Run the following to remove template language: |
12 | 7 | ``` |
13 | 8 | # Replace all occurrences with the desired library name |
14 | 9 | $ grep -ir template . --exclude-dir .git --exclude deny.toml |
15 | 10 | # Replace all occurrences as needed |
16 | 11 | $ grep -r "EDIT AS NEEDED" . |
| 12 | +# Then rewrite this `README` |
17 | 13 | ``` |
| 14 | +- Create a branch protection rule for `main` and enable the following as needed: |
| 15 | + - Require a pull request before merging |
| 16 | + - Require 1 approval |
| 17 | + - Dismiss stale pull request approvals when new commits are pushed |
| 18 | + - Require approval of the most recent reviewable push |
| 19 | + - Require status checks to pass before merging (optional, after CI has been triggered) |
| 20 | + - E.g. `linux-test`, `msrv`, and `lints` |
| 21 | + - Require a merge queue using `squash and merge` (optional, only allowed if repo is public) |
| 22 | + - Allow force pushes if needed to bypass above restrictions when necessary |
| 23 | +- Enable full write access for Lurk Lab members by adding the `lurk-dev` team in `Settings->Collaborators and teams` |
| 24 | +- Edit licenses and `deny.toml` as needed |
18 | 25 |
|
19 | 26 | ## License |
20 | 27 |
|
|
0 commit comments