Skip to content

Commit

Permalink
Merge pull request crossplane-contrib#197 from bassam/pr-fix-skip-ci
Browse files Browse the repository at this point in the history
build: use token when curling to github
  • Loading branch information
bassam authored Dec 3, 2018
2 parents 357c0c6 + 7627dd4 commit 958cfdd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pipeline {
script {
if (env.BRANCH_NAME =~ /^PR-\d+$/) {
def pr_number = sh (script: "echo ${env.BRANCH_NAME} | grep -o -E '[0-9]+' ", returnStdout: true)
def json = sh (script: "curl -s https://api.github.com/repos/crossplaneio/crossplane/pulls/${pr_number}", returnStdout: true).trim()
def json = sh (script: 'curl -s -H "Authorization: token ${GITHUB_UPBOUND_BOT}" https://api.github.com/repos/crossplaneio/crossplane/pulls/${pr_number}', returnStdout: true).trim()
def body = evaluateJson(json,'${json.body}')
if (body.contains("[skip ci]")) {
echo ("'[skip ci]' spotted in PR body text.")
Expand Down

0 comments on commit 958cfdd

Please sign in to comment.