Skip to content

Commit 082a5f1

Browse files
committed
Add project governance documentation
Explains how Maintainers are selected and their responsibilities. Explains the Pull Request review workflow. Adds config for Mergify to enforce this workflow. Signed-off-by: Dave Tucker <[email protected]>
1 parent 73a34e1 commit 082a5f1

6 files changed

+376
-37
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<!--
2+
Thank you for your contribution to Aya! 🎉
3+
4+
For Work In Progress Pull Requests, please use the Draft PR feature.
5+
6+
Before submitting a Pull Request, please ensure you've done the following:
7+
- 📖 Read the Aya Contributing Guide: https://github.com/aya-rs/aya/blob/main/CONTRIBUTING.md
8+
- 📖 Read the Aya Code of Conduct: https://github.com/aya-rs/aya/blob/main/CODE_OF_CONDUCT.md
9+
- 👷‍♀️ Create small PRs. In most cases this will be possible.
10+
- ✅ Provide tests for your changes.
11+
- 📝 Use descriptive commit messages: https://cbea.ms/git-commit/
12+
- 📗 Update any related documentation.
13+
14+
-->
15+
16+
# Summary
17+
<!---
18+
Summarize the changes you're making here.
19+
Detailed information belongs in the Git Commit messages.
20+
Feel free to flag anything you thing needs a reviewer's attention.
21+
-->
22+
23+
# Related Issues
24+
<!--
25+
For example:
26+
27+
- Closes: #1234
28+
- Relates To: #1234
29+
-->
30+
31+
# Added/updated tests?
32+
33+
_We strongly encourage you to add a test for your changes._
34+
35+
- [ ] Yes
36+
- [ ] No, and this is why: _please replace this line with details on why tests
37+
have not been included_
38+
- [ ] I need help with writing tests
39+
40+
# Checklist
41+
42+
- [ ] Rust code has been formatted with `cargo +nightly fmt`.
43+
- [ ] All clippy lints have been fixed.
44+
You can find failing lints with `./clippy.sh`.
45+
- [ ] Unit tests are passing locally with `cargo test`.
46+
- [ ] The [Integration tests] are passing locally.
47+
- [ ] I have blessed any API changes with `cargo xtask public-api --bless`.
48+
49+
[Integration tests]: https://github.com/aya-rs/aya/blob/main/test/README.md
50+
51+
# (Optional) What GIF best describes this PR or how it makes you feel?

CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @aya-rs/aya-maintainers

CONTRIBUTING.md

+111-37
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,112 @@
1-
# Contributing to Aya
1+
# Contributing Guide
22

