pull-request Trait
Attributes
name |
required? |
default |
type |
explanation |
---|---|---|---|---|
policies |
no |
replacement-label: needs/ok-to-test
require-label: reviewed/ok-to-test
|
PullRequestPolicies |
configures the policies to apply to pull-requests |
disable-status-report |
no |
[]
|
list |
a list of names of steps which shall not report their status to the pull request. |
policies (PullRequestPolicies) Attributes
name |
required? |
default |
type |
explanation |
---|---|---|---|---|
require-label |
no |
reviewed/ok-to-test |
str |
the label required for PR build to start |
replacement-label |
no |
needs/ok-to-test |
str |
the label set after require-label was removed by PR build |
Dependencies
This trait has no dependencies
Turns the declaring job into a pull-request job. This means it will be triggered upon the creation or updating of GitHub pull-requests for the main repository (and only those) and post executions results to the corresponding PRs.
Information about the pull-request being processed will be exposed to jobs at runtime:
PULLREQUEST_URL
contains the full pull-request URL whereas PULLREQUEST_ID
contains the
pull request number.
Policies / Pull-Request Label Handling
For security reasons, Pull-Requests are by default only reacted upon if a label is added to them. To mitigate the risk of subsequent updates with malicious changes, said labels are removed at the beginning of PR build job executions and have thus to be added again if a repeated PR build job execution is required.
To make this more obvious, a “replacement label” is added after label removal.
Example
traits:
pull-request: ~