File tree Expand file tree Collapse file tree 3 files changed +4
-14
lines changed Expand file tree Collapse file tree 3 files changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -51,17 +51,12 @@ describe('run', () => {
51
51
const mockInput = {
52
52
'repo-token' : 'foo' ,
53
53
'configuration-path' : 'bar' ,
54
- 'sync-labels' : ' true'
54
+ 'sync-labels' : true
55
55
} ;
56
56
57
57
jest
58
58
. spyOn ( core , 'getInput' )
59
59
. mockImplementation ( ( name : string , ...opts ) => mockInput [ name ] ) ;
60
- jest
61
- . spyOn ( core , 'getBooleanInput' )
62
- . mockImplementation (
63
- ( name : string , ...opts ) => mockInput [ name ] === 'true'
64
- ) ;
65
60
66
61
usingLabelerConfigYaml ( 'only_pdfs.yml' ) ;
67
62
mockGitHubResponseChangedFiles ( 'foo.txt' ) ;
@@ -87,17 +82,12 @@ describe('run', () => {
87
82
const mockInput = {
88
83
'repo-token' : 'foo' ,
89
84
'configuration-path' : 'bar' ,
90
- 'sync-labels' : ' false'
85
+ 'sync-labels' : false
91
86
} ;
92
87
93
88
jest
94
89
. spyOn ( core , 'getInput' )
95
90
. mockImplementation ( ( name : string , ...opts ) => mockInput [ name ] ) ;
96
- jest
97
- . spyOn ( core , 'getBooleanInput' )
98
- . mockImplementation (
99
- ( name : string , ...opts ) => mockInput [ name ] === 'true'
100
- ) ;
101
91
102
92
usingLabelerConfigYaml ( 'only_pdfs.yml' ) ;
103
93
mockGitHubResponseChangedFiles ( 'foo.txt' ) ;
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ function run() {
49
49
try {
50
50
const token = core.getInput('repo-token');
51
51
const configPath = core.getInput('configuration-path', { required: true });
52
- const syncLabels = core.getBooleanInput ('sync-labels');
52
+ const syncLabels = !! core.getInput ('sync-labels', { required: false } );
53
53
const prNumber = getPrNumber();
54
54
if (!prNumber) {
55
55
core.info('Could not get pull request number from context, exiting');
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ export async function run() {
15
15
try {
16
16
const token = core . getInput ( 'repo-token' ) ;
17
17
const configPath = core . getInput ( 'configuration-path' , { required : true } ) ;
18
- const syncLabels = core . getBooleanInput ( 'sync-labels' ) ;
18
+ const syncLabels = ! ! core . getInput ( 'sync-labels' , { required : false } ) ;
19
19
20
20
const prNumber = getPrNumber ( ) ;
21
21
if ( ! prNumber ) {
You can’t perform that action at this time.
0 commit comments