message: Crowdin: change text of pull request
diff: #!groovy
  +// This script is run daily by https://jenkins.znc.in/ to:
  +// * upload new English strings to https://crowdin.com/project/znc-bouncer
  +// * download new translations
  +// * create a pull request with results to ZNC repo
  +
  import groovy.json.JsonSlurper;
  // TODO refactor this after ZNC 1.7 is released, because we'll need many branches
  @@ -39,7 +44,12 @@ timestamps {
  sh 'git config user.email jenkins@znc.in'
  sh 'git status'
  sh 'git add .'
  + try {
  sh 'git commit -m "Update translations from Crowdin"'
  + } catch(e) {
  + echo 'No changes found'
  + return
  + }
  sh "git remote add my github.com:${my_user}/${my_repo}.git"
  // TODO simplify when https://issues.jenkins-ci.org/browse/JENKINS-28335 is fixed
  withCredentials([sshUserPrivateKey(credentialsId: '6ef10f80-20dc-4661-af45-52a6e1e15749', keyFileVariable: 'GITHUB_KEY')]) {
  @@ -55,7 +65,7 @@ timestamps {
  def pulls = httpRequest consoleLogResponseBody: true, customHeaders: headers, url: "https://api.github.com/repos/${upstream_user}/${upstream_repo}/pulls", requestBody: '{"head":"'+my_user+':'+my_branch+'","base":"'+upstream_branch+'"}'
  pulls = new JsonSlurper().parseText(pulls.content)
  if (!pulls) {
  - httpRequest consoleLogResponseBody: true, customHeaders: headers, url: "https://api.github.com/repos/${upstream_user}/${upstream_repo}/pulls", httpMode: 'POST', requestBody: '{"head":"'+my_user+':'+my_branch+'","base":"'+upstream_branch+'","title":"Update translations from Crowdin"}'
  + httpRequest consoleLogResponseBody: true, customHeaders: headers, url: "https://api.github.com/repos/${upstream_user}/${upstream_repo}/pulls", httpMode: 'POST', requestBody: '{"head":"'+my_user+':'+my_branch+'","base":"'+upstream_branch+'","title":"Update translations","body":"From https://crowdin.com/project/znc-bouncer"}'
  }
  }
  }
  