Skip to content
This repository was archived by the owner on Oct 21, 2021. It is now read-only.

Add "GITHUB_TOKEN" to the list of locations to look for GitHub token #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ This is a perfect use case for GitHub’s commit status API.

- `GH_STATUS_TOKEN`
- `GH_TOKEN`
- `GITHUB_TOKEN`

That token should have `repo:status` scope.

Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const validate = require('./validate')
exports.post = post

function post ({
token = process.env.GH_STATUS_TOKEN || process.env.GH_TOKEN,
token = process.env.GH_STATUS_TOKEN || process.env.GH_TOKEN || process.env.GITHUB_TOKEN,
sha = process.env.CIRCLE_SHA1 || process.env.TRAVIS_PULL_REQUEST_SHA || process.env.TRAVIS_COMMIT || process.env.CI_COMMIT_ID,
owner = process.env.CIRCLE_PROJECT_USERNAME || extractSlug(process.env.TRAVIS_REPO_SLUG, 0) || extractSlug(process.env.CI_REPO_NAME, 0),
repo = process.env.CIRCLE_PROJECT_REPONAME || extractSlug(process.env.TRAVIS_REPO_SLUG, 1) || extractSlug(process.env.CI_REPO_NAME, 1),
Expand Down