Skip to content

Commit 4b322dd

Browse files
authored
Merge pull request #424 from mkobayashime/squash-merge
Support `Squash and merge`
2 parents c9cf57b + 9e8ca0c commit 4b322dd

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

dist/github-pr-submission-shortcuts.user.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// ==UserScript==
22
// @name GitHub - PR submission shortcuts
33
// @namespace mkobayashime
4-
// @version 1.6.0
4+
// @version 1.7.0
55
// @description Ctrl+Enter to merge/automerge PR
66
// @icon https://www.google.com/s2/favicons?domain=github.com
77
// @author mkobayashime
@@ -64,7 +64,7 @@ void (() => {
6464
}
6565
const mergeButton = await awaitWithInterval(() => {
6666
const button = document.evaluate(
67-
"//button[descendant::*[text() = 'Merge pull request' or text() = 'Enable auto-merge' or text() = 'Bypass rules and merge']]",
67+
"//button[descendant::*[text() = 'Merge pull request' or text() = 'Enable auto-merge' or text() = 'Bypass rules and merge' or text() = 'Squash and merge']]",
6868
document,
6969
null,
7070
XPathResult.FIRST_ORDERED_NODE_TYPE,
@@ -87,7 +87,7 @@ void (() => {
8787
if (focusedInput) focusedInput.blur();
8888
const confirmButton = await awaitWithInterval(() => {
8989
const button = document.evaluate(
90-
"//button[descendant::*[text() = 'Confirm merge' or text() = 'Confirm auto-merge' or text() = 'Confirm bypass rules and merge']]",
90+
"//button[descendant::*[text() = 'Confirm merge' or text() = 'Confirm auto-merge' or text() = 'Confirm bypass rules and merge' or text() == 'Confirm squash and merge']]",
9191
document,
9292
null,
9393
XPathResult.FIRST_ORDERED_NODE_TYPE,

src/userscripts/github-pr-submission-shortcuts/index.user.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { sleep } from "../utils/sleep";
55

66
export default defineUserScript({
77
name: "GitHub - PR submission shortcuts",
8-
version: "1.6.0",
8+
version: "1.7.0",
99
description: "Ctrl+Enter to merge/automerge PR",
1010
match: ["https://github.com/*"],
1111
icon: "https://www.google.com/s2/favicons?domain=github.com",
@@ -29,7 +29,7 @@ export default defineUserScript({
2929

3030
const mergeButton = await awaitWithInterval(() => {
3131
const button = document.evaluate(
32-
"//button[descendant::*[text() = 'Merge pull request' or text() = 'Enable auto-merge' or text() = 'Bypass rules and merge']]",
32+
"//button[descendant::*[text() = 'Merge pull request' or text() = 'Enable auto-merge' or text() = 'Bypass rules and merge' or text() = 'Squash and merge']]",
3333
document,
3434
null,
3535
XPathResult.FIRST_ORDERED_NODE_TYPE,
@@ -56,7 +56,7 @@ export default defineUserScript({
5656

5757
const confirmButton = await awaitWithInterval(() => {
5858
const button = document.evaluate(
59-
"//button[descendant::*[text() = 'Confirm merge' or text() = 'Confirm auto-merge' or text() = 'Confirm bypass rules and merge']]",
59+
"//button[descendant::*[text() = 'Confirm merge' or text() = 'Confirm auto-merge' or text() = 'Confirm bypass rules and merge' or text() == 'Confirm squash and merge']]",
6060
document,
6161
null,
6262
XPathResult.FIRST_ORDERED_NODE_TYPE,

0 commit comments

Comments
 (0)