mirror of
https://github.com/renovatebot/github-action.git
synced 2025-12-16 08:52:35 +00:00
chore: prepare for prettier v3 (#818)
This commit is contained in:
parent
316f92f1df
commit
bd7200cde8
3 changed files with 10 additions and 9 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
"singleQuote": true,
|
"singleQuote": true,
|
||||||
"trailingComma": "es5"
|
"trailingComma": "all",
|
||||||
|
"plugins": ["prettier-plugin-package"]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
10
src/input.ts
10
src/input.ts
|
|
@ -34,18 +34,18 @@ class Input {
|
||||||
this._environmentVariables = new Map(
|
this._environmentVariables = new Map(
|
||||||
Object.entries(process.env)
|
Object.entries(process.env)
|
||||||
.filter(([key]) => envRegex.test(key))
|
.filter(([key]) => envRegex.test(key))
|
||||||
.filter((pair): pair is [string, string] => pair[1] !== undefined)
|
.filter((pair): pair is [string, string] => pair[1] !== undefined),
|
||||||
);
|
);
|
||||||
|
|
||||||
this.token = this.get(
|
this.token = this.get(
|
||||||
this.options.token.input,
|
this.options.token.input,
|
||||||
this.options.token.env,
|
this.options.token.env,
|
||||||
this.options.token.optional
|
this.options.token.optional,
|
||||||
);
|
);
|
||||||
this._configurationFile = this.get(
|
this._configurationFile = this.get(
|
||||||
this.options.configurationFile.input,
|
this.options.configurationFile.input,
|
||||||
this.options.configurationFile.env,
|
this.options.configurationFile.env,
|
||||||
this.options.configurationFile.optional
|
this.options.configurationFile.optional,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -107,7 +107,7 @@ class Input {
|
||||||
private get(
|
private get(
|
||||||
input: string,
|
input: string,
|
||||||
env: string,
|
env: string,
|
||||||
optional: boolean
|
optional: boolean,
|
||||||
): EnvironmentVariable {
|
): EnvironmentVariable {
|
||||||
const fromInput = core.getInput(input);
|
const fromInput = core.getInput(input);
|
||||||
const fromEnv = this._environmentVariables.get(env);
|
const fromEnv = this._environmentVariables.get(env);
|
||||||
|
|
@ -117,7 +117,7 @@ class Input {
|
||||||
[
|
[
|
||||||
`'${input}' MUST be passed using its input or the '${env}'`,
|
`'${input}' MUST be passed using its input or the '${env}'`,
|
||||||
'environment variable',
|
'environment variable',
|
||||||
].join(' ')
|
].join(' '),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,14 +28,14 @@ class Renovate {
|
||||||
const mountPath = path.join(this.configFileMountDir, baseName);
|
const mountPath = path.join(this.configFileMountDir, baseName);
|
||||||
dockerArguments.push(
|
dockerArguments.push(
|
||||||
`--env ${configurationFile.key}=${mountPath}`,
|
`--env ${configurationFile.key}=${mountPath}`,
|
||||||
`--volume ${configurationFile.value}:${mountPath}`
|
`--volume ${configurationFile.value}:${mountPath}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.input.mountDockerSocket()) {
|
if (this.input.mountDockerSocket()) {
|
||||||
dockerArguments.push(
|
dockerArguments.push(
|
||||||
'--volume /var/run/docker.sock:/var/run/docker.sock',
|
'--volume /var/run/docker.sock:/var/run/docker.sock',
|
||||||
`--group-add ${this.getDockerGroupId()}`
|
`--group-add ${this.getDockerGroupId()}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -109,7 +109,7 @@ class Renovate {
|
||||||
!fs.statSync(configurationFile.value).isFile())
|
!fs.statSync(configurationFile.value).isFile())
|
||||||
) {
|
) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`configuration file '${configurationFile.value}' MUST be an existing file`
|
`configuration file '${configurationFile.value}' MUST be an existing file`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue