Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
a4f60bb28d | |||
5815a4b917 | |||
23faadfdeb | |||
b556f25b3c | |||
789f114c52 | |||
d36b91c294 | |||
a9eb115348 | |||
bd4fa7c900 |
38
README.md
38
README.md
@ -8,8 +8,11 @@ The action runs [golangci-lint](https://github.com/golangci/golangci-lint) and r
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Compatibility
|
## Compatibility
|
||||||
|
|
||||||
|
* `v6.0.0+` removes `annotations` option, removes the default output format (`github-actions`).
|
||||||
* `v5.0.0+` removes `skip-pkg-cache` and `skip-build-cache` because the cache related to Go itself is already handled by `actions/setup-go`.
|
* `v5.0.0+` removes `skip-pkg-cache` and `skip-build-cache` because the cache related to Go itself is already handled by `actions/setup-go`.
|
||||||
* `v4.0.0+` requires an explicit `actions/setup-go` installation step before using this action: `uses: actions/setup-go@v5`.
|
* `v4.0.0+` requires an explicit `actions/setup-go` installation step before using this action: `uses: actions/setup-go@v5`.
|
||||||
The `skip-go-installation` option has been removed.
|
The `skip-go-installation` option has been removed.
|
||||||
@ -45,7 +48,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
go-version: '1.22'
|
go-version: '1.22'
|
||||||
- name: golangci-lint
|
- name: golangci-lint
|
||||||
uses: golangci/golangci-lint-action@v5
|
uses: golangci/golangci-lint-action@v6
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: latest
|
||||||
```
|
```
|
||||||
@ -87,7 +90,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go }}
|
go-version: ${{ matrix.go }}
|
||||||
- name: golangci-lint
|
- name: golangci-lint
|
||||||
uses: golangci/golangci-lint-action@v5
|
uses: golangci/golangci-lint-action@v6
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: latest
|
||||||
```
|
```
|
||||||
@ -110,7 +113,7 @@ The version of golangci-lint to use.
|
|||||||
* When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
|
* When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
uses: golangci/golangci-lint-action@v5
|
uses: golangci/golangci-lint-action@v6
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: latest
|
||||||
# ...
|
# ...
|
||||||
@ -125,7 +128,7 @@ The mode to install golangci-lint: it can be `binary` or `goinstall`.
|
|||||||
The default value is `binary`.
|
The default value is `binary`.
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
uses: golangci/golangci-lint-action@v5
|
uses: golangci/golangci-lint-action@v6
|
||||||
with:
|
with:
|
||||||
install-mode: "goinstall"
|
install-mode: "goinstall"
|
||||||
# ...
|
# ...
|
||||||
@ -140,7 +143,7 @@ Show only new issues.
|
|||||||
The default value is `false`.
|
The default value is `false`.
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
uses: golangci/golangci-lint-action@v5
|
uses: golangci/golangci-lint-action@v6
|
||||||
with:
|
with:
|
||||||
only-new-issues: true
|
only-new-issues: true
|
||||||
# ...
|
# ...
|
||||||
@ -158,7 +161,7 @@ with:
|
|||||||
Working directory, useful for monorepos.
|
Working directory, useful for monorepos.
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
uses: golangci/golangci-lint-action@v5
|
uses: golangci/golangci-lint-action@v6
|
||||||
with:
|
with:
|
||||||
working-directory: somedir
|
working-directory: somedir
|
||||||
# ...
|
# ...
|
||||||
@ -174,7 +177,7 @@ takes precedence over all other caching options.
|
|||||||
The default value is `false`.
|
The default value is `false`.
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
uses: golangci/golangci-lint-action@v5
|
uses: golangci/golangci-lint-action@v6
|
||||||
with:
|
with:
|
||||||
skip-cache: true
|
skip-cache: true
|
||||||
# ...
|
# ...
|
||||||
@ -189,7 +192,7 @@ If set to `true`, caches will not be saved, but they may still be restored, requ
|
|||||||
The default value is `false`.
|
The default value is `false`.
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
uses: golangci/golangci-lint-action@v5
|
uses: golangci/golangci-lint-action@v6
|
||||||
with:
|
with:
|
||||||
skip-save-cache: true
|
skip-save-cache: true
|
||||||
# ...
|
# ...
|
||||||
@ -204,7 +207,7 @@ Periodically invalidate the cache every `cache-invalidation-interval` days to en
|
|||||||
The default value is `7`.
|
The default value is `7`.
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
uses: golangci/golangci-lint-action@v5
|
uses: golangci/golangci-lint-action@v6
|
||||||
with:
|
with:
|
||||||
cache-invalidation-interval: 15
|
cache-invalidation-interval: 15
|
||||||
# ...
|
# ...
|
||||||
@ -212,23 +215,24 @@ with:
|
|||||||
|
|
||||||
If set the number is `<= 0`, the cache will be always invalidate (Not recommended).
|
If set the number is `<= 0`, the cache will be always invalidate (Not recommended).
|
||||||
|
|
||||||
### `annotations`
|
### `problem-matchers`
|
||||||
|
|
||||||
(optional)
|
(optional)
|
||||||
|
|
||||||
To enable/disable GitHub Action annotations.
|
Force the usage of the embedded problem matchers.
|
||||||
|
|
||||||
If disabled (`false`), the output format(s) will follow the golangci-lint configuration file (or CLI flags from `args`)
|
By default, the [problem matcher of Go (`actions/setup-go`)](https://github.com/actions/setup-go/blob/main/matchers.json) already handles the golangci-lint output (`colored-line-number`).
|
||||||
and use the same default as golangci-lint (i.e. `colored-line-number`).
|
|
||||||
|
Works only with `colored-line-number` (the golangci-lint default).
|
||||||
|
|
||||||
https://golangci-lint.run/usage/configuration/#output-configuration
|
https://golangci-lint.run/usage/configuration/#output-configuration
|
||||||
|
|
||||||
The default value is `true`.
|
The default value is `false`.
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
uses: golangci/golangci-lint-action@v5
|
uses: golangci/golangci-lint-action@v6
|
||||||
with:
|
with:
|
||||||
annotations: false
|
problem-matchers: true
|
||||||
# ...
|
# ...
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -242,7 +246,7 @@ Note: By default, the `.golangci.yml` file should be at the root of the reposito
|
|||||||
The location of the configuration file can be changed by using `--config=`
|
The location of the configuration file can be changed by using `--config=`
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
uses: golangci/golangci-lint-action@v5
|
uses: golangci/golangci-lint-action@v6
|
||||||
with:
|
with:
|
||||||
args: --timeout=30m --config=/my/path/.golangci.yml --issues-exit-code=0
|
args: --timeout=30m --config=/my/path/.golangci.yml --issues-exit-code=0
|
||||||
# ...
|
# ...
|
||||||
|
@ -36,9 +36,9 @@ inputs:
|
|||||||
restore existing caches, subject to other options.
|
restore existing caches, subject to other options.
|
||||||
default: 'false'
|
default: 'false'
|
||||||
required: false
|
required: false
|
||||||
annotations:
|
problem-matchers:
|
||||||
description: "To Enable/disable GitHub Action annotations"
|
description: "Force the usage of the embedded problem matchers"
|
||||||
default: 'true'
|
default: 'false'
|
||||||
required: false
|
required: false
|
||||||
args:
|
args:
|
||||||
description: "golangci-lint command line arguments"
|
description: "golangci-lint command line arguments"
|
||||||
|
33
dist/post_run/index.js
generated
vendored
33
dist/post_run/index.js
generated
vendored
@ -89228,7 +89228,7 @@ async function fetchPushPatch(ctx) {
|
|||||||
const patchResp = await octokit.rest.repos.compareCommitsWithBasehead({
|
const patchResp = await octokit.rest.repos.compareCommitsWithBasehead({
|
||||||
owner: ctx.repo.owner,
|
owner: ctx.repo.owner,
|
||||||
repo: ctx.repo.repo,
|
repo: ctx.repo.repo,
|
||||||
basehead: `${ctx.payload.before}..${ctx.payload.after}`,
|
basehead: `${ctx.payload.before}...${ctx.payload.after}`,
|
||||||
mediaType: {
|
mediaType: {
|
||||||
format: `diff`,
|
format: `diff`,
|
||||||
},
|
},
|
||||||
@ -89290,18 +89290,27 @@ async function runLint(lintPath, patchPath) {
|
|||||||
.map(([key, value]) => [key.toLowerCase(), value ?? ""]);
|
.map(([key, value]) => [key.toLowerCase(), value ?? ""]);
|
||||||
const userArgsMap = new Map(userArgsList);
|
const userArgsMap = new Map(userArgsList);
|
||||||
const userArgNames = new Set(userArgsList.map(([key]) => key));
|
const userArgNames = new Set(userArgsList.map(([key]) => key));
|
||||||
const annotations = core.getBooleanInput(`annotations`);
|
const problemMatchers = core.getBooleanInput(`problem-matchers`);
|
||||||
if (annotations) {
|
if (problemMatchers) {
|
||||||
const formats = (userArgsMap.get("out-format") || "")
|
const matchersPath = path.join(__dirname, "../..", "problem-matchers.json");
|
||||||
.trim()
|
if (fs.existsSync(matchersPath)) {
|
||||||
.split(",")
|
// Adds problem matchers.
|
||||||
.filter((f) => f.length > 0)
|
// https://github.com/actions/setup-go/blob/cdcb36043654635271a94b9a6d1392de5bb323a7/src/main.ts#L81-L83
|
||||||
.filter((f) => !f.startsWith(`github-actions`))
|
core.info(`##[add-matcher]${matchersPath}`);
|
||||||
.concat("github-actions")
|
}
|
||||||
.join(",");
|
|
||||||
addedArgs.push(`--out-format=${formats}`);
|
|
||||||
userArgs = userArgs.replace(/--out-format=\S*/gi, "").trim();
|
|
||||||
}
|
}
|
||||||
|
const formats = (userArgsMap.get("out-format") || "")
|
||||||
|
.trim()
|
||||||
|
.split(",")
|
||||||
|
.filter((f) => f.length > 0)
|
||||||
|
.filter((f) => !f.startsWith(`github-actions`)) // Removes `github-actions` format.
|
||||||
|
.join(",");
|
||||||
|
if (formats) {
|
||||||
|
// Adds formats but without `github-actions` format.
|
||||||
|
addedArgs.push(`--out-format=${formats}`);
|
||||||
|
}
|
||||||
|
// Removes `--out-format` from the user flags because it's already inside `addedArgs`.
|
||||||
|
userArgs = userArgs.replace(/--out-format=\S*/gi, "").trim();
|
||||||
if (isOnlyNewIssues()) {
|
if (isOnlyNewIssues()) {
|
||||||
if (userArgNames.has(`new`) || userArgNames.has(`new-from-rev`) || userArgNames.has(`new-from-patch`)) {
|
if (userArgNames.has(`new`) || userArgNames.has(`new-from-rev`) || userArgNames.has(`new-from-patch`)) {
|
||||||
throw new Error(`please, don't specify manually --new* args when requesting only new issues`);
|
throw new Error(`please, don't specify manually --new* args when requesting only new issues`);
|
||||||
|
33
dist/run/index.js
generated
vendored
33
dist/run/index.js
generated
vendored
@ -89228,7 +89228,7 @@ async function fetchPushPatch(ctx) {
|
|||||||
const patchResp = await octokit.rest.repos.compareCommitsWithBasehead({
|
const patchResp = await octokit.rest.repos.compareCommitsWithBasehead({
|
||||||
owner: ctx.repo.owner,
|
owner: ctx.repo.owner,
|
||||||
repo: ctx.repo.repo,
|
repo: ctx.repo.repo,
|
||||||
basehead: `${ctx.payload.before}..${ctx.payload.after}`,
|
basehead: `${ctx.payload.before}...${ctx.payload.after}`,
|
||||||
mediaType: {
|
mediaType: {
|
||||||
format: `diff`,
|
format: `diff`,
|
||||||
},
|
},
|
||||||
@ -89290,18 +89290,27 @@ async function runLint(lintPath, patchPath) {
|
|||||||
.map(([key, value]) => [key.toLowerCase(), value ?? ""]);
|
.map(([key, value]) => [key.toLowerCase(), value ?? ""]);
|
||||||
const userArgsMap = new Map(userArgsList);
|
const userArgsMap = new Map(userArgsList);
|
||||||
const userArgNames = new Set(userArgsList.map(([key]) => key));
|
const userArgNames = new Set(userArgsList.map(([key]) => key));
|
||||||
const annotations = core.getBooleanInput(`annotations`);
|
const problemMatchers = core.getBooleanInput(`problem-matchers`);
|
||||||
if (annotations) {
|
if (problemMatchers) {
|
||||||
const formats = (userArgsMap.get("out-format") || "")
|
const matchersPath = path.join(__dirname, "../..", "problem-matchers.json");
|
||||||
.trim()
|
if (fs.existsSync(matchersPath)) {
|
||||||
.split(",")
|
// Adds problem matchers.
|
||||||
.filter((f) => f.length > 0)
|
// https://github.com/actions/setup-go/blob/cdcb36043654635271a94b9a6d1392de5bb323a7/src/main.ts#L81-L83
|
||||||
.filter((f) => !f.startsWith(`github-actions`))
|
core.info(`##[add-matcher]${matchersPath}`);
|
||||||
.concat("github-actions")
|
}
|
||||||
.join(",");
|
|
||||||
addedArgs.push(`--out-format=${formats}`);
|
|
||||||
userArgs = userArgs.replace(/--out-format=\S*/gi, "").trim();
|
|
||||||
}
|
}
|
||||||
|
const formats = (userArgsMap.get("out-format") || "")
|
||||||
|
.trim()
|
||||||
|
.split(",")
|
||||||
|
.filter((f) => f.length > 0)
|
||||||
|
.filter((f) => !f.startsWith(`github-actions`)) // Removes `github-actions` format.
|
||||||
|
.join(",");
|
||||||
|
if (formats) {
|
||||||
|
// Adds formats but without `github-actions` format.
|
||||||
|
addedArgs.push(`--out-format=${formats}`);
|
||||||
|
}
|
||||||
|
// Removes `--out-format` from the user flags because it's already inside `addedArgs`.
|
||||||
|
userArgs = userArgs.replace(/--out-format=\S*/gi, "").trim();
|
||||||
if (isOnlyNewIssues()) {
|
if (isOnlyNewIssues()) {
|
||||||
if (userArgNames.has(`new`) || userArgNames.has(`new-from-rev`) || userArgNames.has(`new-from-patch`)) {
|
if (userArgNames.has(`new`) || userArgNames.has(`new-from-rev`) || userArgNames.has(`new-from-patch`)) {
|
||||||
throw new Error(`please, don't specify manually --new* args when requesting only new issues`);
|
throw new Error(`please, don't specify manually --new* args when requesting only new issues`);
|
||||||
|
186
package-lock.json
generated
186
package-lock.json
generated
@ -15,14 +15,14 @@
|
|||||||
"@actions/github": "^6.0.0",
|
"@actions/github": "^6.0.0",
|
||||||
"@actions/http-client": "^2.2.1",
|
"@actions/http-client": "^2.2.1",
|
||||||
"@actions/tool-cache": "^2.0.1",
|
"@actions/tool-cache": "^2.0.1",
|
||||||
"@types/node": "^20.12.7",
|
"@types/node": "^20.12.8",
|
||||||
"@types/semver": "^7.5.8",
|
"@types/semver": "^7.5.8",
|
||||||
"@types/tmp": "^0.2.6",
|
"@types/tmp": "^0.2.6",
|
||||||
"tmp": "^0.2.3"
|
"tmp": "^0.2.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@typescript-eslint/eslint-plugin": "^7.7.1",
|
"@typescript-eslint/eslint-plugin": "^7.8.0",
|
||||||
"@typescript-eslint/parser": "^7.7.1",
|
"@typescript-eslint/parser": "^7.8.0",
|
||||||
"@vercel/ncc": "^0.38.1",
|
"@vercel/ncc": "^0.38.1",
|
||||||
"eslint": "^8.57.0",
|
"eslint": "^8.57.0",
|
||||||
"eslint-config-prettier": "^9.1.0",
|
"eslint-config-prettier": "^9.1.0",
|
||||||
@ -643,9 +643,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "20.12.7",
|
"version": "20.12.8",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.7.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.8.tgz",
|
||||||
"integrity": "sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==",
|
"integrity": "sha512-NU0rJLJnshZWdE/097cdCBbyW1h4hEg0xpovcoAQYHl8dnEyp/NAOiE45pvc+Bd1Dt+2r94v2eGFpQJ4R7g+2w==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"undici-types": "~5.26.4"
|
"undici-types": "~5.26.4"
|
||||||
}
|
}
|
||||||
@ -691,16 +691,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||||
"version": "7.7.1",
|
"version": "7.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.8.0.tgz",
|
||||||
"integrity": "sha512-KwfdWXJBOviaBVhxO3p5TJiLpNuh2iyXyjmWN0f1nU87pwyvfS0EmjC6ukQVYVFJd/K1+0NWGPDXiyEyQorn0Q==",
|
"integrity": "sha512-gFTT+ezJmkwutUPmB0skOj3GZJtlEGnlssems4AjkVweUPGj7jRwwqg0Hhg7++kPGJqKtTYx+R05Ftww372aIg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/regexpp": "^4.10.0",
|
"@eslint-community/regexpp": "^4.10.0",
|
||||||
"@typescript-eslint/scope-manager": "7.7.1",
|
"@typescript-eslint/scope-manager": "7.8.0",
|
||||||
"@typescript-eslint/type-utils": "7.7.1",
|
"@typescript-eslint/type-utils": "7.8.0",
|
||||||
"@typescript-eslint/utils": "7.7.1",
|
"@typescript-eslint/utils": "7.8.0",
|
||||||
"@typescript-eslint/visitor-keys": "7.7.1",
|
"@typescript-eslint/visitor-keys": "7.8.0",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"graphemer": "^1.4.0",
|
"graphemer": "^1.4.0",
|
||||||
"ignore": "^5.3.1",
|
"ignore": "^5.3.1",
|
||||||
@ -741,15 +741,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/parser": {
|
"node_modules/@typescript-eslint/parser": {
|
||||||
"version": "7.7.1",
|
"version": "7.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.8.0.tgz",
|
||||||
"integrity": "sha512-vmPzBOOtz48F6JAGVS/kZYk4EkXao6iGrD838sp1w3NQQC0W8ry/q641KU4PrG7AKNAf56NOcR8GOpH8l9FPCw==",
|
"integrity": "sha512-KgKQly1pv0l4ltcftP59uQZCi4HUYswCLbTqVZEJu7uLX8CTLyswqMLqLN+2QFz4jCptqWVV4SB7vdxcH2+0kQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/scope-manager": "7.7.1",
|
"@typescript-eslint/scope-manager": "7.8.0",
|
||||||
"@typescript-eslint/types": "7.7.1",
|
"@typescript-eslint/types": "7.8.0",
|
||||||
"@typescript-eslint/typescript-estree": "7.7.1",
|
"@typescript-eslint/typescript-estree": "7.8.0",
|
||||||
"@typescript-eslint/visitor-keys": "7.7.1",
|
"@typescript-eslint/visitor-keys": "7.8.0",
|
||||||
"debug": "^4.3.4"
|
"debug": "^4.3.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@ -769,13 +769,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/scope-manager": {
|
"node_modules/@typescript-eslint/scope-manager": {
|
||||||
"version": "7.7.1",
|
"version": "7.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.8.0.tgz",
|
||||||
"integrity": "sha512-PytBif2SF+9SpEUKynYn5g1RHFddJUcyynGpztX3l/ik7KmZEv19WCMhUBkHXPU9es/VWGD3/zg3wg90+Dh2rA==",
|
"integrity": "sha512-viEmZ1LmwsGcnr85gIq+FCYI7nO90DVbE37/ll51hjv9aG+YZMb4WDE2fyWpUR4O/UrhGRpYXK/XajcGTk2B8g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "7.7.1",
|
"@typescript-eslint/types": "7.8.0",
|
||||||
"@typescript-eslint/visitor-keys": "7.7.1"
|
"@typescript-eslint/visitor-keys": "7.8.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^18.18.0 || >=20.0.0"
|
"node": "^18.18.0 || >=20.0.0"
|
||||||
@ -786,13 +786,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/type-utils": {
|
"node_modules/@typescript-eslint/type-utils": {
|
||||||
"version": "7.7.1",
|
"version": "7.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.8.0.tgz",
|
||||||
"integrity": "sha512-ZksJLW3WF7o75zaBPScdW1Gbkwhd/lyeXGf1kQCxJaOeITscoSl0MjynVvCzuV5boUz/3fOI06Lz8La55mu29Q==",
|
"integrity": "sha512-H70R3AefQDQpz9mGv13Uhi121FNMh+WEaRqcXTX09YEDky21km4dV1ZXJIp8QjXc4ZaVkXVdohvWDzbnbHDS+A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/typescript-estree": "7.7.1",
|
"@typescript-eslint/typescript-estree": "7.8.0",
|
||||||
"@typescript-eslint/utils": "7.7.1",
|
"@typescript-eslint/utils": "7.8.0",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"ts-api-utils": "^1.3.0"
|
"ts-api-utils": "^1.3.0"
|
||||||
},
|
},
|
||||||
@ -813,9 +813,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/types": {
|
"node_modules/@typescript-eslint/types": {
|
||||||
"version": "7.7.1",
|
"version": "7.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.8.0.tgz",
|
||||||
"integrity": "sha512-AmPmnGW1ZLTpWa+/2omPrPfR7BcbUU4oha5VIbSbS1a1Tv966bklvLNXxp3mrbc+P2j4MNOTfDffNsk4o0c6/w==",
|
"integrity": "sha512-wf0peJ+ZGlcH+2ZS23aJbOv+ztjeeP8uQ9GgwMJGVLx/Nj9CJt17GWgWWoSmoRVKAX2X+7fzEnAjxdvK2gqCLw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^18.18.0 || >=20.0.0"
|
"node": "^18.18.0 || >=20.0.0"
|
||||||
@ -826,13 +826,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/typescript-estree": {
|
"node_modules/@typescript-eslint/typescript-estree": {
|
||||||
"version": "7.7.1",
|
"version": "7.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.8.0.tgz",
|
||||||
"integrity": "sha512-CXe0JHCXru8Fa36dteXqmH2YxngKJjkQLjxzoj6LYwzZ7qZvgsLSc+eqItCrqIop8Vl2UKoAi0StVWu97FQZIQ==",
|
"integrity": "sha512-5pfUCOwK5yjPaJQNy44prjCwtr981dO8Qo9J9PwYXZ0MosgAbfEMB008dJ5sNo3+/BN6ytBPuSvXUg9SAqB0dg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "7.7.1",
|
"@typescript-eslint/types": "7.8.0",
|
||||||
"@typescript-eslint/visitor-keys": "7.7.1",
|
"@typescript-eslint/visitor-keys": "7.8.0",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"globby": "^11.1.0",
|
"globby": "^11.1.0",
|
||||||
"is-glob": "^4.0.3",
|
"is-glob": "^4.0.3",
|
||||||
@ -893,17 +893,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/utils": {
|
"node_modules/@typescript-eslint/utils": {
|
||||||
"version": "7.7.1",
|
"version": "7.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.8.0.tgz",
|
||||||
"integrity": "sha512-QUvBxPEaBXf41ZBbaidKICgVL8Hin0p6prQDu6bbetWo39BKbWJxRsErOzMNT1rXvTll+J7ChrbmMCXM9rsvOQ==",
|
"integrity": "sha512-L0yFqOCflVqXxiZyXrDr80lnahQfSOfc9ELAAZ75sqicqp2i36kEZZGuUymHNFoYOqxRT05up760b4iGsl02nQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/eslint-utils": "^4.4.0",
|
"@eslint-community/eslint-utils": "^4.4.0",
|
||||||
"@types/json-schema": "^7.0.15",
|
"@types/json-schema": "^7.0.15",
|
||||||
"@types/semver": "^7.5.8",
|
"@types/semver": "^7.5.8",
|
||||||
"@typescript-eslint/scope-manager": "7.7.1",
|
"@typescript-eslint/scope-manager": "7.8.0",
|
||||||
"@typescript-eslint/types": "7.7.1",
|
"@typescript-eslint/types": "7.8.0",
|
||||||
"@typescript-eslint/typescript-estree": "7.7.1",
|
"@typescript-eslint/typescript-estree": "7.8.0",
|
||||||
"semver": "^7.6.0"
|
"semver": "^7.6.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@ -933,12 +933,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/visitor-keys": {
|
"node_modules/@typescript-eslint/visitor-keys": {
|
||||||
"version": "7.7.1",
|
"version": "7.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.8.0.tgz",
|
||||||
"integrity": "sha512-gBL3Eq25uADw1LQ9kVpf3hRM+DWzs0uZknHYK3hq4jcTPqVCClHGDnB6UUUV2SFeBeA4KWHWbbLqmbGcZ4FYbw==",
|
"integrity": "sha512-q4/gibTNBQNA0lGyYQCmWRS5D15n8rXh4QjK3KV+MBPlTYHpfBUT3D3PaPR/HeNiI9W6R7FvlkcGhNyAoP+caA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "7.7.1",
|
"@typescript-eslint/types": "7.8.0",
|
||||||
"eslint-visitor-keys": "^3.4.3"
|
"eslint-visitor-keys": "^3.4.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@ -4563,9 +4563,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "20.12.7",
|
"version": "20.12.8",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.7.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.8.tgz",
|
||||||
"integrity": "sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==",
|
"integrity": "sha512-NU0rJLJnshZWdE/097cdCBbyW1h4hEg0xpovcoAQYHl8dnEyp/NAOiE45pvc+Bd1Dt+2r94v2eGFpQJ4R7g+2w==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"undici-types": "~5.26.4"
|
"undici-types": "~5.26.4"
|
||||||
}
|
}
|
||||||
@ -4610,16 +4610,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/eslint-plugin": {
|
"@typescript-eslint/eslint-plugin": {
|
||||||
"version": "7.7.1",
|
"version": "7.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.8.0.tgz",
|
||||||
"integrity": "sha512-KwfdWXJBOviaBVhxO3p5TJiLpNuh2iyXyjmWN0f1nU87pwyvfS0EmjC6ukQVYVFJd/K1+0NWGPDXiyEyQorn0Q==",
|
"integrity": "sha512-gFTT+ezJmkwutUPmB0skOj3GZJtlEGnlssems4AjkVweUPGj7jRwwqg0Hhg7++kPGJqKtTYx+R05Ftww372aIg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@eslint-community/regexpp": "^4.10.0",
|
"@eslint-community/regexpp": "^4.10.0",
|
||||||
"@typescript-eslint/scope-manager": "7.7.1",
|
"@typescript-eslint/scope-manager": "7.8.0",
|
||||||
"@typescript-eslint/type-utils": "7.7.1",
|
"@typescript-eslint/type-utils": "7.8.0",
|
||||||
"@typescript-eslint/utils": "7.7.1",
|
"@typescript-eslint/utils": "7.8.0",
|
||||||
"@typescript-eslint/visitor-keys": "7.7.1",
|
"@typescript-eslint/visitor-keys": "7.8.0",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"graphemer": "^1.4.0",
|
"graphemer": "^1.4.0",
|
||||||
"ignore": "^5.3.1",
|
"ignore": "^5.3.1",
|
||||||
@ -4640,54 +4640,54 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/parser": {
|
"@typescript-eslint/parser": {
|
||||||
"version": "7.7.1",
|
"version": "7.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.8.0.tgz",
|
||||||
"integrity": "sha512-vmPzBOOtz48F6JAGVS/kZYk4EkXao6iGrD838sp1w3NQQC0W8ry/q641KU4PrG7AKNAf56NOcR8GOpH8l9FPCw==",
|
"integrity": "sha512-KgKQly1pv0l4ltcftP59uQZCi4HUYswCLbTqVZEJu7uLX8CTLyswqMLqLN+2QFz4jCptqWVV4SB7vdxcH2+0kQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/scope-manager": "7.7.1",
|
"@typescript-eslint/scope-manager": "7.8.0",
|
||||||
"@typescript-eslint/types": "7.7.1",
|
"@typescript-eslint/types": "7.8.0",
|
||||||
"@typescript-eslint/typescript-estree": "7.7.1",
|
"@typescript-eslint/typescript-estree": "7.8.0",
|
||||||
"@typescript-eslint/visitor-keys": "7.7.1",
|
"@typescript-eslint/visitor-keys": "7.8.0",
|
||||||
"debug": "^4.3.4"
|
"debug": "^4.3.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/scope-manager": {
|
"@typescript-eslint/scope-manager": {
|
||||||
"version": "7.7.1",
|
"version": "7.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.8.0.tgz",
|
||||||
"integrity": "sha512-PytBif2SF+9SpEUKynYn5g1RHFddJUcyynGpztX3l/ik7KmZEv19WCMhUBkHXPU9es/VWGD3/zg3wg90+Dh2rA==",
|
"integrity": "sha512-viEmZ1LmwsGcnr85gIq+FCYI7nO90DVbE37/ll51hjv9aG+YZMb4WDE2fyWpUR4O/UrhGRpYXK/XajcGTk2B8g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/types": "7.7.1",
|
"@typescript-eslint/types": "7.8.0",
|
||||||
"@typescript-eslint/visitor-keys": "7.7.1"
|
"@typescript-eslint/visitor-keys": "7.8.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/type-utils": {
|
"@typescript-eslint/type-utils": {
|
||||||
"version": "7.7.1",
|
"version": "7.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.8.0.tgz",
|
||||||
"integrity": "sha512-ZksJLW3WF7o75zaBPScdW1Gbkwhd/lyeXGf1kQCxJaOeITscoSl0MjynVvCzuV5boUz/3fOI06Lz8La55mu29Q==",
|
"integrity": "sha512-H70R3AefQDQpz9mGv13Uhi121FNMh+WEaRqcXTX09YEDky21km4dV1ZXJIp8QjXc4ZaVkXVdohvWDzbnbHDS+A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/typescript-estree": "7.7.1",
|
"@typescript-eslint/typescript-estree": "7.8.0",
|
||||||
"@typescript-eslint/utils": "7.7.1",
|
"@typescript-eslint/utils": "7.8.0",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"ts-api-utils": "^1.3.0"
|
"ts-api-utils": "^1.3.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/types": {
|
"@typescript-eslint/types": {
|
||||||
"version": "7.7.1",
|
"version": "7.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.8.0.tgz",
|
||||||
"integrity": "sha512-AmPmnGW1ZLTpWa+/2omPrPfR7BcbUU4oha5VIbSbS1a1Tv966bklvLNXxp3mrbc+P2j4MNOTfDffNsk4o0c6/w==",
|
"integrity": "sha512-wf0peJ+ZGlcH+2ZS23aJbOv+ztjeeP8uQ9GgwMJGVLx/Nj9CJt17GWgWWoSmoRVKAX2X+7fzEnAjxdvK2gqCLw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@typescript-eslint/typescript-estree": {
|
"@typescript-eslint/typescript-estree": {
|
||||||
"version": "7.7.1",
|
"version": "7.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.8.0.tgz",
|
||||||
"integrity": "sha512-CXe0JHCXru8Fa36dteXqmH2YxngKJjkQLjxzoj6LYwzZ7qZvgsLSc+eqItCrqIop8Vl2UKoAi0StVWu97FQZIQ==",
|
"integrity": "sha512-5pfUCOwK5yjPaJQNy44prjCwtr981dO8Qo9J9PwYXZ0MosgAbfEMB008dJ5sNo3+/BN6ytBPuSvXUg9SAqB0dg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/types": "7.7.1",
|
"@typescript-eslint/types": "7.8.0",
|
||||||
"@typescript-eslint/visitor-keys": "7.7.1",
|
"@typescript-eslint/visitor-keys": "7.8.0",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"globby": "^11.1.0",
|
"globby": "^11.1.0",
|
||||||
"is-glob": "^4.0.3",
|
"is-glob": "^4.0.3",
|
||||||
@ -4726,17 +4726,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/utils": {
|
"@typescript-eslint/utils": {
|
||||||
"version": "7.7.1",
|
"version": "7.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.8.0.tgz",
|
||||||
"integrity": "sha512-QUvBxPEaBXf41ZBbaidKICgVL8Hin0p6prQDu6bbetWo39BKbWJxRsErOzMNT1rXvTll+J7ChrbmMCXM9rsvOQ==",
|
"integrity": "sha512-L0yFqOCflVqXxiZyXrDr80lnahQfSOfc9ELAAZ75sqicqp2i36kEZZGuUymHNFoYOqxRT05up760b4iGsl02nQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@eslint-community/eslint-utils": "^4.4.0",
|
"@eslint-community/eslint-utils": "^4.4.0",
|
||||||
"@types/json-schema": "^7.0.15",
|
"@types/json-schema": "^7.0.15",
|
||||||
"@types/semver": "^7.5.8",
|
"@types/semver": "^7.5.8",
|
||||||
"@typescript-eslint/scope-manager": "7.7.1",
|
"@typescript-eslint/scope-manager": "7.8.0",
|
||||||
"@typescript-eslint/types": "7.7.1",
|
"@typescript-eslint/types": "7.8.0",
|
||||||
"@typescript-eslint/typescript-estree": "7.7.1",
|
"@typescript-eslint/typescript-estree": "7.8.0",
|
||||||
"semver": "^7.6.0"
|
"semver": "^7.6.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -4752,12 +4752,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@typescript-eslint/visitor-keys": {
|
"@typescript-eslint/visitor-keys": {
|
||||||
"version": "7.7.1",
|
"version": "7.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.8.0.tgz",
|
||||||
"integrity": "sha512-gBL3Eq25uADw1LQ9kVpf3hRM+DWzs0uZknHYK3hq4jcTPqVCClHGDnB6UUUV2SFeBeA4KWHWbbLqmbGcZ4FYbw==",
|
"integrity": "sha512-q4/gibTNBQNA0lGyYQCmWRS5D15n8rXh4QjK3KV+MBPlTYHpfBUT3D3PaPR/HeNiI9W6R7FvlkcGhNyAoP+caA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@typescript-eslint/types": "7.7.1",
|
"@typescript-eslint/types": "7.8.0",
|
||||||
"eslint-visitor-keys": "^3.4.3"
|
"eslint-visitor-keys": "^3.4.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -30,14 +30,14 @@
|
|||||||
"@actions/github": "^6.0.0",
|
"@actions/github": "^6.0.0",
|
||||||
"@actions/http-client": "^2.2.1",
|
"@actions/http-client": "^2.2.1",
|
||||||
"@actions/tool-cache": "^2.0.1",
|
"@actions/tool-cache": "^2.0.1",
|
||||||
"@types/node": "^20.12.7",
|
"@types/node": "^20.12.8",
|
||||||
"@types/semver": "^7.5.8",
|
"@types/semver": "^7.5.8",
|
||||||
"@types/tmp": "^0.2.6",
|
"@types/tmp": "^0.2.6",
|
||||||
"tmp": "^0.2.3"
|
"tmp": "^0.2.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@typescript-eslint/eslint-plugin": "^7.7.1",
|
"@typescript-eslint/eslint-plugin": "^7.8.0",
|
||||||
"@typescript-eslint/parser": "^7.7.1",
|
"@typescript-eslint/parser": "^7.8.0",
|
||||||
"@vercel/ncc": "^0.38.1",
|
"@vercel/ncc": "^0.38.1",
|
||||||
"eslint": "^8.57.0",
|
"eslint": "^8.57.0",
|
||||||
"eslint-config-prettier": "^9.1.0",
|
"eslint-config-prettier": "^9.1.0",
|
||||||
|
17
problem-matchers.json
Normal file
17
problem-matchers.json
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"problemMatcher": [
|
||||||
|
{
|
||||||
|
"owner": "golangci-lint-colored-line-number",
|
||||||
|
"severity": "error",
|
||||||
|
"pattern": [
|
||||||
|
{
|
||||||
|
"regexp": "^([^:]+):(\\d+):(?:(\\d+):)?\\s+(.+ \\(.+\\))$",
|
||||||
|
"file": 1,
|
||||||
|
"line": 2,
|
||||||
|
"column": 3,
|
||||||
|
"message": 4
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
37
src/run.ts
37
src/run.ts
@ -101,7 +101,7 @@ async function fetchPushPatch(ctx: Context): Promise<string> {
|
|||||||
const patchResp = await octokit.rest.repos.compareCommitsWithBasehead({
|
const patchResp = await octokit.rest.repos.compareCommitsWithBasehead({
|
||||||
owner: ctx.repo.owner,
|
owner: ctx.repo.owner,
|
||||||
repo: ctx.repo.repo,
|
repo: ctx.repo.repo,
|
||||||
basehead: `${ctx.payload.before}..${ctx.payload.after}`,
|
basehead: `${ctx.payload.before}...${ctx.payload.after}`,
|
||||||
mediaType: {
|
mediaType: {
|
||||||
format: `diff`,
|
format: `diff`,
|
||||||
},
|
},
|
||||||
@ -185,21 +185,32 @@ async function runLint(lintPath: string, patchPath: string): Promise<void> {
|
|||||||
const userArgsMap = new Map<string, string>(userArgsList)
|
const userArgsMap = new Map<string, string>(userArgsList)
|
||||||
const userArgNames = new Set<string>(userArgsList.map(([key]) => key))
|
const userArgNames = new Set<string>(userArgsList.map(([key]) => key))
|
||||||
|
|
||||||
const annotations = core.getBooleanInput(`annotations`)
|
const problemMatchers = core.getBooleanInput(`problem-matchers`)
|
||||||
|
|
||||||
if (annotations) {
|
if (problemMatchers) {
|
||||||
const formats = (userArgsMap.get("out-format") || "")
|
const matchersPath = path.join(__dirname, "../..", "problem-matchers.json")
|
||||||
.trim()
|
if (fs.existsSync(matchersPath)) {
|
||||||
.split(",")
|
// Adds problem matchers.
|
||||||
.filter((f) => f.length > 0)
|
// https://github.com/actions/setup-go/blob/cdcb36043654635271a94b9a6d1392de5bb323a7/src/main.ts#L81-L83
|
||||||
.filter((f) => !f.startsWith(`github-actions`))
|
core.info(`##[add-matcher]${matchersPath}`)
|
||||||
.concat("github-actions")
|
}
|
||||||
.join(",")
|
|
||||||
|
|
||||||
addedArgs.push(`--out-format=${formats}`)
|
|
||||||
userArgs = userArgs.replace(/--out-format=\S*/gi, "").trim()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const formats = (userArgsMap.get("out-format") || "")
|
||||||
|
.trim()
|
||||||
|
.split(",")
|
||||||
|
.filter((f) => f.length > 0)
|
||||||
|
.filter((f) => !f.startsWith(`github-actions`)) // Removes `github-actions` format.
|
||||||
|
.join(",")
|
||||||
|
|
||||||
|
if (formats) {
|
||||||
|
// Adds formats but without `github-actions` format.
|
||||||
|
addedArgs.push(`--out-format=${formats}`)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Removes `--out-format` from the user flags because it's already inside `addedArgs`.
|
||||||
|
userArgs = userArgs.replace(/--out-format=\S*/gi, "").trim()
|
||||||
|
|
||||||
if (isOnlyNewIssues()) {
|
if (isOnlyNewIssues()) {
|
||||||
if (userArgNames.has(`new`) || userArgNames.has(`new-from-rev`) || userArgNames.has(`new-from-patch`)) {
|
if (userArgNames.has(`new`) || userArgNames.has(`new-from-rev`) || userArgNames.has(`new-from-patch`)) {
|
||||||
throw new Error(`please, don't specify manually --new* args when requesting only new issues`)
|
throw new Error(`please, don't specify manually --new* args when requesting only new issues`)
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 90 KiB |
BIN
static/colored-line-number.png
Normal file
BIN
static/colored-line-number.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 70 KiB |
Reference in New Issue
Block a user