Community Reviews

Superdesk Publisher is an open-source project driven by its community. If you don’t feel ready to contribute code or patches, reviewing issues and pull requests (PRs) can be a great start to get involved and give back. In fact, people who “triage” issues are the backbone to Superdesk Publisher’s success!

Why Reviewing Is Important

Community reviews are essential for the development of the Superdesk Publisher project. On the Superdesk Publisher JIRA bug tracker and GitHub, you can find many items to work on:

  • Bug Reports: Bug reports need to be checked for completeness. Is any important information missing? Can the bug be easily reproduced?
  • Pull Requests: Pull requests contain code that fixes a bug or implements new functionality. Reviews of pull requests ensure that they are implemented properly, are covered by test cases, don’t introduce new bugs and maintain backwards compatibility.

Note that anyone who has some basic familiarity with Symfony and PHP can review bug reports and pull requests. You don’t need to be an expert to help.

Be Constructive

Before you begin, remember that you are looking at the result of someone else’s hard work. A good review comment thanks the contributor for their work, identifies what was done well, identifies what should be improved and suggests a next step.

Create a GitHub Account

Superdesk Publisher uses GitHub to manage pull requests. If you want to do reviews, you need to create a GitHub account and log in.

Create a JIRA Account

Superdesk Publisher uses JIRA to manage bug reports. If you want to report a bug, you need to create a JIRA account and log in.

The Pull Request Review Process

Reviews of pull requests usually take a little longer since you need to understand the functionality that has been fixed or added and find out whether the implementation is complete.

It is okay to do partial reviews! If you do a partial review, comment how far you got and leave the PR in “needs review” state.

Pick a pull request from the PRs in need of review and follow these steps:

  1. Is the PR Complete? Every pull request must contain a header that gives some basic information about the PR. You can find the template for that header in the Contribution Guidelines.

  2. Is the Base Branch Correct? GitHub displays the branch that a PR is based on below the title of the pull request. Is that branch correct?

  3. Reproduce the Problem Read the issue that the pull request is supposed to fix. Reproduce the problem on a clean Superdesk Web Publisher project and try to understand why it exists. If the linked issue already contains such a project, install it and run it on your system.

  4. Review the Code Read the code of the pull request and check it against some common criteria:

    • Does the code address the issue the PR is intended to fix/implement?
    • Does the PR stay within scope to address only that issue?
    • Does the PR contain automated tests? Do those tests cover all relevant edge cases?
    • Does the PR contain sufficient comments to easily understand its code?
    • Does the code break backwards compatibility? If yes, does the PR header say so?
    • Does the PR contain deprecations? If yes, does the PR header say so? Does the code contain trigger_error() statements for all deprecated features?
    • Are all deprecations and backwards compatibility breaks documented in the latest UPGRADE-X.X.md file? Do those explanations contain “Before”/”After” examples with clear upgrade instructions?

    Note

    Eventually, some of these aspects will be checked automatically.

  5. Test the Code

  6. Update the PR Status

    At last, add a comment to the PR. Thank the contributor for working on the PR.

Example

Here is a sample comment for a PR that is not yet ready for merge:

1
2
3
Thank you @takeit for working on this! It seems that your test
cases don't cover the cases when the counter is zero or smaller.
Could you please add some tests for that?