Skip to content

Instantly share code, notes, and snippets.

@DanPurdy
Created April 7, 2016 00:05
Show Gist options
  • Save DanPurdy/cdd13a96ac9a751849f56e561443c703 to your computer and use it in GitHub Desktop.
Save DanPurdy/cdd13a96ac9a751849f56e561443c703 to your computer and use it in GitHub Desktop.
Sets a pending status in Github from Bamboo
## Pending ESLint tests
curl -H "Authorization: token <YOUR-GITHUB-TOKEN-HERE>" \
--request POST \
--data \
'{
"state": "pending",
"context": "Eslint",
"description": "Preparing to lint code",
"target_url": "${bamboo.buildResultsUrl}"
}' \
https://GITHUB-URL/api/v3/repos/GITHUB-USER/REPO/statuses/${bamboo.repository.revision.number} > /dev/null
## Pending Karma tests
curl -H "Authorization: token <YOUR-GITHUB-TOKEN-HERE>" \
--request POST \
--data \
'{
"state": "pending",
"context": "Karma - Unit tests",
"description": "Waiting for unit test results",
"target_url": "${bamboo.buildResultsUrl}"
}' \
https://GITHUB-URL/api/v3/repos/GITHUB-USER/REPO/statuses/${bamboo.repository.revision.number} > /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment