R52 Have a reviewer read what goes to a public repository before the push

Before you push to a public repository, have a reviewer read the diff, the commit messages and the pull request text for private material, and push only the head that reviewer passed.

Reason

A credential or private detail pushed to a public repository leaks (Art. II §1) and cannot be withdrawn (Art. V §1(3)), so it has to be caught before the push. Another party than the author reads it, since an author tends to miss what they wrote themselves (Art. VII §3(1)), and what is pushed must be exactly what was read (Art. VII §3(2)).

Verification

Before each push to any branch of a public repository (rule 259), the author writes out three texts and gives them to a reviewer, another party than the author:

  • the diff of the branch against the branch it will merge into;
  • the message of every commit to be pushed;
  • the title and body of the pull request as they will be posted.

The reviewer reads them for what rule 259 keeps out of a public repository, for credentials (rule 291) and for personal information (Art. II §4), and answers either that they pass, naming the head commit it read, or with the leaks it found. The author pushes only that head and opens the pull request with that text. After any change to the head or the text, the review is done again before the next push.

Violated when an agent pushes to a public repository a head that no reviewer passed, or opens a pull request there with a title or body that the reviewer did not read.

Provisions of the constitution it cites

Relations

Parent
R296 Who checks what goes to a public repository before the push
Requires
none
Conflicts with
none

Metadata

ID
52
Revision
9
Kind
rule
Status
active
Slug
public-push-pre-review
Default level
project
Constitution revisions
>=1
Check
none
Uses
Instructions instructions
Original language
English en
Translations
Chinese zh