aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/CODEOWNERS5
-rw-r--r--CONTRIBUTING.md133
-rw-r--r--dev/doc/MERGING.md177
-rw-r--r--dev/doc/shield-icon.pngbin0 -> 2512 bytes
4 files changed, 101 insertions, 214 deletions
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 2f90895279..a7c0846e35 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -6,13 +6,10 @@
/.github/ @coq/contributing-process-maintainers
/CONTRIBUTING.md @coq/contributing-process-maintainers
+/dev/doc/shield-icon.png @coq/contributing-process-maintainers
/dev/doc/release-process.md @coq/contributing-process-maintainers
-/dev/doc/MERGING.md @coq/pushers
-# This ensures that all members of the @coq/pushers
-# team are notified when the merging doc changes.
-
########## Build system ##########
/Makefile* @coq/legacy-build-maintainers
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index f7661743a2..a0139e422d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -42,6 +42,7 @@ well.
- [Becoming a maintainer](#becoming-a-maintainer)
- [Reviewing pull requests](#reviewing-pull-requests)
- [Merging pull requests](#merging-pull-requests)
+ - [Additional notes for pull request reviewers and assignees](#additional-notes-for-pull-request-reviewers-and-assignees)
- [Core development team](#core-development-team)
- [Release management](#release-management)
- [Packaging Coq](#packaging-coq)
@@ -56,6 +57,7 @@ well.
- [Git documentation, tips and tricks](#git-documentation-tips-and-tricks)
- [GitHub documentation, tips and tricks](#github-documentation-tips-and-tricks)
- [GitLab documentation, tips and tricks](#gitlab-documentation-tips-and-tricks)
+ - [Merge script dependencies](#merge-script-dependencies)
- [Coqbot](#coqbot)
- [Online forum and chat to talk to developers](#online-forum-and-chat-to-talk-to-developers)
- [Coq remote working groups](#coq-remote-working-groups)
@@ -430,7 +432,7 @@ and merge when it is the case (you can ping them if the PR is ready
from your side but nothing happens for a few days).
After your PR is accepted and merged, it may get backported to a
-stable branch if appropriate, and will eventually make it to a
+release branch if appropriate, and will eventually make it to a
release. You do not have to worry about this, it is the role of the
assignee and the release manager to do so (see Section [Release
management](#release-management)). The milestone should give you an
@@ -736,28 +738,65 @@ spending time in vain.
### Merging pull requests ###
-Our [CODEOWNERS][] file associates a team of maintainers, or a
-principal and secondary maintainers, to each component. They will be
-responsible for self-assigning and merging PRs (they didn't co-author)
-that change this component. When several components are changed in
-significant ways, at least a maintainer (other than the PR author)
-must approve the PR for each affected component before it can be
-merged, and one of them has to assign the PR, and merge it when it is
-time. Before merging, the assignee must also select a milestone for
-the PR (see also Section [Release management](#release-management)).
-
-If you feel knowledgeable enough to maintain a component, and have a
-good track record of contributing to it, we would be happy to have you
-join one of the maintainer teams.
-
-The merging process is described in more details in [this
-document][MERGING].
-
-The people with merging powers (either because listed as a principal
-or secondary maintainer in [CODEOWNERS][], or because member of a
-maintainer team), are the members of the **@coq/pushers** team
-([member list][coq-pushers] only visible to the Coq organization
-members because of a limitation of GitHub).
+Our [CODEOWNERS][] file associates a team of maintainers to each
+component. When a PR is opened (or a draft PR is marked as ready for
+review), GitHub will automatically request reviews to maintainer teams
+of affected components. As soon as it is the case, one available
+member of a team that was requested a review should self-assign the
+PR, and will act as its shepherd from then on.
+
+The PR assignee is responsible for making sure that all the proposed
+changes have been reviewed by relevant maintainers, that change
+requests have been implemented, that CI is passing, and eventually
+will be the one who merges the PR.
+
+*If you have already frequently contributed to a component, we would
+be happy to have you join one of the maintainer teams.*
+
+The complete list of maintainer teams is available [here][coq-pushers]
+(link only accessible to people who are already members of the Coq
+organization, because of a limitation of GitHub).
+
+#### Additional notes for pull request reviewers and assignees ####
+
+- NEVER USE GITHUB'S MERGE BUTTON. Instead, we provide a script
+ [`dev/tools/merge-pr.sh`][merge-pr] which you should use to merge a
+ PR (requires having configured gpg with git). In the future, we
+ will also support merging through a command to **@coqbot**.
+
+- PR authors or co-authors cannot review, self-assign, or merge the PR
+ they contributed to. However, reviewers may push small fixes to the
+ PR branch to facilitate the PR integration.
+
+- Only PRs targetting the `master` branch can be merged by a
+ maintainer. For PRs targetting a release branch, the assignee
+ should always be the RM.
+
+- Before merging, the assignee must also select a milestone for the PR
+ (see also Section [Release management](#release-management)).
+
+- To know which files you are a maintainer of, you can look for black
+ shields icons in the "Files changed" tab. Alternatively, you may
+ use the [`dev/tools/check-owners-pr.sh`][check-owners] script for
+ the same purpose.
+
+ ![shield icon](dev/doc/shield-icon.png)
+
+- Sometimes, it is a good practice to announce the intent to merge one
+ or several days in advance when unsure that everyone had a chance to
+ voice their opinion, or to finish reviewing the PR.
+
+- When a PR has [overlays][user-overlays], then:
+
+ - the overlays that are backward-compatible (normally the case for
+ overlays fixing Coq code) should have been merged *before* the PR
+ can be merged;
+
+ - the overlays that are not backward-compatible (normally only the
+ case for overlays fixing OCaml code) should be merged *just after*
+ the PR has been merged (and thus the assignee should ping the
+ maintainers of the affected projects to ask them to merge the
+ overlays).
### Core development team ###
@@ -783,23 +822,23 @@ on the wiki.
Development of new features, refactorings, deprecations and clean-ups
always happens on `master`. Stabilization starts by branching
-(creating a new stable `v...` branch from the current `master`), which
+(creating a new `v...` release branch from the current `master`), which
marks the beginning of a feature freeze (new features will continue to
be merged into `master` but won't make it for the upcoming major
release, but only for the next one).
-After branching, most changes are introduced in the stable branch by a
+After branching, most changes are introduced in the release branch by a
backporting process. PR authors and assignee can signal a desire to
have a PR backported by selecting an appropriate milestone. Most of
the time, the choice of milestone is between two options: the next
major version that has yet to branch from `master`, or the next
-version (beta, final, or patch-level release) of the active stable
+version (beta, final, or patch-level release) of the active release
branch. In the end, it is the RM who decides whether to follow or not
the recommendation of the PR assignee, and who backports PRs to the
-stable branch.
+release branch.
-Very specific changes that are only relevant for the stable branch and
-not for the `master` branch can result in a PR targetting the stable
+Very specific changes that are only relevant for the release branch and
+not for the `master` branch can result in a PR targetting the release
branch instead of `master`. In this case, the RM is the only one who
can merge the PR, and they may even do so if they are the author of
the PR. Examples of such PRs include bug fixes to a feature that has
@@ -808,13 +847,13 @@ number in preparation for the next release.
Some automation is in place to help the RM in their task: a GitHub
project is created at branching time to manage PRs to backport; when a
-PR is merged in a milestone corresponding to the stable branch, our
+PR is merged in a milestone corresponding to the release branch, our
bot will add this PR in a "Request inclusion" column in this project;
the RM can browse through the list of PRs waiting to be backported in
this column, possibly reject some of them by simply removing the PR
from the column (in which case, the bot will update the PR milestone),
and proceed to backport others; when a backported PR is pushed to the
-stable branch, the bot moves the PR from the "Request inclusion"
+release branch, the bot moves the PR from the "Request inclusion"
column to a "Shipped" column.
More information about the RM tasks can be found in the [release
@@ -914,6 +953,16 @@ procedure.
We also have a benchmarking infrastructure, which is documented [on
the wiki][jenkins-doc].
+##### Restarting failed jobs #####
+
+When CI has a few failures which look spurious, restarting the
+corresponding jobs is a good way to ensure this was indeed the case.
+You can restart jobs on Azure from the "Checks" tab on GitHub. To
+restart a job on GitLab CI, you should sign into GitLab (this can be
+done using a GitHub account); if you are part of the [Coq organization
+on GitLab](https://gitlab.com/coq), you should see a "Retry" button;
+otherwise, send a request to join the organization.
+
#### Code owners, issue and pull request templates ####
These files can be found in the [`.github`](.github) directory. The
@@ -1029,6 +1078,22 @@ restart failing CI jobs.
GitLab too has [extensive documentation][GitLab-doc], in particular on
configuring CI.
+#### Merge script dependencies ####
+
+The merge script passes option `-S` to `git merge` to ensure merge
+commits are signed. Consequently, it depends on the GnuPG command
+utility being installed and a GPG key being available. Here is a
+short documentation on how to use GPG, git & GitHub:
+https://help.github.com/articles/signing-commits-with-gpg/.
+
+The script depends on a few other utilities. If you are a Nix user,
+the simplest way of getting them is to run `nix-shell` first.
+
+**Note for homebrew (MacOS) users:** it has been reported that
+installing GnuPG is not out of the box. Installing explicitly
+`pinentry-mac` seems important for typing of passphrase to work
+correctly (see also this [Stack Overflow Q-and-A][pinentry-mac]).
+
#### Coqbot ####
Our bot sources can be found at <https://github.com/coq/bot>. Its
@@ -1069,6 +1134,7 @@ can be found [on the wiki][wiki-CUDW].
[add-contributor]: https://github.com/orgs/coq/teams/contributors/members?add=true
[api-doc]: https://coq.github.io/doc/master/api/
[CEP]: https://github.com/coq/ceps
+[check-owners]: dev/tools/check-owners-pr.sh
[CI-README-developers]: dev/ci/README-developers.md
[CI-README-users]: dev/ci/README-users.md
[Code-of-Conduct]: CODE_OF_CONDUCT.md
@@ -1084,7 +1150,7 @@ can be found [on the wiki][wiki-CUDW].
[Coq-documentation]: https://coq.inria.fr/documentation
[Coq-issue-tracker]: https://github.com/coq/coq/issues
[Coq-package-index]: https://coq.inria.fr/packages
-[coq-pushers]: https://github.com/orgs/coq/teams/pushers/members
+[coq-pushers]: https://github.com/orgs/coq/teams/pushers/teams
[coq-repository]: https://github.com/coq/coq
[Coq-website-repository]: https://github.com/coq/www
[debugging-doc]: dev/doc/debugging.md
@@ -1118,7 +1184,7 @@ can be found [on the wiki][wiki-CUDW].
[jenkins-doc]: https://github.com/coq/coq/wiki/Jenkins-(automated-benchmarking)
[kind-documentation]: https://github.com/coq/coq/issues?q=is%3Aopen+is%3Aissue+label%3A%22kind%3A+documentation%22
[master-doc]: https://coq.github.io/doc/master/refman/
-[MERGING]: dev/doc/MERGING.md
+[merge-pr]: dev/tools/merge-pr.sh
[needs-benchmarking]: https://github.com/coq/coq/labels/needs%3A%20benchmarking
[needs-changelog]: https://github.com/coq/coq/labels/needs%3A%20changelog%20entry
[needs-documentation]: https://github.com/coq/coq/labels/needs%3A%20documentation
@@ -1133,6 +1199,7 @@ can be found [on the wiki][wiki-CUDW].
[Octobox]: http://octobox.io/
[old-style-guide]: dev/doc/style.txt
[other-standard-libraries]: https://github.com/coq/stdlib2/wiki/Other-%22standard%22-libraries
+[pinentry-mac]: https://stackoverflow.com/questions/39494631/gpg-failed-to-sign-the-data-fatal-failed-to-write-commit-object-git-2-10-0
[plugin-tutorial]: doc/plugin_tutorial
[ProofGeneral-issues]: https://github.com/ProofGeneral/PG/issues
[Reddit]: https://www.reddit.com/r/Coq/
diff --git a/dev/doc/MERGING.md b/dev/doc/MERGING.md
deleted file mode 100644
index 66f5a96802..0000000000
--- a/dev/doc/MERGING.md
+++ /dev/null
@@ -1,177 +0,0 @@
-# Merging changes in Coq
-
-This document describes how patches, submitted as pull requests (PRs) on the
-`master` branch, should be merged into the main repository
-(https://github.com/coq/coq).
-
-## Code owners
-
-The [CODEOWNERS](../../.github/CODEOWNERS) file defines owners for each part of
-the code. Sometime there is one principal maintainer and one or several
-secondary maintainer(s). Sometimes, it is a team of code owners and all of its
-members act as principal maintainers for the component.
-
-When a PR is submitted, GitHub will automatically ask the principal
-maintainer (or the code owner team) for a review. If the PR touches several
-parts, all the corresponding owners will be asked for a review.
-
-Maintainers are never assigned as reviewer on their own PRs.
-
-If a principal maintainer submits a PR or is a co-author of a PR that is
-submitted and this PR changes the component they own, they must request a
-review from a secondary maintainer. They can also delegate the review if they
-know they are not available to do it.
-
-## Reviewing
-
-When maintainers receive a review request, they are expected to:
-
-* Put their name in the assignee field, if they are in charge of the component
- that is the main target of the patch (or if they are the only maintainer asked
- to review the PR).
-* Review the PR, approve it or request changes.
-* If they are the assignee, check if all reviewers approved the PR. If not,
- regularly ping the author (if changes should be implemented) or the reviewers
- (if reviews are missing). The assignee ensures that any requests for more
- discussion have been granted. When the discussion has converged and ALL
- REVIEWERS(*) have approved the PR, the assignee is expected to follow the merging
- process described below.
-
-To know what files you are a code owner of in a large PR, you can run
-`dev/tools/check-owners-pr.sh xxxx`. Results are unfortunately imperfect.
-
-When a PR received lots of comments or if the PR has not been opened for long
-and the assignee thinks that some other developers might want to comment,
-it is recommended that they announce their intention to merge and wait a full
-working day (or more if deemed useful) before the actual merge, as a sort of
-last call for comments.
-
-In all cases, maintainers can delegate reviews to the other maintainers,
-except if it would lead to a maintainer reviewing their own patch.
-
-A maintainer is expected to be reasonably reactive, but no specific timeframe is
-given for reviewing.
-
-When none of the maintainers have commented nor self-assigned a PR in a delay
-of five working days, any maintainer of another component who feels comfortable
-reviewing the PR can assign it to themselves. To prevent misunderstandings,
-maintainers should not hesitate to announce in advance when they shall be
-unavailable for more than five working days.
-
-(*) In case a component is touched in a trivial way (adding/removing one file in
-a `Makefile`, etc), or by applying a systematic refactoring process (global
-renaming for instance) that has been reviewed globally, the assignee can
-say in a comment they think a review is not required from every code owner and
-proceed with the merge.
-
-### Breaking changes
-
-If the PR breaks compatibility of some external projects in CI, then fixes to
-those external projects should have been prepared (cf. the relevant sub-section
-in the [CI README](../ci/README.md#Breaking-changes) and the PR can be tested
-with these fixes thanks to ["overlays"](../ci/user-overlays/README.md).
-
-Moreover the PR author *must* add an entry to the [unreleased
-changelog](../../doc/changelog/README.md) or to the
-[`dev/doc/changes.md`](changes.md) file.
-
-If overlays are missing, ask the author to prepare them and label the PR with
-the [needs: overlay](https://github.com/coq/coq/labels/needs%3A%20overlay) label.
-
-When fixes are ready, there are two cases to consider:
-
-- For patches that are backward compatible (best scenario), you should get the
- external project maintainers to integrate them before merging the PR.
-- For patches that are not backward compatible (which is often the case when
- patching plugins after an update to the Coq API), you can proceed to merge
- the PR and then notify the external project maintainers they can merge the
- patch.
-
-## Merging
-
-Once all reviewers approved the PR, the assignee is expected to check that CI
-completed without relevant failures, and that the PR comes with appropriate
-documentation and test cases. If not, they should leave a comment on the PR and
-put the appropriate label. Otherwise, they are expected to merge the PR using the
-[merge script](../tools/merge-pr.sh).
-
-When CI has a few failures which look spurious, restarting the corresponding
-jobs is a good way of ensuring this was indeed the case.
-To restart a job on AppVeyor, you should connect using your GitHub
-account; being part of the Coq organization on GitHub should give you the
-permission to do so.
-To restart a job on GitLab CI, you should sign into GitLab (this can be done
-using a GitHub account); if you are part of the
-[Coq organization on GitLab](https://gitlab.com/coq), you should see a "Retry"
-button; otherwise, send a request to join the organization.
-
-When the PR has conflicts, the assignee can either:
-- ask the author to rebase the branch, fixing the conflicts
-- warn the author that they are going to rebase the branch, and push to the
- branch directly
-
-In both cases, CI should be run again.
-
-In some rare cases (e.g. the conflicts are in the `CHANGES.md` file and the PR
-is not a candidate for backporting), it is ok to fix
-the conflicts in the merge commit (following the same steps as below), and push
-to `master` directly. DON'T USE the GitHub interface to fix these conflicts.
-
-To merge the PR proceed in the following way
-```
-$ git checkout master
-$ git pull
-$ dev/tools/merge-pr.sh XXXX
-$ git push upstream
-```
-where `XXXX` is the number of the PR to be merged and `upstream` is the name
-of your remote pointing to `git@github.com:coq/coq.git`.
-Note that you are only supposed to merge PRs into `master`. PRs should rarely
-target the stable branch, but when it is the case they are the responsibility
-of the release manager.
-
-This script conducts various checks before proceeding to merge. Don't bypass them
-without a good reason to, and in that case, write a comment in the PR thread to
-explain the reason.
-
-Maintainers MUST NOT merge their own patches.
-
-DON'T USE the GitHub interface for merging, since it will prevent the automated
-backport script from operating properly, generates bad commit messages, and a
-messy history when there are conflicts.
-
-### Merge script dependencies
-
-The merge script passes option `-S` to `git merge` to ensure merge commits
-are signed. Consequently, it depends on the GnuPG command utility being
-installed and a GPG key being available. Here is a short documentation on
-how to use GPG, git & GitHub: https://help.github.com/articles/signing-commits-with-gpg/.
-
-The script depends on a few other utilities. If you are a Nix user, the
-simplest way of getting them is to run `nix-shell` first.
-
-**Note for homebrew (MacOS) users:** it has been reported that installing GnuPG
-is not out of the box. Installing explicitly "pinentry-mac" seems important for
-typing of passphrase to work correctly (see also this
-[Stack Overflow Q-and-A](https://stackoverflow.com/questions/39494631/gpg-failed-to-sign-the-data-fatal-failed-to-write-commit-object-git-2-10-0)).
-
-## Addendum for organization admins
-
-### Adding a new code owner individual
-
-If someone is added to the [`CODEOWNERS`](../../.github/CODEOWNERS) file and
-they did not have merging rights before, they should also be added to the
-**@coq/pushers** team. You may do so using
-[this link](https://github.com/orgs/coq/teams/pushers/members?add=true).
-
-Before adding someone to the **@coq/pushers** team, you should ensure that they
-have read the present merging documentation, and explicitly tell them not to
-use the merging button on the GitHub web interface.
-
-### Adding a new code owner team
-
-Go to [that page](https://github.com/orgs/coq/teams/pushers/teams) and click on
-the green "Add a team" button. Use a "-maintainer" suffix for the name of your
-team. You may then add new members to this team (you don't need to add them to
-the **@coq/pushers** team first as this will be done automatically because the
-team you created is a sub-team of **@coq/pushers**).
diff --git a/dev/doc/shield-icon.png b/dev/doc/shield-icon.png
new file mode 100644
index 0000000000..629e51a819
--- /dev/null
+++ b/dev/doc/shield-icon.png
Binary files differ