Merge remote-tracking branch 'u/main' into dot-option

This commit is contained in:
Alexander Kachkaev committed 2023-03-27 09:39:25 +01:00
commit b898cc8e29
8 files changed
+1769 -1150

No files matched your search

+24 -6
View File
@@ -91,11 +91,20 @@ describe('run', () => {
});
it('(with sync-labels: true) it deletes preexisting PR labels that no longer match the glob pattern', async () => {
configureInput({
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');
@@ -118,11 +127,20 @@ describe('run', () => {
});
it('(with sync-labels: false) it issues no delete calls even when there are preexisting PR labels that no longer match the glob pattern', async () => {
configureInput({
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');