Skip to content

Contribution Procedure

Alexander Wu edited this page May 23, 2020 · 15 revisions

When you add code to the website (or any similar compserv repo), you should follow a general procedure to make sure the contribution is orderly and reviewed.

Context: Around fall 2019 and spring 2020, the code contribution to hknweb was a mess. In particular, no one would review pull requests when they came in. Contributors assigned two to four reviewers, and none of them would review the pull request for weeks.

Before Development

  1. Create a fork of the Github repository.

  2. Locally, pull from compserv/master.

  3. Create a local branch for your project. Do all of your development in this branch, pushing to origin as needed.

Merging into Compserv

  1. Merge again from compserv/master if your branch is out of date, and fix any merge conflicts. On the Compserv repository, create a new pull request from your fork's branch to compserv/master. Link any related issues.

  2. Assign one to two officers and/or assistant officers in Compserv, or other committee members if applicable, to review the PR. If the PR is urgent, message them on Facebook or Slack. Continue pinging in a few days if needed.

  3. Update this spreadsheet with information about your PR. Update this spreadsheet after your PR is merged (and preferably as other updates occur as well).

  4. After checks finish running, review all errors and issues, and fix all issues.

  5. If reviewers have any comments, address all comments by either fixing the issues or explaining why you think no changes are needed. Ask at least one reviewer to review your changes and comments. Repeat until approved.

  6. Merge the pull request.

Reviewing a Pull Request

  1. You will receive an email notifying you that you are assigned as a reviewer, and possibly a message from the requester. If you cannot review this pull request within a week (or some other duration depending on the urgency), let the requester know via Facebook or Slack within three days.

  2. If the PR is urgent, review as soon as possible (use your judgement). Otherwise, review it within a week. A good time to go over PR reviews is after the weekly Compserv meetings. Look over the commits and files changed, and pull from the contributor's branch to test the code locally. Make comments asking for clarifications or justifications, and if warranted, request changes to be made or approve the pull request. Remember to publish your review.

  3. Update the spreadsheet (see above).

  4. When the contributor makes comments or changes, look over the changes. Make sure all of your points were satisfactorily addressed. Provide further comments or approve the PR.

Clone this wiki locally