2.5.3.11. GitHubPullrequestPoller


RemiZOffAlex  Создано: 2021-12-25 02:45:44.667760  Обновлено: 2021-12-25 02:45:44.667775
classbuildbot.changes.github.GitHubPullrequestPoller

This GitHubPullrequestPoller periodically polls the GitHub API for new or updated pull requests. The authorrevisionrevlinkbranch and files fields in the recorded changes are populated with information extracted from the pull request. This allows to filter for certain changes in files and create a blamelist based on the authors in the GitHub pull request.

The GitHubPullrequestPoller accepts the following arguments:

owner

The owner of the GitHub repository. This argument is required.

repo

The name of the GitHub repository. This argument is required.

branches

List of branches to accept as base branch (e.g. master). Defaults to None and accepts all branches as base.

pollInterval

Poll interval between polls in seconds. Default is 10 minutes.

pollAtLaunch

Whether to poll on startup of the buildbot master. Default is False and first poll will occur pollInterval seconds after the master start.

category

Set the category to be used for the changes produced by the GitHubPullrequestPoller. This will then be set in any changes generated by the GitHubPullrequestPoller, and can be used in a Change Filter for triggering particular builders.

baseURL

GitHub API endpoint. Default is https://api.github.com.

pullrequest_filter

A callable which takes a dict which contains the decoded JSON object of the GitHub pull request as argument. All fields specified by the GitHub API are accessible. If the callable returns False the pull request is ignored. Default is True which does not filter any pull requests.

token

A GitHub API token to execute all requests to the API authenticated. It is strongly recommended to use a API token since it increases GitHub API rate limits significantly.

repository_type

Set which type of repository link will be in the repository property. Possible values httpssvngit or svn. This link can then be used in a Source Step to checkout the source.

magic_link

Set to True if the changes should contain refs/pulls/<PR #>/merge in the branch property and a link to the base repository in the repository property. These properties can be used by the GitHub source to pull from the special branch in the base repository. Default is False.

github_property_whitelist

A list of fnmatch expressions which match against the flattened pull request information JSON prefixed with github. For example github.number represents the pull request number. Available entries can be looked up in the GitHub API Documentation or by examining the data returned for a pull request by the API.

© RemiZOffAlex