Skip to content

Commit 2ebff80

Browse files
committed
feat(token): allow GH_TOKEN
1 parent 42b3015 commit 2ebff80

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ node_js:
88
- '8'
99
before_script:
1010
- npm prune
11+
script:
12+
- npm test
13+
- ./test/test.sh
1114
after_success:
1215
- npm run semantic-release
1316
branches:

bin/empty.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/env node
22

3-
const token = process.env.TOKEN || process.env.GITHUB_TOKEN
3+
const token = process.env.TOKEN || process.env.GITHUB_TOKEN || process.env.GH_TOKEN
44
if (!token) {
5-
console.error('Cannot find TOKEN or GITHUB_TOKEN')
5+
console.error('Cannot find TOKEN or GITHUB_TOKEN or GH_TOKEN')
66
process.exit(1)
77
}
88

test/test.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
node bin/empty.js \
6+
--repo bahmutov/test-make-empty-github-commit \
7+
--message "empty commit message from build $TRAVIS_BUILD_NUMBER"

0 commit comments

Comments
 (0)