@@ -40,7 +40,7 @@ test.serial('github - repo without description and license', async t => {
40
40
const gotStub = sandbox . stub ( github . got , 'get' ) ;
41
41
42
42
execaStub
43
- . withArgs ( 'git' , [ 'config ' , '--get ' , 'remote. origin.url ' ] )
43
+ . withArgs ( 'git' , [ 'remote ' , 'get-url' , '--push ', 'origin' ] )
44
44
. returns ( 'git@github.com:sindresorhus/awesome-lint-test.git' ) ;
45
45
46
46
gotStub
@@ -70,7 +70,7 @@ test.serial('github - missing topic awesome-list', async t => {
70
70
const gotStub = sandbox . stub ( github . got , 'get' ) ;
71
71
72
72
execaStub
73
- . withArgs ( 'git' , [ 'config ' , '--get ' , 'remote. origin.url ' ] )
73
+ . withArgs ( 'git' , [ 'remote ' , 'get-url' , '--push ', 'origin' ] )
74
74
. returns ( 'git@github.com:sindresorhus/awesome-lint-test.git' ) ;
75
75
76
76
gotStub
@@ -99,7 +99,7 @@ test.serial('github - missing topic awesome', async t => {
99
99
const gotStub = sandbox . stub ( github . got , 'get' ) ;
100
100
101
101
execaStub
102
- . withArgs ( 'git' , [ 'config ' , '--get ' , 'remote. origin.url ' ] )
102
+ . withArgs ( 'git' , [ 'remote ' , 'get-url' , '--push ', 'origin' ] )
103
103
. returns ( 'git@github.com:sindresorhus/awesome-lint-test.git' ) ;
104
104
105
105
gotStub
@@ -127,7 +127,7 @@ test.serial('github - remote origin is an GitLab repo', async t => {
127
127
const execaStub = sandbox . stub ( github . execa , 'stdout' ) ;
128
128
129
129
execaStub
130
- . withArgs ( 'git' , [ 'config ' , '--get ' , 'remote. origin.url ' ] )
130
+ . withArgs ( 'git' , [ 'remote ' , 'get-url' , '--push ', 'origin' ] )
131
131
. returns ( 'https://gitlab.com/sindresorhus/awesome-lint-test.git' ) ;
132
132
133
133
const messages = await lint ( { config, filename : 'test/fixtures/github/0.md' } ) ;
@@ -144,7 +144,7 @@ test.serial('github - invalid token', async t => {
144
144
const gotStub = sandbox . stub ( github . got , 'get' ) ;
145
145
146
146
execaStub
147
- . withArgs ( 'git' , [ 'config ' , '--get ' , 'remote. origin.url ' ] )
147
+ . withArgs ( 'git' , [ 'remote ' , 'get-url' , '--push ', 'origin' ] )
148
148
. returns ( 'git@github.com:sindresorhus/awesome-lint-test.git' ) ;
149
149
150
150
gotStub
@@ -169,7 +169,7 @@ test.serial('github - API rate limit exceeded with token', async t => {
169
169
process . env . github_token = 'abcd' ;
170
170
171
171
execaStub
172
- . withArgs ( 'git' , [ 'config ' , '--get ' , 'remote. origin.url ' ] )
172
+ . withArgs ( 'git' , [ 'remote ' , 'get-url' , '--push ', 'origin' ] )
173
173
. returns ( 'git@github.com:sindresorhus/awesome-lint-test.git' ) ;
174
174
175
175
gotStub
@@ -197,7 +197,7 @@ test.serial('github - API rate limit exceeded without token', async t => {
197
197
const gotStub = sandbox . stub ( github . got , 'get' ) ;
198
198
199
199
execaStub
200
- . withArgs ( 'git' , [ 'config ' , '--get ' , 'remote. origin.url ' ] )
200
+ . withArgs ( 'git' , [ 'remote ' , 'get-url' , '--push ', 'origin' ] )
201
201
. returns ( 'git@github.com:sindresorhus/awesome-lint-test.git' ) ;
202
202
203
203
gotStub
@@ -223,7 +223,7 @@ test.serial('github - API offline', async t => {
223
223
const gotStub = sandbox . stub ( github . got , 'get' ) ;
224
224
225
225
execaStub
226
- . withArgs ( 'git' , [ 'config ' , '--get ' , 'remote. origin.url ' ] )
226
+ . withArgs ( 'git' , [ 'remote ' , 'get-url' , '--push ', 'origin' ] )
227
227
. returns ( 'git@github.com:sindresorhus/awesome-lint-test.git' ) ;
228
228
229
229
gotStub
0 commit comments