Skip to content

Commit 350a2c3

Browse files
authored
[Console] Enable auto-merge in console_definitons (#270941)
## Summary I noticed that we often approve the auto-generated PR, but we sometimes forget to enable merge/auto-merge, so the PR sits there and never merges. When that happens, the next weeks’ PRs don’t get generated, and the whole weekly chain stalls. Enabling auto-merge at PR creation time prevents this from being blocked by a missed manual step. This change updates `.buildkite/scripts/steps/console_definitions_sync.sh` so that after creating the Console definitions sync PR it: * Automatically enables auto-merge (squash) for that PR via gh pr merge --auto --squash. * Logs a warning if enabling auto-merge fails, without failing the step.
1 parent 9365dc1 commit 350a2c3

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.buildkite/scripts/steps/console_definitions_sync.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,20 @@ main () {
6666
git push origin "$BRANCH_NAME"
6767

6868
# Create PR
69-
gh pr create \
69+
pr_url=$(gh pr create \
7070
--title "$PR_TITLE" \
7171
--body "$PR_BODY" \
7272
--base "$BUILDKITE_BRANCH" \
7373
--head "$BRANCH_NAME" \
7474
--label 'backport:skip' \
7575
--label 'release_note:skip' \
7676
--label 'Feature:Console' \
77-
--label 'Team:Kibana Management'
77+
--label 'Team:Kibana Management')
78+
79+
report_main_step "Enabling auto-merge (squash)"
80+
if ! gh pr merge "$pr_url" --auto --squash; then
81+
echo "Warning: Failed to enable auto-merge (squash) for $pr_url"
82+
fi
7883
}
7984

8085
main

0 commit comments

Comments
 (0)