Skip to content

Commit cca7f0b

Browse files
committed
fix(auto-merge): replace drifted hardcoded check names with configurable wait_checks input
The hardcoded matrix waited for `tfsec / tfsec sarif report`, but the shared `security-tfsec.yml` now produces `tfsec / 🧪 tfsec SARIF Report` (emoji + title case). The wait-on-check step therefore never matched, causing every dependabot auto-merge attempt to stall and skip both autoapprove and automerge jobs. Replace the hardcoded matrix with a `wait_checks` JSON-array input so callers can supply the exact check-run names their repo produces. The default covers the org-wide tflint + tfsec reports with the current (correct) names. `tfcheck` is retained as a no-op input for backward compatibility; callers should migrate to `wait_checks`.
1 parent f1ee54f commit cca7f0b

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/pr-auto-merge.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@ on:
55
workflow_call:
66
inputs:
77
tfcheck:
8-
description: 'Enter the tfcheck action name.'
8+
description: 'DEPRECATED — use `wait_checks`. Kept for backward compatibility; ignored.'
99
required: false
1010
type: string
11+
wait_checks:
12+
description: 'JSON array of required check-run names to wait on before auto-approving. Must match the exact names GitHub reports (including emoji, casing, and parentheses).'
13+
required: false
14+
type: string
15+
default: '["tf-lint / tflint", "tfsec / 🧪 tfsec SARIF Report"]'
1116
tfchecks_azure:
1217
description: 'List of Azure TF checks (JSON array as string)'
1318
required: false
@@ -29,7 +34,7 @@ jobs:
2934
runs-on: ubuntu-latest
3035
strategy:
3136
matrix:
32-
tf-checks: ["tf-lint / tflint", "tfsec / tfsec sarif report", "${{ inputs.tfcheck }}"]
37+
tf-checks: ${{ fromJSON(inputs.wait_checks) }}
3338
if: github.actor == 'dependabot[bot]' && !inputs.azure_cloud
3439
steps:
3540
- name: Wait for 2 Minutes

0 commit comments

Comments
 (0)