@@ -21,10 +21,7 @@ function escape(value) {
21
21
22
22
var cwd = null ;
23
23
function exec ( command ) {
24
- console . error ( '>' , command . replace ( process . env . GITHUB_TOKEN , '************' ) ) ;
25
- var options = {
26
- stdio : [ null , null , null ] ,
27
- } ;
24
+ var options = { } ;
28
25
if ( cwd ) {
29
26
options . cwd = cwd ;
30
27
}
@@ -45,7 +42,7 @@ if (isInsideOfTravis) {
45
42
process . exit ( 0 ) ;
46
43
}
47
44
48
- if ( ! process . env . GITHUB_USER || ! process . env . GITHUB_TOKEN ) {
45
+ if ( ! process . env . GITHUB_USER ) {
49
46
console . error (
50
47
'In order to use facts-tracker, you need to configure a ' +
51
48
'few environment variables in order to be able to commit to the ' +
@@ -60,8 +57,6 @@ if (isInsideOfTravis) {
60
57
'In a different tab, go to https://travis-ci.org/' +
61
58
process . env . TRAVIS_REPO_SLUG + '/settings\n' +
62
59
' - 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' +
65
60
' - Fill "Name" with "GITHUB_USER" and "Value" with the name of the ' +
66
61
'account you generated the token with. Press "Add"\n' +
67
62
'\n' +
@@ -71,10 +66,6 @@ if (isInsideOfTravis) {
71
66
process . exit ( 1 ) ;
72
67
}
73
68
74
- exec (
75
- 'echo "machine github.com login $GITHUB_USER password $GITHUB_TOKEN"' +
76
- '> ~/.netrc'
77
- ) ;
78
69
exec (
79
70
'git config --global user.name ' +
80
71
escape ( process . env . GITHUB_USER_NAME || 'facts-tracker' )
@@ -102,7 +93,7 @@ function getRepoSlug() {
102
93
return match [ 1 ] ;
103
94
}
104
95
}
105
-
96
+
106
97
console . error ( 'Cannot find repository slug, sorry.' ) ;
107
98
process . exit ( 1 ) ;
108
99
}
@@ -118,7 +109,7 @@ function checkoutFactsFolder() {
118
109
if ( ! fs . existsSync ( factsFolder ) ) {
119
110
var escapedRepoURL ;
120
111
if ( isInsideOfTravis ) {
121
- escapedRepoURL = 'https://$GITHUB_TOKEN @github.com/' + escape ( repoSlug ) + '.git' ;
112
+ escapedRepoURL = 'https://$GITHUB_USER @github.com/' + escape ( repoSlug ) + '.git' ;
122
113
} else {
123
114
escapedRepoURL = escape ( '[email protected] :' + repoSlug + '.git' ) ;
124
115
}
0 commit comments