mirror of
https://github.com/docker/metadata-action.git
synced 2026-01-10 22:43:08 +08:00
fix lint issues
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
parent
c98baa7757
commit
9c747a7ed1
@ -2770,7 +2770,6 @@ describe('pr', () => {
|
|||||||
|
|
||||||
describe('pr-head-sha', () => {
|
describe('pr-head-sha', () => {
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
// eslint-disable-next-line jest/expect-expect
|
|
||||||
test.each([
|
test.each([
|
||||||
[
|
[
|
||||||
'pr01',
|
'pr01',
|
||||||
@ -3911,7 +3910,6 @@ describe('raw', () => {
|
|||||||
|
|
||||||
describe('json', () => {
|
describe('json', () => {
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
// eslint-disable-next-line jest/expect-expect
|
|
||||||
test.each([
|
test.each([
|
||||||
[
|
[
|
||||||
'json01',
|
'json01',
|
||||||
@ -4275,7 +4273,6 @@ describe('json', () => {
|
|||||||
|
|
||||||
describe('bakeFile', () => {
|
describe('bakeFile', () => {
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
// eslint-disable-next-line jest/expect-expect
|
|
||||||
test.each([
|
test.each([
|
||||||
[
|
[
|
||||||
'bakeFile01',
|
'bakeFile01',
|
||||||
@ -4797,7 +4794,6 @@ describe('bakeFile', () => {
|
|||||||
|
|
||||||
describe('bakeFileTagsLabels', () => {
|
describe('bakeFileTagsLabels', () => {
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
// eslint-disable-next-line jest/expect-expect
|
|
||||||
test.each([
|
test.each([
|
||||||
[
|
[
|
||||||
'bakeFileTagsLabels01',
|
'bakeFileTagsLabels01',
|
||||||
@ -4855,7 +4851,6 @@ describe('bakeFileTagsLabels', () => {
|
|||||||
|
|
||||||
describe('sepTags', () => {
|
describe('sepTags', () => {
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
// eslint-disable-next-line jest/expect-expect
|
|
||||||
test.each([
|
test.each([
|
||||||
[
|
[
|
||||||
'sepTags01',
|
'sepTags01',
|
||||||
@ -4888,13 +4883,10 @@ describe('sepTags', () => {
|
|||||||
"user/app:dev,user/app:my,user/app:custom,user/app:tags"
|
"user/app:dev,user/app:my,user/app:custom,user/app:tags"
|
||||||
]
|
]
|
||||||
])('given %p with %p event', async (name: string, envFile: string, inputs: Inputs, expTags: string) => {
|
])('given %p with %p event', async (name: string, envFile: string, inputs: Inputs, expTags: string) => {
|
||||||
|
|
||||||
process.env = dotenv.parse(fs.readFileSync(path.join(__dirname, 'fixtures', envFile)));
|
process.env = dotenv.parse(fs.readFileSync(path.join(__dirname, 'fixtures', envFile)));
|
||||||
|
|
||||||
const toolkit = new Toolkit();
|
const toolkit = new Toolkit();
|
||||||
|
|
||||||
const repo = await toolkit.github.repoData();
|
const repo = await toolkit.github.repoData();
|
||||||
|
|
||||||
const meta = new Meta({...getInputs(), ...inputs}, await getContext(ContextSource.workflow, toolkit), repo);
|
const meta = new Meta({...getInputs(), ...inputs}, await getContext(ContextSource.workflow, toolkit), repo);
|
||||||
|
|
||||||
expect(meta.getTags().join(inputs.sepTags)).toEqual(expTags);
|
expect(meta.getTags().join(inputs.sepTags)).toEqual(expTags);
|
||||||
|
|||||||
@ -376,7 +376,7 @@ export class Meta {
|
|||||||
if (hp.body.length == 1 && hp.body[0].type == 'MustacheStatement') {
|
if (hp.body.length == 1 && hp.body[0].type == 'MustacheStatement') {
|
||||||
return hp.body[0]['path']['parts'].length == 1 && hp.body[0]['path']['parts'][0] == 'raw';
|
return hp.body[0]['path']['parts'].length == 1 && hp.body[0]['path']['parts'][0] == 'raw';
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user