Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions default.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,6 @@
"*"
]
},
{
"description": "🚫 Production environments - disable automerge",
"matchFileNames": [
"**/production/**"
],
"automerge": false,
"prPriority": -1,
"addLabels": [
"⚠️ production"
]
},
{
"description": "🚫 Major updates - disable automerge",
"matchUpdateTypes": [
Expand All @@ -72,6 +61,17 @@
"panicboat/.github"
],
"minimumReleaseAge": null
},
{
"description": "🚫 Production environments - disable automerge",
"matchFileNames": [
"**/production/**"
],
"automerge": false,
"prPriority": -1,
"addLabels": [
"⚠️ production"
]
}
]
}
6 changes: 6 additions & 0 deletions scripts/workflows/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ test_resolver_skips_label_resolver_without_a_pull_request() {
assert_eq "needs.resolve.outputs.has-targets == 'true' &&" "$(yq '.jobs["deploy-terragrunt"].if' "${workflow}" | head -n 1)"
}

test_renovate_keeps_production_out_of_automerge() {
# Renovate applies matching packageRules in order, so a later rule overrides the production rule.
assert_eq "false" "$(jq -r '[.packageRules[] | select(.automerge != null) | select(.matchFileNames // [] | index("**/production/**"))][0].automerge' "${repo_root}/default.json")"
assert_eq "production" "$(jq -r '[.packageRules[] | select(.automerge != null)] | last | if (.matchFileNames // [] | index("**/production/**")) != null then "production" else "other" end' "${repo_root}/default.json")"
}

test_workflows_do_not_read_apply_trigger() {
assert_eq "" "$(grep -rl --exclude='*test.sh' 'apply_trigger\|validate-apply-trigger' "${workflows_dir}" "${repo_root}/scripts" || true)"
}
Expand Down
Loading