Skip to content

Commit 0906a9b

Browse files
authored
Merge pull request #11 from jonesbusy/feature/JENKINS-64360-rename-traits
[JENKINS-64360] Rename traits symbols
2 parents 391033a + 80626f1 commit 0906a9b

File tree

9 files changed

+26
-11
lines changed

9 files changed

+26
-11
lines changed

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,22 @@ Similar to the [Disable GitHub Multibranch Status plugin](https://plugins.jenkin
1818
repoOwner: 'example-owner',
1919
repository: 'example-repository',
2020
traits: [
21-
skipNotifications(),
21+
bitbucketSkipNotifications(),
22+
...,
23+
]
24+
)
25+
)
26+
```
27+
28+
### Github
29+
30+
```Groovy
31+
checkout resolveScm(
32+
source: github(
33+
repoOwner: 'example-owner',
34+
repository: 'example-repository',
35+
traits: [
36+
githubSkipNotifications(),
2237
...,
2338
]
2439
)

src/main/java/com/cloudbees/jenkins/plugins/bitbucket/notifications/SkipNotificationsTrait.java renamed to src/main/java/com/cloudbees/jenkins/plugins/bitbucket/notifications/BitbucketSkipNotifications.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ of this software and associated documentation files (the "Software"), to deal
3434
import org.kohsuke.stapler.DataBoundConstructor;
3535
import org.jenkinsci.plugins.variant.OptionalExtension;
3636

37-
public class SkipNotificationsTrait extends SCMSourceTrait {
37+
public class BitbucketSkipNotifications extends SCMSourceTrait {
3838

3939
/**
4040
* Constructor for stapler.
4141
*/
4242
@DataBoundConstructor
43-
public SkipNotificationsTrait() {
43+
public BitbucketSkipNotifications() {
4444
//empty
4545
}
4646

@@ -56,12 +56,12 @@ protected void decorateContext(SCMSourceContext<?, ?> context) {
5656
* Our descriptor.
5757
*/
5858
@OptionalExtension(requirePlugins={"cloudbees-bitbucket-branch-source"})
59-
@Symbol("skipNotifications")
59+
@Symbol("bitbucketSkipNotifications")
6060
public static class DescriptorImpl extends SCMSourceTraitDescriptor {
6161

6262
@Override
6363
public String getDisplayName() {
64-
return Messages.SkipNotificationsTrait_displayName();
64+
return Messages.BitbucketSkipNotifications_displayName();
6565
}
6666

6767
@Override

src/main/java/org/jenkinsci/plugins/github/notifications/NotificationsSkipTrait.java renamed to src/main/java/org/jenkinsci/plugins/github/notifications/GithubSkipNotifications.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ of this software and associated documentation files (the "Software"), to deal
3838
*
3939
* @since 1.0.4
4040
*/
41-
public class NotificationsSkipTrait extends SCMSourceTrait {
41+
public class GithubSkipNotifications extends SCMSourceTrait {
4242

4343
/**
4444
* Constructor for stapler.
4545
*/
4646
@DataBoundConstructor
47-
public NotificationsSkipTrait() {
47+
public GithubSkipNotifications() {
4848
//empty
4949
}
5050

@@ -63,14 +63,14 @@ protected void decorateContext(SCMSourceContext<?, ?> context) {
6363
* Our {@link hudson.model.Descriptor}
6464
*/
6565
@OptionalExtension(requirePlugins={"github-branch-source"})
66-
@Symbol("notificationsSkip")
66+
@Symbol("githubSkipNotifications")
6767
public static class DescriptorImpl extends SCMSourceTraitDescriptor {
6868
/**
6969
* {@inheritDoc}
7070
*/
7171
@Override
7272
public String getDisplayName() {
73-
return org.jenkinsci.plugins.github.notifications.Messages.NotificationsSkipTrait_displayName();
73+
return Messages.GithubSkipNotifications_displayName();
7474
}
7575

7676
/**
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
SkipNotificationsTrait.displayName=Skip build status notifications
1+
BitbucketSkipNotifications.displayName=Skip build status notifications
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
NotificationsSkipTrait.displayName=Skip build status notifications
1+
GithubSkipNotifications.displayName=Skip build status notifications

0 commit comments

Comments
 (0)