3-
Thanks for your help improving the project!
3+
* [New Contributor Guide](#contributing-guide)
4+
* [Ways to Contribute](#ways-to-contribute)
5+
* [Find an Issue](#find-an-issue)
6+
* [Ask for Help](#ask-for-help)
7+
* [Pull Request Lifecycle](#pull-request-lifecycle)
8+
* [Pull Request Checklist](#pull-request-checklist)
9+
* [Documentation Style](#documentation-style)
410

5-
## Reporting issues
11+
Welcome! We are glad that you want to contribute to our project! 💖
612

7-
If you believe you've discovered a bug in aya, please check if the bug is
8-
already known or [create an issue](https://github.com/aya-rs/aya/issues) on
9-
github. Please also report an issue if you find documentation that you think is
10-
confusing or could be improved.
13+
As you get started, you are in the best position to give us feedback on areas of
14+
our project that we need help with including:
1115

12-
When creating a new issue, make sure to include as many details as possible to
13-
help us understand the problem. When reporting a bug, always specify which
14-
version of aya you're using and which version of the linux kernel.
16+
* Problems found during setting up a new developer environment
17+
* Gaps in our Quickstart Guide or documentation
18+
* Bugs in our automation scripts
1519

16-
## Documentation
20+
If anything doesn't make sense, or doesn't work when you run it, please open a
21+
bug report and let us know!
1722

18-
If you find an API that is not documented, unclear or missing examples, please
19-
file an issue. If you make changes to the documentation, please read
20-
[How To Write Documentation] and make sure your changes conform to the
21-
format outlined in [Documenting Components].
23+
## Ways to Contribute
2224

23-
[How To Write Documentation]: https://doc.rust-lang.org/rustdoc/how-to-write-documentation.html
24-
[Documenting Components]: https://doc.rust-lang.org/rustdoc/how-to-write-documentation.html#documenting-components
25+
We welcome many different types of contributions including:
2526

26-
If you want to make changes to the Aya Book, see the readme in the
27-
[book repository].
27+
* New features
28+
* Builds, CI/CD
29+
* Bug fixes
30+
* Documentation
31+
* Issue Triage
32+
* Answering questions on [Discord]
33+
* Web design
34+
* Communications / Social Media / Blog Posts
35+
* Release management
36+
* Community management
2837

29-
[book repository]: https://github.com/aya-rs/book
38+
Not everything happens through a GitHub pull request. Please come to our
39+
[Discord] and let's discuss how we can work together.
3040

31-
## Fixing bugs and implementing new features
41+
## Find an Issue
3242

33-
Make sure that your work is tracked by an issue or a (draft) pull request, this
34-
helps us avoid duplicating work. If your work includes publicly visible changes,
35-
make sure those are properly documented as explained in the section above.
43+
Issues labelled as ["good first issue"] are suitable for new
44+
contributors. They provide extra information to help you make your first
45+
contribution.
3646

37-
### Running tests
47+
Issues labelled as ["help wanted"] are usually more difficult. We
48+
recommend them for people who aren't core maintainers, but have either made some
49+
contributions already or feel comfortable with starting from more demanding
50+
tasks.
3851

39-
Run the unit tests with `cargo test`. See [Aya Integration Tests] regarding
40-
running the integration tests.
52+
Sometimes there won’t be any issues with these labels. That’s ok! There is
53+
likely still something for you to work on. If you want to contribute but you
54+
don’t know where to start or can't find a suitable issue, you can reach out to
55+
us on [Discord] and we will be happy to help.
4156

42-
[Aya Integration Tests]: https://github.com/aya-rs/aya/blob/main/test/README.md
57+
Once you see an issue that you'd like to work on, please post a comment saying
58+
that you want to work on it. Something like "I want to work on this" is fine.
59+
60+
## Ask for Help
61+
62+
The best way to reach us with a question when contributing is to ask on:
63+
64+
* The original GitHub issue
65+
* Our [Discord]
66+
67+
## Pull Request Lifecycle
68+
69+
Pull requests are managed by Mergify.
70+
71+
Our process is currently as follows:
72+
73+
1. When you open a PR a maintainer will automatically be assigned for review
74+
1. Make sure that your PR is passing CI - if you need help with failing checks
75+
please feel free to ask!
76+
1. Once it is passing all CI checks, a maintainer will review your PR and you
77+
may be asked to make changes.
78+
1. When you have received an approval from at least one maintainer, your PR will
79+
be merged.
80+
81+
In some cases, other changes may conflict with your PR. If this happens, you
82+
will get notified by a comment in the issue that your PR requires a rebase, and
83+
the `needs-rebase` label will be applied. Once a rebase has been performed, this
84+
label will be automatically removed.
4385

44-
### Commits
86+
## Logical Grouping of Commits
4587

4688
It is a recommended best practice to keep your changes as logically grouped as
4789
possible within individual commits. If while you're developing you prefer doing
4890
a number of commits that are "checkpoints" and don't represent a single logical
4991
change, please squash those together before asking for a review.
92+
When addressing review comments, please perform an interactive rebase and edit
93+
commits directly rather than adding new commits with messages like
94+
"Fix review comments".
5095

51-
#### Commit message guidelines
96+
## Commit message guidelines
5297

5398
A good commit message should describe what changed and why.
5499

55100
1. The first line should:
56-
- Contain a short description of the change (preferably 50 characters or less,
101+
* Contain a short description of the change (preferably 50 characters or less,
57102
and no more than 72 characters)
58-
- Be entirely in lowercase with the exception of proper nouns, acronyms, and
103+
* Be entirely in lowercase with the exception of proper nouns, acronyms, and
59104
the words that refer to code, like function/variable names
60-
- Be prefixed with the name of the sub crate being changed
105+
* Be prefixed with the name of the sub crate being changed
61106

62107
Examples:
63-
- `aya: handle reordered functions`
64-
- `aya-bpf: SkSkbContext: add ::l3_csum_replace`
108+
* `aya: handle reordered functions`
109+
* `aya-bpf: SkSkbContext: add ::l3_csum_replace`
65110

66111
1. Keep the second line blank.
67112
1. Wrap all other lines at 72 columns (except for long URLs).
@@ -72,8 +117,8 @@ A good commit message should describe what changed and why.
72117

73118
Examples:
74119

75-
- `Fixes: #1337`
76-
- `Refs: #1234`
120+
* `Fixes: #1337`
121+
* `Refs: #1234`
77122

78123
Sample complete commit message:
79124

@@ -92,3 +137,32 @@ nicely even when it is indented.
92137
Fixes: #1337
93138
Refs: #453, #154
94139
```
140+
141+
## Pull Request Checklist
142+
143+
When you submit your pull request, or you push new commits to it, our automated
144+
systems will run some checks on your new code. We require that your pull request
145+
passes these checks, but we also have more criteria than just that before we can
146+
accept and merge it. Theses requirements are described in the
147+
[Pull Request Template].
148+
149+
It is recommended that you run the integration tests locally before submitting
150+
your Pull Request. Please see [Aya Integration Tests] for more information.
151+
152+
## Documentation Style
153+
154+
If you find an API that is not documented, unclear or missing examples, please
155+
file an issue. If you make changes to the documentation, please read
156+
[How To Write Documentation] and make sure your changes conform to the
157+
format outlined in [Documenting Components].
158+
159+
If you want to make changes to the Aya Book, see the README in the
160+
[book repository].
161+
162+
["good first issue"]: https://github.com/aya-rs/aya/labels/good%20first%20issue
163+
["help wanted"]: https://github.com/aya-rs/aya/labels/help%20wanted
164+
[Aya Integration Tests]: https://github.com/aya-rs/aya/blob/main/test/README.md
165+
[How To Write Documentation]: https://doc.rust-lang.org/rustdoc/how-to-write-documentation.html
166+
[Documenting Components]: https://doc.rust-lang.org/rustdoc/how-to-write-documentation.html#documenting-components
167+
[book repository]: https://github.com/aya-rs/book
168+
[Discord]: https://discord.gg/xHW2cb2N6G

0 commit comments

Comments
 (0)