SpecialistOff.NET / Вопросы / Статьи / Фрагменты кода / Резюме / Метки / Помощь / Файлы
НазадThis GitHubPullrequestPoller periodically polls the GitHub API for new or updated pull requests. The author, revision, revlink, branch 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:
ownerThe owner of the GitHub repository. This argument is required.
repoThe name of the GitHub repository. This argument is required.
branchesList of branches to accept as base branch (e.g. master). Defaults to None and accepts all branches as base.
pollIntervalPoll interval between polls in seconds. Default is 10 minutes.
pollAtLaunchWhether to poll on startup of the buildbot master. Default is False and first poll will occur pollInterval seconds after the master start.
categorySet 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.
baseURLGitHub API endpoint. Default is https://api.github.com.
pullrequest_filterA 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.
tokenA 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_typeSet which type of repository link will be in the repository property. Possible values https, svn, git or svn. This link can then be used in a Source Step to checkout the source.
magic_linkSet 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_whitelistA 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.