-
Notifications
You must be signed in to change notification settings - Fork 13
[feature not live] docs(merge-queue): document configurable label commands for enqueueing #659
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -20,6 +20,8 @@ trunk login | |||||||||||||||||||||
| trunk merge <pr-number> | ||||||||||||||||||||||
| ``` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| * Applying the configured enqueueing label to a pull request (when label commands are enabled — see [Label Commands](#label-commands) below). | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Admins can also use [`/trunk merge --force`](force-merge.md) to push a PR through the queue when branch protection isn't satisfied. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| We offer similar commands for cancellation. | ||||||||||||||||||||||
|
|
@@ -36,6 +38,8 @@ trunk login | |||||||||||||||||||||
| trunk merge cancel <pr-number> | ||||||||||||||||||||||
| ``` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| * Removing the configured enqueueing label from a pull request (when label commands are enabled). | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Custom merge commit titles | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| You can specify a custom merge commit title for any PR by adding a `merge-commit-title:` directive on its own line anywhere in the PR body: | ||||||||||||||||||||||
|
|
@@ -65,6 +69,29 @@ The `merge-commit-title:` directive only customizes the merge commit **title**. | |||||||||||||||||||||
| The directive applies to the **Squash** and **Merge Commit** merge methods. It has no effect when using **Rebase**, since rebase replays the original commits onto the target branch and does not produce a separate merge commit. | ||||||||||||||||||||||
| {% endhint %} | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Label Commands | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Label Commands let you enqueue and cancel PRs in the Merge Queue by applying or removing a GitHub label, without leaving a comment or using the CLI. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ### Enabling Label Commands | ||||||||||||||||||||||
|
Comment on lines
+72
to
+76
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Heading capitalization is inconsistent with the rest of the page. Every other Recommend sentence case throughout to match the rest of the page:
Suggested change
(You can keep "Label Commands" capitalized in body prose where it refers to the setting name in the UI — the recommendation is just about heading style.) |
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Label Commands are configured per merge queue instance in **Merge Queue Settings** > **Label Commands**. Only organization admins can change this setting. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| When Label Commands are enabled, you can configure the enqueueing label name. The default label is `trunk-merge-queue-submit`. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ### How it works | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| | Action | Effect | | ||||||||||||||||||||||
| | ------ | ------ | | ||||||||||||||||||||||
| | Apply the enqueueing label to a PR | Submits the PR to the Merge Queue | | ||||||||||||||||||||||
| | Remove the enqueueing label from a PR | Cancels the PR from the queue | | ||||||||||||||||||||||
|
Comment on lines
+86
to
+87
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inconsistent terminology within adjacent rows: the "Submit" row says "Merge Queue" (capitalized) and the "Cancel" row says "queue" (lowercase, no "Merge"). Pick one for both rows.
Suggested change
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| The label must already exist in your GitHub repository. Trunk does not create the label automatically. | ||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: This is an important "gotcha" — if the label doesn't exist, nothing happens. It would stand out more (and match the pattern used for the existing info hint below) if wrapped in a warning hint: Non-blocking — leaving as a plain paragraph is also fine. |
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| {% hint style="info" %} | ||||||||||||||||||||||
| Label Commands work alongside comment commands and the Trunk web app. You can use any combination of submission methods; they all target the same queue. | ||||||||||||||||||||||
| {% endhint %} | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Pull request processing | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Once a PR is submitted to the merge queue it goes through several states. First, it starts as _Queued_ until all of the required conditions to submit it are met. Once ready, the PR moves to the _Pending_ state, waiting for a Merge Queue to pick it up, and then enters the _Testing_ state. Once the tests pass the PR may still need to wait for upstream PRs. Once any upstream PRs are complete the PR will be merged and then removed from the Merge Queue. If a PR fails or is canceled then it will go to the failed or canceled state. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor consistency: the parallel bullet on line 23 links readers to the
[Label Commands](#label-commands)section, but this bullet only says "(when label commands are enabled)" without the same anchor link. For users skimming the cancellation list, the link is just as useful. Consider mirroring line 23: