Skip to content

Commit c08b80c

Browse files
MartinHjelmarefallberg
authored andcommitted
Remove use of titles by CI Butler (#1125)
1 parent d9e05eb commit c08b80c

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

.ci/butler.groovy

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def call(config) {
99
env.CHANGE_AUTHOR != 'tekka007' && env.CHANGE_AUTHOR != 'user2684' &&
1010
env.CHANGE_AUTHOR != 'Yveaux'))
1111
{
12-
config.pr.setBuildStatus(config, 'FAILURE', 'Toll gate (Butler)', 'Sir, This pull request targets master. I am afraid that is not permitted for '+env.CHANGE_AUTHOR, '')
12+
config.pr.setBuildStatus(config, 'FAILURE', 'Toll gate (Butler)', 'This pull request targets master. I am afraid that is not permitted for '+env.CHANGE_AUTHOR, '')
1313
error "This pull request targets master. That is not permitted!"
1414
}
1515
else if (env.CHANGE_TARGET == 'master')
@@ -48,7 +48,7 @@ def call(config) {
4848
])
4949
}
5050

51-
config.pr.setBuildStatus(config, 'SUCCESS', 'Toll gate (Butler)', 'Pass - Well done Master!', '')
51+
config.pr.setBuildStatus(config, 'SUCCESS', 'Toll gate (Butler)', 'Pass - Well done!', '')
5252
config.pr.setBuildStatus(config, 'SUCCESS', 'Toll gate (Release changelog)', '', '${BUILD_URL}execution/node/3/ws/MySensors/ReleaseNotes.md/*view*/')
5353
return
5454
}
@@ -85,7 +85,7 @@ def call(config) {
8585
createFileTemplateContent: '''
8686
{{#commits}}
8787
{{#messageBodyItems}}
88-
{{.}}
88+
{{.}}
8989
{{/messageBodyItems}}
9090
{{/commits}}
9191
''',
@@ -120,7 +120,7 @@ def call(config) {
120120
if (fileExists(config.repository_root+'restyling.patch')) {
121121
emailext (
122122
subject: "PR#${env.CHANGE_ID} - ${env.CHANGE_TITLE} has unfortunate code styling",
123-
body: """<p>Greetings Sir!<p>
123+
body: """<p>Greetings!<p>
124124
I am afraid your pull request does not follow the MySensors standards with respect to coding style.</p>
125125
That is ok, you are perhaps a first time committer to this repository. Please read the <a href="https://www.mysensors.org/download/contributing">code contribution guidelines</a> for help on how to format your code.<p>
126126
To assist you, I have prepared a patch for you that will reformat the code according to the coding style required.<br>
@@ -143,7 +143,7 @@ def call(config) {
143143
echo "You can read the detailed error report here: "+env.BUILD_URL+"The_20Butler_20report/"
144144
error 'Terminated due to Butler assert'
145145
} else {
146-
config.pr.setBuildStatus(config, 'SUCCESS', 'Toll gate (Butler)', 'Pass - Well done Sir!', '${BUILD_URL}The_20Butler_20report/butler.html')
146+
config.pr.setBuildStatus(config, 'SUCCESS', 'Toll gate (Butler)', 'Pass - Well done!', '${BUILD_URL}The_20Butler_20report/butler.html')
147147
}
148148
}
149149

.ci/butler.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ if git grep -q boolean -- `git ls-files | grep -v butler.sh`; then
5656
fi
5757

5858
printf "%s" "<html>" > butler.html
59-
echo "Greetings Sir! Here is my evaluation of your pull request:<br>" >> butler.html
59+
echo "Greetings! Here is my evaluation of your pull request:<br>" >> butler.html
6060
awk 'FNR==1{print "<br>"}1' too_long_subjects.txt leading_lowercases.txt trailing_periods.txt too_long_body_lines.txt missing_keywords.txt booleans.txt >> butler.html
6161
echo "<br>" >> butler.html
6262
if [ $result -ne 0 ]; then
@@ -87,7 +87,7 @@ if [ -s restyling.patch ]; then
8787
echo "<br>" >> butler.html
8888
result=1
8989
else
90-
echo "This commit is meeting the coding standards, well done Sir!<br>" >> butler.html
90+
echo "This commit is meeting the coding standards, well done!<br>" >> butler.html
9191
echo "<br>" >> butler.html
9292
rm restyling.patch
9393
fi

.ci/pipeline.groovy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def call(Closure body) {
5858

5959
config.tests = findFiles(glob: config.library_root+'tests/**/*.ino')
6060
config.examples = findFiles(glob: config.library_root+'examples/**/*.ino')
61-
61+
6262
}
6363

6464
parallel Doxygen: {
@@ -177,7 +177,7 @@ def call(Closure body) {
177177
message: "Failed to build <${env.CHANGE_URL}|PR#${env.CHANGE_ID} - ${env.CHANGE_TITLE}>. Job <${env.BUILD_URL}|${env.JOB_NAME} #${env.BUILD_NUMBER}> ended with ${currentBuild.result}."
178178
emailext (
179179
subject: "PR#${env.CHANGE_ID} - ${env.CHANGE_TITLE} failed to build",
180-
body: '''Greetings Sir!<p>
180+
body: '''Greetings!<p>
181181
I am The Butler. My task is to help you create a pull request that fit the MySensors organizations coding style and builds for all supported platforms.<p>
182182
I am afraid I failed to validate your pull request. Result was '''+currentBuild.result+'''.
183183
<br>Please check the attached build log or <a href="${BUILD_URL}">here</a> for a hint on what the problem might be.<p>
@@ -196,7 +196,7 @@ def call(Closure body) {
196196
message: "Failed to build branch ${env.BRANCH_NAME}. Job <${env.BUILD_URL}|${env.JOB_NAME} #${env.BUILD_NUMBER}> ended with ${currentBuild.result}."
197197
emailext (
198198
subject: "MySensors branch ${env.BRANCH_NAME} failed to build",
199-
body: '''Sir, I am afraid I failed to build branch ${BRANCH_NAME}. Result was '''+currentBuild.result+'''.
199+
body: '''I am afraid I failed to build branch ${BRANCH_NAME}. Result was '''+currentBuild.result+'''.
200200
<br>Please check the attached build log or <a href="${BUILD_URL}">here</a> for a hint on what the problem might be.<p>
201201
Changes:<br>
202202
${CHANGES}<p>
@@ -215,4 +215,4 @@ def call(Closure body) {
215215
}
216216
}
217217
}
218-
return this
218+
return this

0 commit comments

Comments
 (0)