Project

General

Profile

Actions

PrProcessor » History » Revision 1

Revision 1/9 | Next »
Dominic Cleal, 10/29/2015 11:16 AM
document integration points


PR Processor

prprocessor is a web service hosted on the project's OpenShift account, which receives GitHub webhooks/notifications and helps sync PRs to Redmine and Jenkins.

It's a simple Sinatra app, and the source is available here: https://github.com/theforeman/prprocessor.

OpenShift

It runs on OpenShift using a group account, to which a few developers have push access to. When merging into the GitHub repository, please keep this in sync with OpenShift's repo by pushing to both.

GitHub integration

It receives requests from GitHub when pull requests are opened or synchronized (updated). These contain lots of info about the PR, including the author, branches etc. A repository admin needs to add the webhook to send these events - more information on the Jenkins wiki page.

It performs checks on the PR to ensure it meets our usual standards.

Commit message styles

For repositories in the redmine_issue_required_repos.yaml list, it enforces that:

  1. Commit messages match the style in Reviewing_patches-commit_message_format
  2. A Redmine ticket is referenced in the commit message

PR is mergeable

It checks whether the PR is mergeable against the branch it's proposed for. This will only pick up this error when the PR is updated because the service is event-driven, so it won't notify authors when a PR goes out of sync due to master/develop being changed, and the PR is not updated.

Redmine integration

When it receives an event, the corresponding Redmine ticket is updated to link it to the pull request. The script updates these fields:

  1. Status is changed to Ready for Testing
  2. Assigned To is changed to the PR author - update users.yaml for new or unknown developers
  3. Target version (usually sprints) is set to the latest available version
  4. Pull request is set to the URL of the PR

Jenkins integration

A "PR scanner" job runs regularly on Jenkins and is responsible for all checking, testing and updating of pull requests. Since it uses a lot of API queries, it only runs every 30 minutes. More about this job is on the Jenkins wiki page.

To get faster PR testing, when a PR hook is received by the prprocessor, it triggers an immediate run/build of the Jenkins scanner job against the relevant PR. No further action is taken by the prprocessor.

Updated by Dominic Cleal about 9 years ago · 9 revisions