Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[JENKINS-43507] Add help files and tidy up misc code changes
- Loading branch information
Showing
with
178 additions
and 10 deletions.
- +8 −8 src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource.java
- +1 −1 src/main/java/org/jenkinsci/plugins/github_branch_source/PullRequestSCMHead.java
- +1 −1 src/main/java/org/jenkinsci/plugins/github_branch_source/PullRequestSCMRevision.java
- +23 −0 src/main/java/org/jenkinsci/plugins/github_branch_source/PullRequestSource.java
- +20 −0 ...in/resources/org/jenkinsci/plugins/github_branch_source/BranchDiscoveryTrait/help-strategyId.html
- +3 −0 src/main/resources/org/jenkinsci/plugins/github_branch_source/BranchDiscoveryTrait/help.html
- +15 −0 ...ces/org/jenkinsci/plugins/github_branch_source/ForkPullRequestDiscoveryTrait/help-strategyId.html
- +35 −0 ...esources/org/jenkinsci/plugins/github_branch_source/ForkPullRequestDiscoveryTrait/help-trust.html
- +3 −0 ...main/resources/org/jenkinsci/plugins/github_branch_source/ForkPullRequestDiscoveryTrait/help.html
- +4 −0 src/main/resources/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator/help-apiUri.html
- +16 −0 src/main/resources/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator/help-traits.html
- +4 −0 src/main/resources/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource/help-apiUri.html
- 0 ...gins/github_branch_source/GitHubSCMSource/{help-scanCredentialsId.html → help-credentialsId.html}
- +3 −0 src/main/resources/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource/help-repository.html
- +12 −0 src/main/resources/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource/help-traits.html
- +15 −0 ...s/org/jenkinsci/plugins/github_branch_source/OriginPullRequestDiscoveryTrait/help-strategyId.html
- +3 −0 ...in/resources/org/jenkinsci/plugins/github_branch_source/OriginPullRequestDiscoveryTrait/help.html
- +3 −0 ...ain/resources/org/jenkinsci/plugins/github_branch_source/SSHCheckoutTrait/help-credentialsId.html
- +9 −0 src/main/resources/org/jenkinsci/plugins/github_branch_source/SSHCheckoutTrait/help.html
@@ -0,0 +1,20 @@ | ||
<div> | ||
Determines which branches are discovered. | ||
<dl> | ||
<dt>Exclude branches that are also filed as PRs</dt> | ||
<dd> | ||
If you are discovering origin pull requests, it may not make sense to discover the same changes both as a | ||
pull request and as a branch. | ||
</dd> | ||
<dt>Only branches that are also filed as PRs</dt> | ||
<dd> | ||
This option exists to preserve legacy behaviour when upgrading from older versions of the plugin. | ||
NOTE: If you have an actual use case for this option please file a pull request against this text. | ||
</dd> | ||
<dt>All branches</dt> | ||
<dd> | ||
Ignores whether the branch is also filed as a pull request and instead discovers all branches on the | ||
origin repository. | ||
</dd> | ||
</dl> | ||
</div> |
@@ -0,0 +1,3 @@ | ||
<div> | ||
Discovers branches on the repository. | ||
</div> |
@@ -0,0 +1,15 @@ | ||
<div> | ||
Determines how pull requests are discovered: | ||
<ul> | ||
<li>Discover each pull request once with the discovered revision corresponding to the result of merging with the | ||
current revision of the target branch | ||
</li> | ||
<li>Discover each pull request once with the discovered revision corresponding to the pull request head revision | ||
without merging | ||
</li> | ||
<li>Discover each pull request twice. The first discovered revision corresponds to the result of merging with | ||
the current revision of the target branch in each scan. The second parallel discovered revision corresponds | ||
to the pull request head revision without merging | ||
</li> | ||
</ul> | ||
</div> |
@@ -0,0 +1,35 @@ | ||
<div> | ||
<p> | ||
One of the great powers of pull requests is that anyone with read access to a repository can fork it, commit | ||
some changes to their fork and then create a pull request against the original repository with their changes. | ||
There are some files stored in source control that are important. For example, a <code>Jenkinsfile</code> | ||
may contain configuration details to sandbox pull requests in order to mitigate against malicious pull requests. | ||
In order to protect against a malicious pull request itself modifying the <code>Jenkinsfile</code> to remove | ||
the protections, you can define the trust policy for pull requests from forks. | ||
</p> | ||
<p> | ||
Other plugins can extend the available trust policies. The default policies are: | ||
</p> | ||
<dl> | ||
<dt>Nobody</dt> | ||
<dd> | ||
Pull requests from forks will all be treated as untrusted. This means that where Jenkins requires a | ||
trusted file (e.g. <code>Jenkinsfile</code>) the contents of that file will be retrieved from the | ||
target branch on the origin repository and not from the pull request branch on the fork repository. | ||
</dd> | ||
<dt>Contributors</dt> | ||
<dd> | ||
Pull requests from <a href="https://developer.github.com/v3/repos/collaborators/">collaborators</a> | ||
to the origin repository will be treated as trusted, all other pull requests from fork repositories | ||
will be treated as untrusted.. | ||
Note that if credentials used by Jenkins for scanning the repository does not have permission to | ||
query the list of contributors to the origin repository then only the origin account will be treated | ||
as trusted - i.e. this will fall back to <code>Nobody</code>. | ||
</dd> | ||
<dt>Everyone</dt> | ||
<dd> | ||
All pull requests from forks will be treated as trusted. <strong>NOTE:</strong> this option can be dangerous | ||
if used on a public repository hosted on Bitbucket Cloud. | ||
</dd> | ||
</dl> | ||
</div> |
@@ -0,0 +1,3 @@ | ||
<div> | ||
Discovers pull requests where the origin repository is a fork of the target repository. | ||
</div> |
@@ -0,0 +1,4 @@ | ||
<div> | ||
The server to connect to. The list of servers is configured in the <strong>Manage Jenkins » Configure | ||
Jenkins › GitHub Enterprise Servers</strong> screen. | ||
</div> |
@@ -0,0 +1,16 @@ | ||
<div> | ||
The behaviours control what is discovered from the GitHub server. The behaviours are grouped into a number | ||
of categories: | ||
<dl> | ||
<dt>Repository</dt> | ||
<dd>These behaviours determine what repositories get discovered. Only repositories that have at least one | ||
discovered branch / pull request can themselves be discovered. | ||
</dd> | ||
<dt>Within repository</dt> | ||
<dd>These behaviours determine what gets discovered within each repository. <strong>If you do not configure | ||
at least one discovery behaviour then nothing will be found!</strong></dd> | ||
<dt>General</dt> | ||
<dd>These behaviours affect the configuration of each discovered branch / pull request. | ||
</dd> | ||
</dl> | ||
</div> |
@@ -0,0 +1,4 @@ | ||
<div> | ||
The server to connect to. The list of servers is configured in the <strong>Manage Jenkins » Configure | ||
Jenkins › GitHub Enterprise Servers</strong> screen. | ||
</div> |
File renamed without changes.
@@ -0,0 +1,3 @@ | ||
<div> | ||
The repository to scan. | ||
</div> |
@@ -0,0 +1,12 @@ | ||
<div> | ||
The behaviours control what is discovered from the GitHub repository. The behaviours are grouped into a number | ||
of categories: | ||
<dl> | ||
<dt>Within repository</dt> | ||
<dd>These behaviours determine what gets discovered. <strong>If you do not configure at least one discovery | ||
behaviour then nothing will be found!</strong></dd> | ||
<dt>General</dt> | ||
<dd>These behaviours affect the configuration of each discovered branch / pull request. | ||
</dd> | ||
</dl> | ||
</div> |
@@ -0,0 +1,15 @@ | ||
<div> | ||
Determines how pull requests are discovered: | ||
<ul> | ||
<li>Discover each pull request once with the discovered revision corresponding to the result of merging with the | ||
current revision of the target branch | ||
</li> | ||
<li>Discover each pull request once with the discovered revision corresponding to the pull request head revision | ||
without merging | ||
</li> | ||
<li>Discover each pull request twice. The first discovered revision corresponds to the result of merging with | ||
the current revision of the target branch in each scan. The second parallel discovered revision corresponds | ||
to the pull request head revision without merging | ||
</li> | ||
</ul> | ||
</div> |
@@ -0,0 +1,3 @@ | ||
<div> | ||
Discovers pull requests where the origin repository is the same as the target repository. | ||
</div> |
@@ -0,0 +1,3 @@ | ||
<div> | ||
Credentials used to check out sources. Must be a SSH key based credential. | ||
</div> |
@@ -0,0 +1,9 @@ | ||
<div> | ||
By default the discovered branches / pull requests will all use the same username / password credentials | ||
that were used for discovery when checking out sources. This means that the checkout will be using the | ||
<code>https://</code> protocol for the Git repository. | ||
<p> | ||
This behaviour allows you to select the SSH private key to be used for checking out sources, which will | ||
consequently force the checkout to use the <code>ssh://</code> protocol. | ||
</p> | ||
</div> |