Remove use of titles by CI Butler (#1125)

This commit is contained in:
Martin Hjelmare
2018-05-04 18:35:00 +02:00
committed by Patrick Fallberg
parent d9e05eb39c
commit c08b80cb90
3 changed files with 11 additions and 11 deletions
+5 -5
View File
@@ -9,7 +9,7 @@ def call(config) {
env.CHANGE_AUTHOR != 'tekka007' && env.CHANGE_AUTHOR != 'user2684' &&
env.CHANGE_AUTHOR != 'Yveaux'))
{
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, '')
config.pr.setBuildStatus(config, 'FAILURE', 'Toll gate (Butler)', 'This pull request targets master. I am afraid that is not permitted for '+env.CHANGE_AUTHOR, '')
error "This pull request targets master. That is not permitted!"
}
else if (env.CHANGE_TARGET == 'master')
@@ -48,7 +48,7 @@ def call(config) {
])
}
config.pr.setBuildStatus(config, 'SUCCESS', 'Toll gate (Butler)', 'Pass - Well done Master!', '')
config.pr.setBuildStatus(config, 'SUCCESS', 'Toll gate (Butler)', 'Pass - Well done!', '')
config.pr.setBuildStatus(config, 'SUCCESS', 'Toll gate (Release changelog)', '', '${BUILD_URL}execution/node/3/ws/MySensors/ReleaseNotes.md/*view*/')
return
}
@@ -85,7 +85,7 @@ def call(config) {
createFileTemplateContent: '''
{{#commits}}
{{#messageBodyItems}}
{{.}}
{{.}}
{{/messageBodyItems}}
{{/commits}}
''',
@@ -120,7 +120,7 @@ def call(config) {
if (fileExists(config.repository_root+'restyling.patch')) {
emailext (
subject: "PR#${env.CHANGE_ID} - ${env.CHANGE_TITLE} has unfortunate code styling",
body: """<p>Greetings Sir!<p>
body: """<p>Greetings!<p>
I am afraid your pull request does not follow the MySensors standards with respect to coding style.</p>
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>
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) {
echo "You can read the detailed error report here: "+env.BUILD_URL+"The_20Butler_20report/"
error 'Terminated due to Butler assert'
} else {
config.pr.setBuildStatus(config, 'SUCCESS', 'Toll gate (Butler)', 'Pass - Well done Sir!', '${BUILD_URL}The_20Butler_20report/butler.html')
config.pr.setBuildStatus(config, 'SUCCESS', 'Toll gate (Butler)', 'Pass - Well done!', '${BUILD_URL}The_20Butler_20report/butler.html')
}
}
+2 -2
View File
@@ -56,7 +56,7 @@ if git grep -q boolean -- `git ls-files | grep -v butler.sh`; then
fi
printf "%s" "<html>" > butler.html
echo "Greetings Sir! Here is my evaluation of your pull request:<br>" >> butler.html
echo "Greetings! Here is my evaluation of your pull request:<br>" >> butler.html
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
echo "<br>" >> butler.html
if [ $result -ne 0 ]; then
@@ -87,7 +87,7 @@ if [ -s restyling.patch ]; then
echo "<br>" >> butler.html
result=1
else
echo "This commit is meeting the coding standards, well done Sir!<br>" >> butler.html
echo "This commit is meeting the coding standards, well done!<br>" >> butler.html
echo "<br>" >> butler.html
rm restyling.patch
fi
+4 -4
View File
@@ -58,7 +58,7 @@ def call(Closure body) {
config.tests = findFiles(glob: config.library_root+'tests/**/*.ino')
config.examples = findFiles(glob: config.library_root+'examples/**/*.ino')
}
parallel Doxygen: {
@@ -177,7 +177,7 @@ def call(Closure body) {
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}."
emailext (
subject: "PR#${env.CHANGE_ID} - ${env.CHANGE_TITLE} failed to build",
body: '''Greetings Sir!<p>
body: '''Greetings!<p>
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>
I am afraid I failed to validate your pull request. Result was '''+currentBuild.result+'''.
<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) {
message: "Failed to build branch ${env.BRANCH_NAME}. Job <${env.BUILD_URL}|${env.JOB_NAME} #${env.BUILD_NUMBER}> ended with ${currentBuild.result}."
emailext (
subject: "MySensors branch ${env.BRANCH_NAME} failed to build",
body: '''Sir, I am afraid I failed to build branch ${BRANCH_NAME}. Result was '''+currentBuild.result+'''.
body: '''I am afraid I failed to build branch ${BRANCH_NAME}. Result was '''+currentBuild.result+'''.
<br>Please check the attached build log or <a href="${BUILD_URL}">here</a> for a hint on what the problem might be.<p>
Changes:<br>
${CHANGES}<p>
@@ -215,4 +215,4 @@ def call(Closure body) {
}
}
}
return this
return this