File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -62,12 +62,17 @@ describe('run', () => {
62
62
const mockInput = {
63
63
'repo-token' : 'foo' ,
64
64
'configuration-path' : 'bar' ,
65
- 'sync-labels' : true
65
+ 'sync-labels' : ' true'
66
66
} ;
67
67
68
68
jest
69
69
. spyOn ( core , 'getInput' )
70
70
. mockImplementation ( ( name : string , ...opts ) => mockInput [ name ] ) ;
71
+ jest
72
+ . spyOn ( core , 'getBooleanInput' )
73
+ . mockImplementation (
74
+ ( name : string , ...opts ) => mockInput [ name ] === 'true'
75
+ ) ;
71
76
72
77
usingLabelerConfigYaml ( 'only_pdfs.yml' ) ;
73
78
mockGitHubResponseChangedFiles ( 'foo.txt' ) ;
@@ -93,12 +98,17 @@ describe('run', () => {
93
98
const mockInput = {
94
99
'repo-token' : 'foo' ,
95
100
'configuration-path' : 'bar' ,
96
- 'sync-labels' : false
101
+ 'sync-labels' : ' false'
97
102
} ;
98
103
99
104
jest
100
105
. spyOn ( core , 'getInput' )
101
106
. mockImplementation ( ( name : string , ...opts ) => mockInput [ name ] ) ;
107
+ jest
108
+ . spyOn ( core , 'getBooleanInput' )
109
+ . mockImplementation (
110
+ ( name : string , ...opts ) => mockInput [ name ] === 'true'
111
+ ) ;
102
112
103
113
usingLabelerConfigYaml ( 'only_pdfs.yml' ) ;
104
114
mockGitHubResponseChangedFiles ( 'foo.txt' ) ;
Original file line number Diff line number Diff line change @@ -288,7 +288,7 @@ function run() {
288
288
try {
289
289
const token = core.getInput('repo-token');
290
290
const configPath = core.getInput('configuration-path', { required: true });
291
- const syncLabels = !! core.getInput ('sync-labels', { required: false } );
291
+ const syncLabels = core.getBooleanInput ('sync-labels');
292
292
const prNumber = getPrNumber();
293
293
if (!prNumber) {
294
294
core.info('Could not get pull request number from context, exiting');
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ export async function run() {
31
31
try {
32
32
const token = core . getInput ( 'repo-token' ) ;
33
33
const configPath = core . getInput ( 'configuration-path' , { required : true } ) ;
34
- const syncLabels = ! ! core . getInput ( 'sync-labels' , { required : false } ) ;
34
+ const syncLabels = core . getBooleanInput ( 'sync-labels' ) ;
35
35
36
36
const prNumber = getPrNumber ( ) ;
37
37
if ( ! prNumber ) {
You can’t perform that action at this time.
0 commit comments