-
-
Notifications
You must be signed in to change notification settings - Fork 161
RFC-0053: defining pull-request workflow #53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 9 commits
426e923
8bc00aa
5dbdf06
14f7a12
d5f78fa
07bfbec
d44a6cc
a731644
3682c00
1087e41
7d9c905
df31178
11bbd1c
2d2a28a
4a730fc
268a343
a4a63ee
9d9d570
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,107 @@ | ||
| --- | ||
| feature: pull-request workflow | ||
| start-date: 2019-09-28 | ||
| author: Ingolf Wagner (@mrVanDalo) | ||
| co-authors: lassulus (@lassulus) | ||
| shepherd-team: (names, to be nominated and accepted by RFC steering committee) | ||
| shepherd-leader: (name to be appointed by RFC steering committee) | ||
| related-issues: | ||
| --- | ||
|
|
||
| # Summary | ||
| [summary]: #summary | ||
|
|
||
| Pull-Request on GitHub are the main way we improve our code base. | ||
| This Document should settle everything that needs to be done | ||
| to bring code upstream in the | ||
| [Nixpkgs Repository](https://github.com/nixos/nixpkgs/). | ||
|
|
||
| # Motivation | ||
| [motivation]: #motivation | ||
|
|
||
| Eliminate questions from contributors and maintainers | ||
| about what should be done next and who should do it. | ||
| This is not a new approach, it is more a settlement | ||
| on how we do it now. | ||
|
|
||
| # Detailed design | ||
| [design]: #detailed-design | ||
|
|
||
| Define all steps of a Pull-Request. | ||
| Use Roles to define responsibilities in every step. | ||
|
|
||
| Terms like **SHOULD** and **MUST** are defined in | ||
| [IETF RFC 2119](https://tools.ietf.org/html/rfc2119). | ||
|
|
||
| ## Roles | ||
| [roles]: #roles | ||
|
|
||
| Everybody involved in the process of contributing has one or multiple | ||
| of the following roles | ||
|
|
||
| * `Contributor` is the person proposing the Pull-Request | ||
| * `Bot` is a bot that provides automated feedback | ||
| * `Reviewer` is any person that reviews the Pull-Request | ||
| (for example a member of [NixOS/nixpkgs-maintainers](https://github.com/orgs/NixOS/teams/nixpkgs-maintainers)) | ||
| * `Merger` is any person with merge privileges | ||
|
|
||
| The responsibilities of theses roles are defined in the rest of this RFC. | ||
|
mrVanDalo marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## States of a Pull-Request | ||
| [state]:#states | ||
|
|
||
| This diagram defines all states of a Pull-Request, | ||
| and their transitions to other states. | ||
|
|
||
|  | ||
|
|
||
| ## Responsibilities and Actions | ||
| [responsibilities]:#responsibilities | ||
|
|
||
| The responsibilities of every role is defined by the following diagram: | ||
|
|
||
|  | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is a common practice that the merger, will backport changes without having a backport pull request.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The pull-request is created in by the contributor in the 5th line, right below the bar. |
||
|
|
||
| ## About Pull-Requests | ||
|
|
||
| ### Packages | ||
|
|
||
| * contributors **SHOULD** evaluate and signal that a Backport is necessary. | ||
| * the [NixOS/backports team](https://github.com/orgs/NixOS/teams/backports) | ||
| **SHOULD** be pinged in situations that are unclear. | ||
| * the [NixOS/backports team](https://github.com/orgs/NixOS/teams/backports) | ||
| **MUST** be informed about every Backport. | ||
|
mrVanDalo marked this conversation as resolved.
Outdated
|
||
| * after the Pull-Request to `master`, `staging` or `staging-next` is merged, | ||
| the Backport Pull-Request is created | ||
| * Backport Pull-Requests **MUST** be linked to the original Pull-Requests (using `git cherry-pick -x`). | ||
| * [NixOS/nixpkgs-maintainers](https://github.com/orgs/NixOS/teams/nixpkgs-maintainers) | ||
| and | ||
| [NixOS/backports](https://github.com/orgs/NixOS/teams/backports) | ||
| can deny the backport. | ||
|
|
||
| ### Modules | ||
|
|
||
| * modules **SHOULD** have tests | ||
| * reviewers **SHOULD** encourage contributors to write tests for new modules | ||
| * modules **SHOULD NOT** be Backported | ||
|
|
||
| ## Links | ||
|
|
||
| * [How to write Module Tests](https://nixos.org/nixos/manual/index.html#sec-nixos-tests) | ||
| * [Contribution Guidelines](https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md) | ||
|
|
||
| # Unresolved questions | ||
| [unresolved]: #unresolved-questions | ||
|
|
||
| * The Pull-Request of a Backport should be created by the bot. | ||
| But if that is the case, the original contributor might not be able | ||
| to make changes on the branch behind the Pull-Request. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Random idea: how about something like
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The problem is the bot would create the pull-request and the contributor must be able to edit it.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And the main catch is what happens if person A creates a PR and person B requests a backport… |
||
| * Backports without changes in `master` are not discussed. | ||
| for example security patches that only affect older versions in stable. | ||
|
|
||
| # Future work | ||
| [future]: #future-work | ||
|
|
||
| * The Pull-Request template needs an option "Backport needed?" | ||
|
mrVanDalo marked this conversation as resolved.
Outdated
|
||
| * Add a link to this document in the | ||
| [Contribution Guidelines](https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| .history |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my experience "merger" usually means the resulting of a merge and rarely designate a person. The standard terms that could be used instead are "integrator" and "committer" (the second being less clearly related to PRs but clearer about the required privileges).