Skip to content

Commit e09b562

Browse files
Improve wording (#493)
* Improve wording * Consistent naming for the plugin and Bitbucket * Rearrange Bitbucket Server 7.x changes description Co-authored-by: Liam Newman <bitwiseman@gmail.com> Co-authored-by: Liam Newman <bitwiseman@gmail.com>
1 parent 5494ac5 commit e09b562

29 files changed

+56
-56
lines changed

README.adoc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1-
== BitBucket Branch Source Plugin
1+
== Bitbucket Branch Source Plugin
22

33
image:https://img.shields.io/jenkins/plugin/v/cloudbees-bitbucket-branch-source["Jenkins Plugin", link="https://plugins.jenkins.io/cloudbees-bitbucket-branch-source"]
44
image:https://img.shields.io/jenkins/plugin/i/cloudbees-bitbucket-branch-source?color=blue["Jenkins Plugin Installs", link="https://plugins.jenkins.io/cloudbees-bitbucket-branch-source"]
55
image:https://img.shields.io/github/release/jenkinsci/bitbucket-branch-source-plugin.svg?label=changelog["Changelog", link="https://github.com/jenkinsci/bitbucket-branch-source-plugin/releases/latest"]
66
image:https://badges.gitter.im/Join%20Chat.svg["Join the chat",link="https://gitter.im/jenkinsci/bitbucket-branch-source-plugin?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"]
77

8-
98
=== User Guide
109

1110
link:./docs/USER_GUIDE.adoc[Browse the user guide here]
1211

1312
=== Notes
1413

15-
* Unlike GitHub, in BitBucket, https://bitbucket.org/site/master/issues/4828/team-admins-dont-have-read-access-to-forks[team admins do not have access to forks].
14+
* Unlike GitHub, in Bitbucket, https://bitbucket.org/site/master/issues/4828/team-admins-dont-have-read-access-to-forks[team admins do not have access to forks].
1615
This means that when you have a private repository, or a private fork of a public repository, the team admin will not be able to see the PRs within the fork.
1716

1817
=== How-to run and test with Bitbucket Server locally

docs/USER_GUIDE.adoc

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
= CloudBees Bitbucket Branch Source plugin
1+
= Bitbucket Branch Source Plugin
22

33
[IMPORTANT]
44
=====================================================================
5-
On March 5th, 2020, link:https://confluence.atlassian.com/bitbucketserver/bitbucket-server-7-0-release-notes-990546638.html[Atlassian releases Bitbucket Server 7] which removed some undocumented features with regards to pull requests.
5+
On March 5th, 2020, link:https://confluence.atlassian.com/bitbucketserver/bitbucket-server-7-0-release-notes-990546638.html[Atlassian releases Bitbucket Server 7] which removed some undocumented features related to pull requests.
66
7-
. BitBucket Server Pipeline jobs can no longer perform a lightweight checkout of the Jenkinsfile if you are using the merge strategy for builds.
8-
.. BitBucket Server no longer stores the merged result of a PR to link:https://jira.atlassian.com/browse/BSERV-12284?focusedCommentId=2389584&[improve performance]
9-
.. BitBucket Server Pipeline jobs will automatically fallback to heavyweight checkout
10-
. BitBucket Server 7.x no longer automatically creates the required refs for pull requests
11-
.. For Bitbucket Server Pipeline jobs to function for pull requests on BitBucket Server 7.x you need to enable "Call Changes api" option in the plugin configuration
7+
. With Bitbucket Server 7.x, Jenkins Pipeline jobs can no longer perform a lightweight checkout of the `Jenkinsfile` if you are using the merge strategy for builds.
8+
.. This is due to Bitbucket Server 7.x no longer storing the merge commit for PRs to `refs/pull-requests/*/merge` which was a prerequisite for lightweight checkout.
9+
.. Bitbucket Server Pipeline jobs will automatically fall back to heavyweight checkout.
10+
.. link:https://jira.atlassian.com/browse/BSERV-12284?focusedCommentId=2389584&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-2389584[Atlassian has explained their reasons for making this change] and has made it clear they will not be re-adding this behavior.
11+
. For Jenkins Pipeline jobs to function for pull requests on Bitbucket Server 7.x, you need to enable "Call Changes api" option in the plugin configuration.
12+
.. Bitbucket Server 7.x no longer automatically creates the required refs for pull requests. Calls to this new API are required to trigger ref creation.
1213
1314
=====================================================================
1415

1516
[id=bitbucket-sect-intro]
1617

17-
_CloudBees Bitbucket Branch Source plugin_ (_Bitbucket plugin_ up now) allows use of Bitbucket Cloud and Server
18+
_Bitbucket Branch Source plugin_ allows use of Bitbucket Cloud and Server
1819
as a multi-branch project source in two different ways:
1920

2021
* *Single repository source*: automatic creation of jobs for branches and pull requests in a specific repository.
@@ -23,9 +24,9 @@ as a multi-branch project source in two different ways:
2324
IMPORTANT: This plugin is not compatible with versions of Bitbucket Server previous to 4.0.
2425

2526
[id=bitbucket-server-7]
26-
== BitBucket Server 7 compatibility
27+
== Bitbucket Server 7 compatibility
2728

28-
_BitBucket Server 7.x_ is supported but does no longer support lightweight checkout for pull requests when merge strategy is used for build.
29+
_Bitbucket Server 7.x_ is supported but does no longer support lightweight checkout for pull requests when merge strategy is used for build.
2930

3031
IMPORTANT: In order to have the pull request process working the "Call Changes api" option must be
3132
enabled in _Manage Jenkins_ » _Configure System_
@@ -83,12 +84,12 @@ image::images/screenshot-9.png[scaledwidth=90%]
8384
== Webhooks registering
8485

8586
The use of https://confluence.atlassian.com/bitbucket/manage-webhooks-735643732.html[Bitbucket webhooks]
86-
allows to trigger builds on branches and pull requests just when a new commit is done. Bitbucket plugin expose a special
87+
allows to trigger builds on branches and pull requests just when a new commit is done. Bitbucket plugin exposes a special
8788
service to listen to this webhook requests and acts accordingly by triggering a new reindex and finally
8889
triggering builds on matching branches or pull requests.
8990

9091
For both _Bitbucket Multibranch_ projects and _Bitbucket Team_ projects there is an option in the configuration page
91-
to let Jenkins to automatically register the webhooks in all involved repositories.
92+
to let Jenkins automatically register the webhooks in all involved repositories.
9293

9394
image::images/screenshot-4.png[scaledwidth=90%]
9495

@@ -104,7 +105,7 @@ two credentials to configure:
104105
. *Scan Credentials*: credentials used to access Bitbucket API in order to discover repositories, branches and pull requests.
105106
If not set then anonymous access is used, so only public repositories, branches and pull requests are discovered and managed. Note that the
106107
Webhooks auto-register feature requires scan credentials to be set. Only HTTP or OAuth credentials are accepted in this field.
107-
. *Checkout Credentials*: credentials used to checkout sources once the repository, branch or pull request is discovered. HTTP, SSH and OAuthcredentials
108+
. *Checkout Credentials*: credentials used to check out sources once the repository, branch or pull request is discovered. HTTP, SSH and OAuth credentials
108109
are allowed. If not set then _Scan Credentials_ are used.
109110

110111
image::images/screenshot-3.png[scaledwidth=90%]

src/main/java/com/cloudbees/jenkins/plugins/bitbucket/BitbucketBuildStatusNotifications.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
/**
5555
* This class encapsulates all Bitbucket notifications logic.
5656
* {@link JobCompletedListener} sends a notification to Bitbucket after a build finishes.
57-
* Only builds derived from a job that was created as part of a multi branch project will be processed by this listener.
57+
* Only builds derived from a job that was created as part of a multi-branch project will be processed by this listener.
5858
*/
5959
public class BitbucketBuildStatusNotifications {
6060

src/main/java/com/cloudbees/jenkins/plugins/bitbucket/BitbucketGitSCMBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public BitbucketGitSCMBuilder withCloneLinks(List<BitbucketHref> cloneLinks) {
141141

142142
/**
143143
* Returns the {@link BitbucketSCMSource} that this request is against (primarily to allow resolving credentials
144-
* against {@link SCMSource#getOwner()}.
144+
* against {@link SCMSource#getOwner()}).
145145
*
146146
* @return the {@link BitbucketSCMSource} that this request is against
147147
*/
@@ -168,7 +168,7 @@ public List<BitbucketHref> cloneLinks() {
168168
* the {@link #remote()} or {@code null} to let the git client choose between providing its own
169169
* credentials or connecting anonymously.
170170
* @param protocol the {@link BitbucketRepositoryProtocol} of the {@link Credentials} to use or {@code null}
171-
* to detect the the protocol based on the credentialsId. Defaults to HTTP if credentials are
171+
* to detect the protocol based on the credentialsId. Defaults to HTTP if credentials are
172172
* {@code null}. Enables support for blank SSH credentials.
173173
* @return {@code this} for method chaining.
174174
*/

src/main/java/com/cloudbees/jenkins/plugins/bitbucket/BitbucketSCMNavigator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ public void setCredentialsId(@CheckForNull String credentialsId) {
222222

223223
/**
224224
* Sets the behavioural traits that are applied to this navigator and any {@link BitbucketSCMSource} instances it
225-
* discovers. The new traits will take affect on the next navigation through any of the
225+
* discovers. The new traits will take effect on the next navigation through any of the
226226
* {@link #visitSources(SCMSourceObserver)} overloads or {@link #visitSource(String, SCMSourceObserver)}.
227227
*
228228
* @param traits the new behavioural traits.
@@ -241,7 +241,7 @@ public void setTraits(@CheckForNull SCMTrait[] traits) {
241241

242242
/**
243243
* Sets the behavioural traits that are applied to this navigator and any {@link BitbucketSCMSource} instances it
244-
* discovers. The new traits will take affect on the next navigation through any of the
244+
* discovers. The new traits will take effect on the next navigation through any of the
245245
* {@link #visitSources(SCMSourceObserver)} overloads or {@link #visitSource(String, SCMSourceObserver)}.
246246
*
247247
* @param traits the new behavioural traits.
@@ -358,7 +358,7 @@ public void setBitbucketServerUrl(String url) {
358358
setServerUrl(url);
359359
return;
360360
}
361-
LOGGER.log(Level.WARNING, "Call to legacy setBitbucketServerUrl({0}) method is configuring an url missing "
361+
LOGGER.log(Level.WARNING, "Call to legacy setBitbucketServerUrl({0}) method is configuring a url missing "
362362
+ "from the global configuration.", url);
363363
setServerUrl(url);
364364
}

src/main/java/com/cloudbees/jenkins/plugins/bitbucket/BitbucketSCMSource.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ public class BitbucketSCMSource extends SCMSource {
199199

200200
/**
201201
* Bitbucket Server URL.
202-
* An specific HTTP client is used if this field is not null.
202+
* A specific HTTP client is used if this field is not null.
203203
* This value (or serverUrl if this is null) is used in particular
204204
* to find the current endpoint configuration for this server.
205205
*/
@@ -358,7 +358,7 @@ public void setBitbucketServerUrl(String url) {
358358
setServerUrl(endpoint.getServerUrl());
359359
return;
360360
}
361-
LOGGER.log(Level.WARNING, "Call to legacy setBitbucketServerUrl({0}) method is configuring an url missing "
361+
LOGGER.log(Level.WARNING, "Call to legacy setBitbucketServerUrl({0}) method is configuring a url missing "
362362
+ "from the global configuration.", url);
363363
setServerUrl(url);
364364
}
@@ -542,7 +542,7 @@ protected void retrieve(@CheckForNull SCMSourceCriteria criteria, @NonNull SCMHe
542542
listener.getLogger().format("Connecting to %s using %s%n", getServerUrl(),
543543
CredentialsNameProvider.name(scanCredentials));
544544
}
545-
// this has the side-effect of ensuring that repository type is always populated.
545+
// this has the side effect of ensuring that repository type is always populated.
546546
listener.getLogger().format("Repository type: %s%n", WordUtils.capitalizeFully(getRepositoryType().name()));
547547

548548
// populate the request with its data sources

src/main/java/com/cloudbees/jenkins/plugins/bitbucket/BitbucketTagSCMHead.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import jenkins.scm.api.mixin.TagSCMHead;
3232

3333
/**
34-
* {@link SCMHead} for a BitBucket tags.
34+
* {@link SCMHead} for a Bitbucket tags.
3535
*
3636
* @since 2.2.11
3737
*/
@@ -84,6 +84,6 @@ public BitbucketRepositoryType getRepositoryType() {
8484
*/
8585
@Override
8686
public String getPronoun() {
87-
return Messages.BitBucketTagSCMHead_Pronoun();
87+
return Messages.BitbucketTagSCMHead_Pronoun();
8888
}
8989
}

src/main/java/com/cloudbees/jenkins/plugins/bitbucket/BranchSCMHead.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import org.kohsuke.accmod.restrictions.DoNotUse;
3131

3232
/**
33-
* {@link SCMHead} for a BitBucket branch.
33+
* {@link SCMHead} for a Bitbucket branch.
3434
*
3535
* @since 2.0.0
3636
*/

src/main/java/com/cloudbees/jenkins/plugins/bitbucket/PullRequestSCMHead.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
import org.kohsuke.accmod.restrictions.NoExternalUse;
4242

4343
/**
44-
* {@link SCMHead} for a BitBucket Pull request
44+
* {@link SCMHead} for a Bitbucket pull request
4545
*
4646
* @since 2.0.0
4747
*/
@@ -261,7 +261,7 @@ public SCMRevision migrate(@NonNull BitbucketSCMSource source,
261261
@NonNull AbstractGitSCMSource.SCMRevisionImpl revision) {
262262
PullRequestSCMHead head = migrate(source, (FixLegacy) revision.getHead());
263263
return head != null ? new PullRequestSCMRevision<>(head,
264-
// ChangeRequestCheckoutStrategy.HEAD means we ignore the target revision
264+
// ChangeRequestCheckoutStrategy.HEAD means we ignore the target revision,
265265
// so we can leave it null as a placeholder
266266
new AbstractGitSCMSource.SCMRevisionImpl(head.getTarget(), null),
267267
new AbstractGitSCMSource.SCMRevisionImpl(head, revision.getHash()

src/main/java/com/cloudbees/jenkins/plugins/bitbucket/SCMHeadWithOwnerAndRepo.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,15 @@ private Object readResolve() throws ObjectStreamException {
7474
if (metadata != null) {
7575
// we just want to flag this as a PR, the legacy data did not contain the required information
7676
// then the temporary PR class will be resolved by GitMigrationImpl when the
77-
// context to look-up the correct target is (hopefully) available. If the context is not available
77+
// context to look up the correct target is (hopefully) available. If the context is not available
7878
// then worst case we will end up triggering a rebuild on next index / event via take-over
7979
return new PR(repoOwner, repoName, getName(), metadata.getId(), new BranchSCMHead("\u0000", null));
8080
}
8181
return new BranchSCMHead(getName(), null);
8282
}
8383

8484
/**
85-
* Marker class to ensure that we do not attempt apply an {@link SCMHeadMigration} on all
85+
* Marker class to ensure that we do not attempt to apply a {@link SCMHeadMigration} on all
8686
* {@link PullRequestSCMHead} instances, rather we only apply it on ones that need migration. We need to use a
8787
* {@link ChangeRequestSCMHead} in order to retain the correct categorization of {@link SCMHead} instances
8888
* in the event that the {@link GitMigrationImpl} fail to resolve the target.
@@ -161,7 +161,7 @@ public SCMRevision migrate(@NonNull BitbucketSCMSource source,
161161
@NonNull AbstractGitSCMSource.SCMRevisionImpl revision) {
162162
PullRequestSCMHead head = migrate(source, (PR) revision.getHead());
163163
return head != null ? new PullRequestSCMRevision<>(head,
164-
// ChangeRequestCheckoutStrategy.HEAD means we ignore the target revision
164+
// ChangeRequestCheckoutStrategy.HEAD means we ignore the target revision,
165165
// so we can leave it null as a placeholder
166166
new AbstractGitSCMSource.SCMRevisionImpl(head.getTarget(), null),
167167
new AbstractGitSCMSource.SCMRevisionImpl(head, revision.getHash()

0 commit comments

Comments
 (0)