Skip to content

Commit 06e8ced

Browse files
committed
Update Travis config for new token
1 parent 705c9bc commit 06e8ced

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

.travis.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ cache:
1313
- $HOME/.yarn-cache
1414
before_install:
1515
- |
16+
echo "machine github.com login reactjs-bot password $GITHUB_TOKEN" >~/.netrc
17+
unset GITHUB_TOKEN
18+
1619
if [ "$TEST_TYPE" != build_website ] && \
1720
! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md$)|(^(docs|examples))/'
1821
then
@@ -35,7 +38,6 @@ script:
3538
set -e
3639
3740
GH_PAGES_DIR="$TRAVIS_BUILD_DIR"/../react-gh-pages
38-
echo "machine github.com login reactjs-bot password $GITHUB_TOKEN" >~/.netrc
3941
git config --global user.name "$GITHUB_USER_NAME"
4042
git config --global user.email "$GITHUB_USER_EMAIL"
4143
@@ -121,7 +123,7 @@ env:
121123
# SECRET_TOKEN
122124
- secure: dkpPW+VnoqC/okhRdV90m36NcyBFhcwEKL3bNFExAwi0dXnFao8RoFlvnwiPlA23h2faROkMIetXlti6Aju08BgUFV+f9aL6vLyU7gUent4Nd3413zf2fwDtXIWIETg6uLnOpSykGKgCAT/hY3Q2oPLqOoY0OxfgnbqwxkxljrE=
123125
# GITHUB_TOKEN
124-
- secure: EHCyCSKMwKlLHNtcj9nmkRzmiiPE3aDGlPcnEyrDJeRI0SeN/iCXHXfFivR0vFq3vr+9naMBczAR2AEidtps5KbJrKqdZnjPFRbmfVtzWr/LlvVCub3u13Pub6TdKIVBTny1PuZ5X8GvdxMNVig89jGjvzhhWuQRaz3VhJnTra4=
126+
- secure: Sn+HwLSkbgM5MqVszq/CJHcOsZax17zwW0ILpGgAaEKD6MHNmEBdc71skaLr+6R4gHVO5ybV2cgSxHuBLHKzYoidq5ksGKRHNeXfyOv8jeHGTN/FjwMQbM+WkIK3wFroLsuQ1kW2FBfFEXqx4rET6GXwdcqycGl8GSFB1l0VNzE=
125127
# COVERALLS_TOKEN
126128
- secure: h/cUq+TrUMZOQmkFD7CvuwX0uAwmjIfKZ4qSUzY+QzUtDzOzA0L/XF84xTBq1Q5YYsEiaoF6GxxGCdrLQiBA/ZTd+88UHgeZPMRvi0xG9Q+PeePVOsZMTxy4/WWFgOfSQCk49Mj9zizGgO78i6vxq+SDXMtFHnZ+TpPJIEW6/m0=
127129
notifications:

scripts/facts-tracker/index.js

+4-13
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ function escape(value) {
2121

2222
var cwd = null;
2323
function exec(command) {
24-
console.error('>', command.replace(process.env.GITHUB_TOKEN, '************'));
25-
var options = {
26-
stdio: [null, null, null],
27-
};
24+
var options = {};
2825
if (cwd) {
2926
options.cwd = cwd;
3027
}
@@ -45,7 +42,7 @@ if (isInsideOfTravis) {
4542
process.exit(0);
4643
}
4744

48-
if (!process.env.GITHUB_USER || !process.env.GITHUB_TOKEN) {
45+
if (!process.env.GITHUB_USER) {
4946
console.error(
5047
'In order to use facts-tracker, you need to configure a ' +
5148
'few environment variables in order to be able to commit to the ' +
@@ -60,8 +57,6 @@ if (isInsideOfTravis) {
6057
'In a different tab, go to https://travis-ci.org/' +
6158
process.env.TRAVIS_REPO_SLUG + '/settings\n' +
6259
' - Make sure "Build only if .travis.yml is present" is ON\n' +
63-
' - Fill "Name" with "GITHUB_TOKEN" and "Value" with the token you ' +
64-
'just generated. Press "Add"\n' +
6560
' - Fill "Name" with "GITHUB_USER" and "Value" with the name of the ' +
6661
'account you generated the token with. Press "Add"\n' +
6762
'\n' +
@@ -71,10 +66,6 @@ if (isInsideOfTravis) {
7166
process.exit(1);
7267
}
7368

74-
exec(
75-
'echo "machine github.com login $GITHUB_USER password $GITHUB_TOKEN"' +
76-
'> ~/.netrc'
77-
);
7869
exec(
7970
'git config --global user.name ' +
8071
escape(process.env.GITHUB_USER_NAME || 'facts-tracker')
@@ -102,7 +93,7 @@ function getRepoSlug() {
10293
return match[1];
10394
}
10495
}
105-
96+
10697
console.error('Cannot find repository slug, sorry.');
10798
process.exit(1);
10899
}
@@ -118,7 +109,7 @@ function checkoutFactsFolder() {
118109
if (!fs.existsSync(factsFolder)) {
119110
var escapedRepoURL;
120111
if (isInsideOfTravis) {
121-
escapedRepoURL = 'https://$GITHUB_TOKEN@github.com/' + escape(repoSlug) + '.git';
112+
escapedRepoURL = 'https://$GITHUB_USER@github.com/' + escape(repoSlug) + '.git';
122113
} else {
123114
escapedRepoURL = escape('[email protected]:' + repoSlug + '.git');
124115
}

0 commit comments

Comments
 (0)