mirror of
https://github.com/actions/labeler.git
synced 2025-12-10 11:41:56 +00:00
Revert "fix: correct reading of sync-labels input. (#480)"
This reverts commit 751921c443.
This commit is contained in:
@@ -51,17 +51,12 @@ describe('run', () => {
|
||||
const mockInput = {
|
||||
'repo-token': 'foo',
|
||||
'configuration-path': 'bar',
|
||||
'sync-labels': 'true'
|
||||
'sync-labels': true
|
||||
};
|
||||
|
||||
jest
|
||||
.spyOn(core, 'getInput')
|
||||
.mockImplementation((name: string, ...opts) => mockInput[name]);
|
||||
jest
|
||||
.spyOn(core, 'getBooleanInput')
|
||||
.mockImplementation(
|
||||
(name: string, ...opts) => mockInput[name] === 'true'
|
||||
);
|
||||
|
||||
usingLabelerConfigYaml('only_pdfs.yml');
|
||||
mockGitHubResponseChangedFiles('foo.txt');
|
||||
@@ -87,17 +82,12 @@ describe('run', () => {
|
||||
const mockInput = {
|
||||
'repo-token': 'foo',
|
||||
'configuration-path': 'bar',
|
||||
'sync-labels': 'false'
|
||||
'sync-labels': false
|
||||
};
|
||||
|
||||
jest
|
||||
.spyOn(core, 'getInput')
|
||||
.mockImplementation((name: string, ...opts) => mockInput[name]);
|
||||
jest
|
||||
.spyOn(core, 'getBooleanInput')
|
||||
.mockImplementation(
|
||||
(name: string, ...opts) => mockInput[name] === 'true'
|
||||
);
|
||||
|
||||
usingLabelerConfigYaml('only_pdfs.yml');
|
||||
mockGitHubResponseChangedFiles('foo.txt');
|
||||
|
||||
2
dist/index.js
vendored
2
dist/index.js
vendored
@@ -49,7 +49,7 @@ function run() {
|
||||
try {
|
||||
const token = core.getInput('repo-token');
|
||||
const configPath = core.getInput('configuration-path', { required: true });
|
||||
const syncLabels = core.getBooleanInput('sync-labels');
|
||||
const syncLabels = !!core.getInput('sync-labels', { required: false });
|
||||
const prNumber = getPrNumber();
|
||||
if (!prNumber) {
|
||||
core.info('Could not get pull request number from context, exiting');
|
||||
|
||||
@@ -15,7 +15,7 @@ export async function run() {
|
||||
try {
|
||||
const token = core.getInput('repo-token');
|
||||
const configPath = core.getInput('configuration-path', {required: true});
|
||||
const syncLabels = core.getBooleanInput('sync-labels');
|
||||
const syncLabels = !!core.getInput('sync-labels', {required: false});
|
||||
|
||||
const prNumber = getPrNumber();
|
||||
if (!prNumber) {
|
||||
|
||||
Reference in New Issue
Block a user