mirror of
https://github.com/golangci/golangci-lint-action.git
synced 2025-12-15 23:26:31 +00:00
feat: support merge queue event
This commit is contained in:
parent
2ebc5cd2ab
commit
2d53ff8a2d
1 changed files with 10 additions and 0 deletions
10
src/run.ts
10
src/run.ts
|
|
@ -46,6 +46,9 @@ async function fetchPatch(): Promise<string> {
|
||||||
return await fetchPullRequestPatch(ctx)
|
return await fetchPullRequestPatch(ctx)
|
||||||
case `push`:
|
case `push`:
|
||||||
return await fetchPushPatch(ctx)
|
return await fetchPushPatch(ctx)
|
||||||
|
case `merge_group`:
|
||||||
|
core.info(JSON.stringify(ctx.payload))
|
||||||
|
return ``
|
||||||
default:
|
default:
|
||||||
core.info(`Not fetching patch for showing only new issues because it's not a pull request context: event name is ${ctx.eventName}`)
|
core.info(`Not fetching patch for showing only new issues because it's not a pull request context: event name is ${ctx.eventName}`)
|
||||||
return ``
|
return ``
|
||||||
|
|
@ -221,6 +224,13 @@ async function runLint(lintPath: string, patchPath: string): Promise<void> {
|
||||||
addedArgs.push(`--new-from-rev=`)
|
addedArgs.push(`--new-from-rev=`)
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
|
case `merge_group`:
|
||||||
|
addedArgs.push(`--new-from-rev=${ctx.payload.merge_group.base_sha}`)
|
||||||
|
|
||||||
|
// Override config values.
|
||||||
|
addedArgs.push(`--new=false`)
|
||||||
|
addedArgs.push(`--new-from-patch=`)
|
||||||
|
break
|
||||||
default:
|
default:
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue