Skip to content

Commit 3987e92

Browse files
authored
Merge pull request #157 from rust-embedded/ops
add operational notes
2 parents fc159a6 + 545a5bf commit 3987e92

File tree

4 files changed

+213
-0
lines changed

4 files changed

+213
-0
lines changed

ops/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Operational notes

ops/post-transfer.md

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# Post transfer TODO list
2+
3+
## Travis CI
4+
5+
Browse to https://travis-ci.org/rust-embedded/repo-name/settings and make sure that "Build pushed
6+
pull requests" is enabled.
7+
8+
9+
## Source
10+
11+
Push a commit to `master` that does the following:
12+
13+
- Creates `.github/CODEOWNERS` with the following contents:
14+
15+
``` text
16+
* rust-embedded/team-name collaborator-name another-collaborator
17+
```
18+
19+
- Adds a copy of [`CODE_OF_CONDUCT.md`][CoC]. Don't forget to adjust the team name and associated
20+
link accordingly.
21+
22+
[CoC]: https://github.com/rust-embedded/cortex-m/blob/master/CODE_OF_CONDUCT.md
23+
24+
- Modifies `.travis.yml` to:
25+
- Allow builds on these three branches. `staging` and `trying` are required by bors. We include
26+
`master` to have builds on pushed PRs.
27+
28+
``` yaml
29+
branches:
30+
only:
31+
- master
32+
- staging
33+
- trying
34+
```
35+
36+
- Prevent builds on changes to master. This is to prevent testing a PR *twice*: one build is
37+
required to land the PR, but when the changes are merged into master we want to avoid that
38+
second build.
39+
40+
``` yaml
41+
matrix:
42+
include:
43+
- env: TARGET=thumbv6m-none-eabi
44+
# add this `if` ...
45+
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
46+
47+
- env: TARGET=thumbv7m-none-eabi
48+
# ... to all the elements of the build matrix
49+
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
50+
```
51+
52+
- Mention the Code of Conduct and which team owns this repository in the README
53+
54+
``` markdown
55+
# project-name
56+
57+
> description of the project
58+
59+
<!-- TODO add this -->
60+
61+
This project is developed and maintained by the [Cortex-M team][team].
62+
63+
<!-- ... omitting stuff in between ... -->
64+
65+
<!-- TODO add this -->
66+
67+
## Code of Conduct
68+
69+
Contribution to this crate is organized under the terms of the [Rust Code of
70+
Conduct][CoC], the maintainer of this crate, the [Cortex-M team][team], promises
71+
to intervene to uphold that code of conduct.
72+
73+
[CoC]: CODE_OF_CONDUCT.md
74+
[team]: https://github.com/rust-embedded/wg#the-cortex-m-team
75+
```
76+
77+
- If the repository uses CI, configure bors. Add a `.github/bors.toml` file with these contents:
78+
79+
``` toml
80+
block_labels = ["needs-decision"]
81+
delete_merged_branches = true
82+
required_approvals = 1
83+
status = ["continuous-integration/travis-ci/push"]
84+
```
85+
86+
## Bors
87+
88+
If the repository uses CI, update bors settings.
89+
90+
- Browse to https://app.bors.tech/repositories, click on rust-embedded/repo-name and then switch
91+
to the "Settings" tab.
92+
93+
- Synchronize both "Reviewers" and "Members" to people with "Push" (write) access to the
94+
repository.
95+
96+
## Repository
97+
98+
Update the repository settings.
99+
100+
- Browse to https://github.com/rust-embedded/repo-name/settings and switch to the "Collaborators &
101+
teams" tab.
102+
103+
- Add the team that will oversee the project and give them "Admin" permissions.
104+
105+
- The previous owner and old collaborators should have "Write" permissions.
106+
107+
- Now switch to the "Branches" tab and add a branch protection rule for `master` with the
108+
following settings:
109+
110+
- [x] Require pull requests reviews before merging
111+
- [x] Dismiss stale pull request approvals when new commits are pushed
112+
- [x] Require review from Code Owners
113+
114+
- [x] Require status checks to pass before merging (NOTE omit if not using CI)
115+
- [x] bors (NOTE if bors doesn't appear here you will have to make a dummy PR, `bors r+` it
116+
and then close it. This will make bors visible in this list)
117+
118+
- [x] Include administrators
119+
120+
## crates.io
121+
122+
If applicable, add new owners to crates.io. Have the current owner add the team that's receiving
123+
the crate as a team owner.
124+
125+
```
126+
$ cargo owner --add github:rust-embedded:team-name
127+
```

ops/publish.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Publishing workflow
2+
3+
## Pull request
4+
5+
Open a PR that:
6+
7+
- Updates `CHANGELOG.md` to include the new version. We use the [Keep a Changelog] format. Don't
8+
forget to include the version link at the bottom. Example below:
9+
10+
[Keep a Changelog]: https://keepachangelog.com/en/1.0.0/
11+
12+
``` markdown
13+
## [Unreleased]
14+
15+
<!-- TODO Move everything in this section to the new version section below -->
16+
17+
<!-- TODO Add this new section -->
18+
## [v0.5.3] - 2018-08-02
19+
20+
### Added
21+
22+
- Some stuff.
23+
24+
### Fixed
25+
26+
- Some stuff.
27+
28+
### Removed
29+
30+
- Some stuff.
31+
32+
<!-- NOTE This was already here -->
33+
## [v0.5.2] - 2018-05-18
34+
35+
<!-- ... omitting stuff in between ... -->
36+
37+
<!-- TODO Change the start of the range -->
38+
[Unreleased]: https://github.com/rust-embedded/cortex-m/compare/v0.5.3...HEAD
39+
40+
<!-- TODO Add this new link -->
41+
[v0.5.3]: https://github.com/rust-embedded/cortex-m/compare/v0.5.2...v0.5.3
42+
43+
<!-- NOTE This was already here -->
44+
[v0.5.2]: https://github.com/rust-embedded/cortex-m/compare/v0.5.1...v0.5.2
45+
```
46+
47+
- Bumps the crate version in `Cargo.toml`.
48+
49+
## `cargo publish`
50+
51+
After the PR has been merged, run `cargo publish` locally
52+
53+
## Tag
54+
55+
Afterwards, create an annotated tag and push it
56+
57+
``` console
58+
$ git tag -a 'v0.5.3' -m 'v0.5.3'
59+
60+
$ git push origin v0.5.3
61+
```

ops/review.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Reviewer handbook
2+
3+
These apply to both team members and collaborators.
4+
5+
We use https://bors.tech in all our repositories. Bors commands are documented in
6+
https://bors.tech/documentation/
7+
8+
All PRs must be approved using [GitHub reviews] before you can send the PR to bors.
9+
10+
[GitHub reviews]: https://help.github.com/articles/approving-a-pull-request-with-required-reviews/
11+
12+
Most PRs can be approved by a single team member or collaborator, but PRs labeled `needs-decision`
13+
need to be approved by the whole team (see [voting majority]) before they are sent to bors.
14+
15+
- Apply the `needs-decision` label to all PRs that include breaking changes and / or major changes
16+
that have not been previously discussed and approved.
17+
18+
- bors will ignore `r+` commands on PRs that have the `needs-decision` label.
19+
20+
- Remove the `needs-decision` label after voting majority has been achieved.
21+
22+
- At this point you can review the PR and send it to bors.
23+
24+
[voting majority]: https://github.com/rust-embedded/wg/blob/master/rfcs/0136-teams.md#voting-majority

0 commit comments

Comments
 (0)