|
| 1 | +# Contribution process |
| 2 | + |
| 3 | +## Before contributing |
| 4 | + |
| 5 | +We encourage people to discuss their changes before opening a PR. This gives the Reference team a chance to understand your idea better and ensure it fits with the intended direction of the Reference. Typically, you should file an issue or start a thread on [Zulip](#zulip) before submitting a pull request. |
| 6 | + |
| 7 | +## Contributing process overview |
| 8 | + |
| 9 | +The general outline of a contribution is as follows: |
| 10 | + |
| 11 | +1. [Check out the source.](../tooling/building.md#checking-out-the-source) |
| 12 | +2. [Install mdbook.](../tooling/building.md#installing-mdbook) |
| 13 | +3. [Learn to build the book locally.](../tooling/building.md#running-mdbook) |
| 14 | +4. Make your changes to the source files. Be sure to follow all the guidelines in this book for styling, conventions, etc. |
| 15 | +5. [Run the tests.](../tests.md) |
| 16 | +6. [Submit a pull request](#submitting-a-pull-request) |
| 17 | +7. The PR will go through the review process. |
| 18 | + - There is a [guide](../review-policy.md) for the types of reviews it may undergo. |
| 19 | + - This may take a while, as the team has limited time. |
| 20 | +8. Once approved, a team member will merge the change. |
| 21 | + - The team may apply editorial changes before merging. |
| 22 | + - It may take a few weeks for the change to appear on the [nightly website](https://doc.rust-lang.org/nightly/reference/). See [the publishing chapter](../publishing.md) for more details. |
| 23 | + |
| 24 | +## Office hours |
| 25 | + |
| 26 | +The lang-docs team holds office hours on Tuesdays at [3:30 PM US/Eastern](https://dateful.com/convert/est-edt-eastern-time?t=330pm). We meet on [Jitsi Meet](https://meet.jit.si/rust-t-lang-docs). Check the [Zulip](#zulip) channel for the latest status and availability. |
| 27 | + |
| 28 | +## Zulip |
| 29 | + |
| 30 | +There are channels on Zulip for more direct discussions about the Reference: |
| 31 | + |
| 32 | +- [`#t-lang-docs`](https://rust-lang.zulipchat.com/#narrow/channel/237824-t-lang-docs) --- Used by the lang docs team. |
| 33 | +- [`#t-lang-docs/reference`](https://rust-lang.zulipchat.com/#narrow/channel/520709-t-lang-docs.2Freference) --- Discussion about the Reference specifically. |
| 34 | + |
| 35 | +## Working on issues |
| 36 | + |
| 37 | +Issues labeled with [Help Wanted] are ones the team wants to see addressed and is asking for contributions. |
| 38 | + |
| 39 | +If you want to work on an issue, you can assign yourself by commenting `@rustbot claim`. See [issue assignment] for more information. |
| 40 | + |
| 41 | +[Help Wanted]: https://github.com/rust-lang/reference/issues?q=state%3Aopen%20label%3A%22Help%20Wanted%22 |
| 42 | +[issue assignment]: https://forge.rust-lang.org/triagebot/issue-assignment.html |
| 43 | + |
| 44 | +## New features |
| 45 | + |
| 46 | +See the [stabilization chapter] for information on how to document new features. |
| 47 | + |
| 48 | +[stabilization chapter]: stabilization.md |
| 49 | + |
| 50 | +## Minor changes |
| 51 | + |
| 52 | +Minor changes, like small corrections, wording cleanup, or formatting fixes, can be made simply by opening a PR. |
| 53 | + |
| 54 | +## Major changes |
| 55 | + |
| 56 | +Major changes, such as large rewrites, reorganization, or new chapters, should be approved by the Reference team first. Open an issue (if there isn't already one) to discuss the kinds of changes you are interested in. If the Reference team is able, they can work with you to approve the change. |
| 57 | + |
| 58 | +## Submitting a pull request |
| 59 | + |
| 60 | +When submitting a pull request, please follow these guidelines: |
| 61 | + |
| 62 | +- Include a clear description of what the change is and why it is being made. |
| 63 | +- Try to keep a clean git history, with each commit explaining the reason for the change. |
| 64 | +- Use [GitHub’s keywords] in the description to automatically link to an issue if the PR resolves it. For example, `Closes #1234` will link issue #1234 to the PR. When the PR is merged, GitHub will automatically close the issue. |
| 65 | + |
| 66 | +When your PR is submitted, GitHub automatically runs all tests. The GitHub interface shows a green checkmark if it passes, or a red X if it fails. Links to the logs are available on the PR page to diagnose any issues. |
| 67 | + |
| 68 | +[GitHub’s keywords]: https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue |
| 69 | + |
| 70 | +### PR labeling |
| 71 | + |
| 72 | +PRs are marked with [labels] like [`S-waiting-on-review`] or [`S-waiting-on-author`] to indicate their status. Anyone can use the [`@rustbot`] bot to adjust the labels. If a PR is marked as `S-waiting-on-author` and you have pushed new changes that you would like reviewed, you can comment on the PR with `@rustbot ready`. The bot will switch the labels on the PR. |
| 73 | + |
| 74 | +More information about these commands can be found at the [shortcuts documentation]. |
| 75 | + |
| 76 | +[`@rustbot`]: https://github.com/rustbot |
| 77 | +[`S-waiting-on-author`]: https://github.com/rust-lang/reference/labels/S-waiting-on-author |
| 78 | +[`S-waiting-on-review`]: https://github.com/rust-lang/reference/labels/S-waiting-on-review |
| 79 | +[labels]: https://github.com/rust-lang/reference/labels |
| 80 | +[shortcuts documentation]: https://forge.rust-lang.org/triagebot/shortcuts.html |
0 commit comments