openmicroscopy/snoopycrimecop — pull request #133 by sbesson (2014-01-19 19:46:03+00:00)
Title: Refactor unrebased prs command

This PR should refactor the `scc unrebased-prs` command to support multiple branches in preparation of the upcoming configuration change of http://ci.openmicroscopy.org/job/SCC-unrebased-prs/ to track PR rebasing between the `dev_5_0` and `develop` PRs.

- the `UnrebasedPRs` command has a new structure to store visited PRs and read links in two dictionaries: `self.prs` and `self.links`
- the values of the `self.links` dictionary are defined as follows: `None` for PRs with no rebasing comments, `-1` for PRs with a `--no-rebase` comment and a list of all parsed rebased comments for the PRs with `--rebased*` lines in their body or comments
- for PRs with `--rebased*` comments, the target PR is checked to be 1- either open or merged and 2- set against the specified target branch
- refactor the `check_links` logic to match the new `self.links` dictionary
- refactor the `test_unrebased_prs` to match the new structure and use the `pytest.mark.parametrize` fixture to condense tests.