Skip to content

Commit c53516c

Browse files
authored
Merge pull request #34 from Tapadoo/feature/commit-log-flag
add system.SLACK_IGNORE_COMMIT_MESSAGE
2 parents 1fcebdd + 5636b6a commit c53516c

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

CHANGELOG.markdown

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 4.4.1
2+
* Added support for teamcity configuration parameter "system.SLACK_IGNORE_COMMIT_MESSAGE" to allow user to ignore adding commits to slack message.
3+
14
# 4.4.0
25
* Added support for teamcity configuration parameter "system.POST_TO_SLACK" to supress posts from config level instead of project level by setting it to false or 0. Fixed bug with existing system.SLACK_CHANNEL param name for overwriting settings at the config level.
36

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ apply plugin: 'java'
1111

1212

1313
sourceCompatibility = 1.8
14-
version = '4.4.0'
14+
version = '4.4.1'
1515

1616
configurations {
1717
deploy

src/main/java/com/tapadoo/slacknotifier/SlackServerAdapter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,8 @@ else if( projectSettings != null && projectSettings.getChannel() != null && proj
353353
}
354354

355355
private JsonObject createCommitAttachment(SRunningBuild build) {
356+
String ignoreCommitMessage = build.getParametersProvider().get("system.SLACK_IGNORE_COMMIT_MESSAGE");
357+
if (ignoreCommitMessage != null && ignoreCommitMessage.equalsIgnoreCase("true")) return null;
356358

357359
List<SVcsModification> changes = build.getChanges(SelectPrevBuildPolicy.SINCE_LAST_SUCCESSFULLY_FINISHED_BUILD, true);
358360

teamcity-plugin.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<info>
55
<name>slackNotifier</name> <!-- the name of plugin used in teamcity -->
66
<display-name>Slack Notifier</display-name>
7-
<version>4.4.0</version>
7+
<version>4.4.1</version>
88
<description>Post build success notifications to Slack</description>
99
<vendor>
1010
<name>Tapadoo</name>
@@ -17,4 +17,4 @@
1717
<parameter name="key">value</parameter>
1818
<!-- ... -->
1919
</parameters>
20-
</teamcity-plugin>
20+
</teamcity-plugin>

0 commit comments

Comments
 (0)