Skip to content

Commit 3f2a39d

Browse files
danadajianclaude
andauthored
refactor(manage-merge-queue, check-merge-safety): point users to native GitHub merge queue (#780)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent de0eac5 commit 3f2a39d

9 files changed

Lines changed: 24 additions & 12 deletions

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ Each of the following helpers are defined in a file of the same name in `src/hel
9393
- If `login` is provided, it does nothing if that user is already part of the team
9494
- You can also pass a `slack_webhook_url` to notify the assignees that they are assigned to the PR!
9595

96-
### [check-merge-safety](.github/workflows/check-merge-safety.yml)
96+
### [~~check-merge-safety~~](.github/workflows/check-merge-safety.yml) (DEPRECATED)
97+
98+
> **Deprecated:** This helper is deprecated. Please use [GitHub's native merge queue](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue) instead.
9799

98100
- Checks if a PR branch needs to update with the default branch prior to merging (great for monorepos!)
99101
- If this check succeeds for a PR, the PR is safe to merge right away!
@@ -286,7 +288,9 @@ Additionally, the following parameters can be used for additional control over t
286288
- Adds a &#x27;due soon&#x27; label to issues with a priority label that will become overdue in 7 days
287289
- Adds an &#x27;overdue&#x27; label to issues with a priority label that are overdue
288290

289-
### [manage-merge-queue](.github/workflows/manage-merge-queue.yml)
291+
### [~~manage-merge-queue~~](.github/workflows/manage-merge-queue.yml) (DEPRECATED)
292+
293+
> **Deprecated:** This helper is deprecated. Please use [GitHub's native merge queue](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue) instead.
290294

291295
- Manages a queue for PRs as follows:
292296
- Adding the `READY TO MERGE` label to a PR will add the PR to the "merge queue", represented by a `QUEUED FOR MERGE #X` label. Removing `READY TO MERGE` will remove this label and thus remove the PR from the queue.

dist/helpers/check-merge-safety.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ var COMMENT_PATHS_MARKER = "<!-- check-merge-safety-paths -->";
4444
class CheckMergeSafety extends HelperInputs {
4545
}
4646
var checkMergeSafety = async (inputs) => {
47+
warning("check-merge-safety is deprecated. Please use GitHub's native merge queue: https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue");
4748
const isPrWorkflow = Boolean(context.issue.number);
4849
if (!isPrWorkflow) {
4950
return handlePushWorkflow(inputs);
@@ -258,4 +259,4 @@ export {
258259
CheckMergeSafety
259260
};
260261

261-
//# debugId=8CCB3211353B88AF64756E2164756E21
262+
//# debugId=F4EC41763AC4ABEC64756E2164756E21

dist/helpers/check-merge-safety.js.map

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/helpers/manage-merge-queue.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
enableAutoMerge,
44
manageMergeQueue,
55
removePrFromQueue
6-
} from "../main-1dad8qjs.js";
6+
} from "../main-yrwb8zcb.js";
77
import"../main-f57sjs6g.js";
88
import"../main-fk67p72v.js";
99
import"../main-3vz73ekb.js";

dist/helpers/prepare-queued-pr-for-merge.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
prepareQueuedPrForMerge,
33
updatePrWithDefaultBranch
4-
} from "../main-1dad8qjs.js";
4+
} from "../main-yrwb8zcb.js";
55
import"../main-f57sjs6g.js";
66
import"../main-fk67p72v.js";
77
import"../main-3vz73ekb.js";
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ var manageMergeQueue = async ({
139139
allow_only_for_maintainers,
140140
pattern
141141
} = {}) => {
142+
warning("manage-merge-queue is deprecated. Please use GitHub's native merge queue: https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue");
142143
const { data: pullRequest } = await octokit.pulls.get({ pull_number: context.issue.number, ...context.repo });
143144
if (pullRequest.merged || !pullRequest.labels.find((label) => label.name === READY_FOR_MERGE_PR_LABEL)) {
144145
info("This PR is not in the merge queue.");
@@ -304,4 +305,4 @@ var updatePrWithDefaultBranch = async (pullRequest) => {
304305

305306
export { prepareQueuedPrForMerge, updatePrWithDefaultBranch, ManageMergeQueue, manageMergeQueue, removePrFromQueue, enableAutoMerge };
306307

307-
//# debugId=89067C53C7C247CA64756E2164756E21
308+
//# debugId=37FACE3969ED272964756E2164756E21
Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/helpers/check-merge-safety.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ export class CheckMergeSafety extends HelperInputs {
3737
}
3838

3939
export const checkMergeSafety = async (inputs: CheckMergeSafety) => {
40+
core.warning(
41+
"check-merge-safety is deprecated. Please use GitHub's native merge queue: https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue"
42+
);
4043
const isPrWorkflow = Boolean(githubContext.issue.number);
4144
if (!isPrWorkflow) {
4245
return handlePushWorkflow(inputs);

src/helpers/manage-merge-queue.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ export const manageMergeQueue = async ({
5353
allow_only_for_maintainers,
5454
pattern
5555
}: ManageMergeQueue = {}) => {
56+
core.warning(
57+
"manage-merge-queue is deprecated. Please use GitHub's native merge queue: https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue"
58+
);
5659
const { data: pullRequest } = await octokit.pulls.get({ pull_number: context.issue.number, ...context.repo });
5760
if (pullRequest.merged || !pullRequest.labels.find(label => label.name === READY_FOR_MERGE_PR_LABEL)) {
5861
core.info('This PR is not in the merge queue.');

0 commit comments

Comments
 (0)