Skip to content

Break out branch limiting instructions #1929

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
8 changes: 6 additions & 2 deletions pages/tutorials/github_merge_queue.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ The merge queue creates temporary branches with a special prefix to validate pul

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't comment on it, but let's update the ordering of the intro paragraph for the steps on line 15 to align with the updated instructions. Thinking:

The merge queue creates temporary branches with a special prefix to validate pull request changes. To avoid these temporary branches triggering multiple builds on the same pipeline for the same commit, we recommend enabling the option to skip builds on existing commits.

If you already use branch limiting rules in the pipeline, you must also add a filter to match branches with the special prefix.

To enable a merge queue for a pipeline:

1. From your Buildkite dashboard, select your pipeline.
1. Select _Pipeline Settings_ > _GitHub_.
1. In the _GitHub Settings_ section, select the _Skip builds with existing commits_ checkbox.

If you have existing branch limiting rules:

1. From your Buildkite dashboard, select your pipeline.
1. Select _Pipeline Settings_ > _GitHub_.
1. In the _Branch Limiting_ section, add a filter for the following pattern:
Comment on lines +22 to 27
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to avoid having to repeat the navigation instructions. What do you think about keeping it as one list, but outlining when you need to make changes to the branch limiting rules? Thinking:

Suggested change
If you have existing branch limiting rules:
1. From your Buildkite dashboard, select your pipeline.
1. Select _Pipeline Settings_ > _GitHub_.
1. In the _Branch Limiting_ section, add a filter for the following pattern:
1. In the _Branch Limiting_ section, check whether there are any existing branch filter patterns.
- If none, you don't need to do anything further.
- If there are existing patterns, add a filter for the following pattern:

Expand All @@ -24,6 +30,4 @@ To enable a merge queue for a pipeline:
gh-readonly-queue/{base_branch}/*
```
Comment on lines 30 to 31
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If using my suggestion to keep one list, you'll need to update the indentation here:

Suggested change
gh-readonly-queue/{base_branch}/*
```
gh-readonly-queue/{base_branch}/*
```

Note, the line above also needs updating to match, but I can't comment on it.


1. In the _GitHub Settings_ section, select the _Skip builds with existing commits_ checkbox.

That's it! Your pipeline supports merge queues in GitHub. 🎉