Bug System Support

test-patch has the ability to support multiple bug systems. Bug tools have some extra hooks to fetch patches, line-level reporting, and posting a final report. Every bug system plug-in must have one line in order to be recognized:

add_bugsystem <pluginname>

Bugzilla Specific

Currently, Bugzilla support is read-only. To use it, the Bug ID must be preferenced with ‘BZ:’. For example:

$ test-patch.sh (other options) BZ:4

… will pull down Bugzilla ID #4.

Using the --bugzilla-base-url on the command line or BUGZILLA_BASE_URL in a project’s personality will define the location of the Bugzilla instance. By default, it is https://bz.apache.org/bugzilla .

GitHub Specific

GitHub supports the full range of functionality, including putting comments on individual lines. Be aware, however, that test-patch.sh will require that GitHub PRs be fully rebased (i.e., a single commit) in many circumstances.

By default, the GitHub plug-in assumes that https://github.com is the base URL for GitHub. Enterprise users may override this with the --github-base-url for the normal web user interface and --github-api-url for the API URL. Personalities may use GITHUB_API_URL and GITHUB_BASE_URL.

The specific repository on GitHub is defined with either --github-repo on the command line or GITHUB_REPO in a personality. It should take the form of user/repo.

In order to comment on issues or, depending upon the security setup of the repo, authentication credentials. The GitHub plug-in supports two types:

Pull requests that are made off of a specific branch will switch the test repo to that branch, if permitted. If the pull request references a JIRA issue that matches the given JIRA issue regexp in the Subject, the JIRA plug-in will also be invoked as needed.

JIRA Specific

JIRA support allows both patch downloads and summary writes. It also supports branch detection-based upon the name of the attached patch file.

JIRA issues are invoked by matching the command line option to a specific regular expression as given by the --jira-issue-re option or via the JIRA_ISSUE_RE personality variable. By default, the plug-in uses https://issues.apache.org/jira as the JIRA instance to use. However that may be overwritten via the --jira-base-url option or personalities may define via JIRA_URL.

In order to write information on the issue, JIRA requires username and password authentication using the --jira-user/--jira-password options or the JIRA_USER and JIRA_PASSWORD variables in a personality.