Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions dist/github-pr-submission-shortcuts.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name GitHub - PR submission shortcuts
// @namespace mkobayashime
// @version 1.6.0
// @version 1.7.0
// @description Ctrl+Enter to merge/automerge PR
// @icon https://www.google.com/s2/favicons?domain=github.com
// @author mkobayashime
Expand Down Expand Up @@ -64,7 +64,7 @@ void (() => {
}
const mergeButton = await awaitWithInterval(() => {
const button = document.evaluate(
"//button[descendant::*[text() = 'Merge pull request' or text() = 'Enable auto-merge' or text() = 'Bypass rules and merge']]",
"//button[descendant::*[text() = 'Merge pull request' or text() = 'Enable auto-merge' or text() = 'Bypass rules and merge' or text() = 'Squash and merge']]",
document,
null,
XPathResult.FIRST_ORDERED_NODE_TYPE,
Expand All @@ -87,7 +87,7 @@ void (() => {
if (focusedInput) focusedInput.blur();
const confirmButton = await awaitWithInterval(() => {
const button = document.evaluate(
"//button[descendant::*[text() = 'Confirm merge' or text() = 'Confirm auto-merge' or text() = 'Confirm bypass rules and merge']]",
"//button[descendant::*[text() = 'Confirm merge' or text() = 'Confirm auto-merge' or text() = 'Confirm bypass rules and merge' or text() == 'Confirm squash and merge']]",
document,
null,
XPathResult.FIRST_ORDERED_NODE_TYPE,
Expand Down
6 changes: 3 additions & 3 deletions src/userscripts/github-pr-submission-shortcuts/index.user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { sleep } from "../utils/sleep";

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

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

const confirmButton = await awaitWithInterval(() => {
const button = document.evaluate(
"//button[descendant::*[text() = 'Confirm merge' or text() = 'Confirm auto-merge' or text() = 'Confirm bypass rules and merge']]",
"//button[descendant::*[text() = 'Confirm merge' or text() = 'Confirm auto-merge' or text() = 'Confirm bypass rules and merge' or text() == 'Confirm squash and merge']]",
document,
null,
XPathResult.FIRST_ORDERED_NODE_TYPE,
Expand Down