Skip to content

Commit edcca02

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 edcca02

6 files changed

+375
-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

+110-37
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,111 @@
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
2836

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

31-
## Fixing bugs and implementing new features
40+
## Find an Issue
3241

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.
42+
Issues labelled as ["good first issue"] are suitable for new
43+
contributors. They provide extra information to help you make your first
44+
contribution.
3645

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

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

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

44-
### Commits
85+
## Logical Grouping of Commits
4586

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

51-
#### Commit message guidelines
95+
## Commit message guidelines
5296

5397
A good commit message should describe what changed and why.
5498

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

62106
Examples:
63-
- `aya: handle reordered functions`
64-
- `aya-bpf: SkSkbContext: add ::l3_csum_replace`
107+
* `aya: handle reordered functions`
108+
* `aya-bpf: SkSkbContext: add ::l3_csum_replace`
65109

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

73117
Examples:
74118

75-
- `Fixes: #1337`
76-
- `Refs: #1234`
119+
* `Fixes: #1337`
120+
* `Refs: #1234`
77121

78122
Sample complete commit message:
79123

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

0 commit comments

Comments
 (0)