From bb0c1b372397da00d99b016778d69b9c297626c3 Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Wed, 14 Jan 2026 11:22:11 +0100 Subject: [PATCH 1/2] chore: automate marking as draft on requesting changes (#6729) --- ...flict_labeler.yml => conflict-labeler.yml} | 0 .../mark-as-draft-on-requesting-changes.yml | 60 +++++++++++++++++++ ...tributor_pr.yml => new-contributor-pr.yml} | 0 3 files changed, 60 insertions(+) rename .github/workflows/{conflict_labeler.yml => conflict-labeler.yml} (100%) create mode 100644 .github/workflows/mark-as-draft-on-requesting-changes.yml rename .github/workflows/{new_contributor_pr.yml => new-contributor-pr.yml} (100%) diff --git a/.github/workflows/conflict_labeler.yml b/.github/workflows/conflict-labeler.yml similarity index 100% rename from .github/workflows/conflict_labeler.yml rename to .github/workflows/conflict-labeler.yml diff --git a/.github/workflows/mark-as-draft-on-requesting-changes.yml b/.github/workflows/mark-as-draft-on-requesting-changes.yml new file mode 100644 index 000000000..70fcdebb2 --- /dev/null +++ b/.github/workflows/mark-as-draft-on-requesting-changes.yml @@ -0,0 +1,60 @@ +name: Mark PR as draft when changes are requested + +on: + pull_request_review: + types: [submitted] + + pull_request: + types: [labeled] + +permissions: {} + +jobs: + mark-draft: + runs-on: ubuntu-latest + permissions: + pull-requests: write + contents: read + if: | + ( + github.event_name == 'pull_request_review' && + github.event.review.state == 'changes_requested' + ) || ( + github.event_name == 'pull_request' && + github.event.label.name == 'pr:please address review comments' + ) + steps: + - name: Add label on requested changes + if: github.event_name == 'pull_request_review' + env: + GH_TOKEN: ${{ github.token }} + PR_NUMBER: ${{ github.event.pull_request.number }} + REPO: ${{ github.repository }} + run: | + gh issue edit "$PR_NUMBER" \ + --repo "$REPO" \ + --add-label "pr:please address review comments" + + - name: Mark PR as draft + env: + GH_TOKEN: ${{ github.token }} + PR_URL: ${{ github.event.pull_request.html_url }} + run: gh pr ready "$PR_URL" --undo || true + ready-for-review: + runs-on: ubuntu-latest + if: github.event_name == 'pull_request' && github.event.action == 'ready_for_review' + + steps: + - name: Update labels for review + env: + GH_TOKEN: ${{ github.token }} + PR_NUMBER: ${{ github.event.pull_request.number }} + REPO: ${{ github.repository }} + run: | + gh issue edit "$PR_NUMBER" \ + --repo "$REPO" \ + --remove-label "pr:please address review comments" || true + + gh issue edit "$PR_NUMBER" \ + --repo "$REPO" \ + --add-label "pr:needs review" diff --git a/.github/workflows/new_contributor_pr.yml b/.github/workflows/new-contributor-pr.yml similarity index 100% rename from .github/workflows/new_contributor_pr.yml rename to .github/workflows/new-contributor-pr.yml From a85868ba7ca2d89825e48b9785382e9999631c59 Mon Sep 17 00:00:00 2001 From: kota <52403688+yashikota@users.noreply.github.com> Date: Wed, 14 Jan 2026 20:44:36 +0900 Subject: [PATCH 2/2] feat(notification): discord suppress notifications (#6717) --- server/notification-providers/discord.js | 14 ++++++++++++++ src/components/notifications/Discord.vue | 21 +++++++++++++++++++++ src/lang/en.json | 2 ++ 3 files changed, 37 insertions(+) diff --git a/server/notification-providers/discord.js b/server/notification-providers/discord.js index 79768e3df..3ed509cea 100644 --- a/server/notification-providers/discord.js +++ b/server/notification-providers/discord.js @@ -11,6 +11,11 @@ class Discord extends NotificationProvider { async send(notification, msg, monitorJSON = null, heartbeatJSON = null) { const okMsg = "Sent Successfully."; + // Discord Message Flags + // @see https://discord.com/developers/docs/resources/message#message-object-message-flags + // This message will not trigger push and desktop notifications + const SUPPRESS_NOTIFICATIONS_FLAG = 1 << 12; + try { let config = this.getAxiosConfigWithProxy({}); const discordDisplayName = notification.discordUsername || "Uptime Kuma"; @@ -41,6 +46,9 @@ class Discord extends NotificationProvider { if (notification.discordChannelType === "createNewForumPost") { discordtestdata.thread_name = notification.postName; } + if (notification.discordSuppressNotifications) { + discordtestdata.flags = SUPPRESS_NOTIFICATIONS_FLAG; + } await axios.post(webhookUrl.toString(), discordtestdata, config); return okMsg; } @@ -89,6 +97,9 @@ class Discord extends NotificationProvider { if (notification.discordPrefixMessage) { discorddowndata.content = notification.discordPrefixMessage; } + if (notification.discordSuppressNotifications) { + discorddowndata.flags = SUPPRESS_NOTIFICATIONS_FLAG; + } await axios.post(webhookUrl.toString(), discorddowndata, config); return okMsg; @@ -140,6 +151,9 @@ class Discord extends NotificationProvider { if (notification.discordPrefixMessage) { discordupdata.content = notification.discordPrefixMessage; } + if (notification.discordSuppressNotifications) { + discordupdata.flags = SUPPRESS_NOTIFICATIONS_FLAG; + } await axios.post(webhookUrl.toString(), discordupdata, config); return okMsg; diff --git a/src/components/notifications/Discord.vue b/src/components/notifications/Discord.vue index b65eb706a..6eff2a887 100644 --- a/src/components/notifications/Discord.vue +++ b/src/components/notifications/Discord.vue @@ -102,6 +102,24 @@ + +
+
+ + +
+
+ {{ $t("discordSuppressNotificationsHelptext") }} +
+
diff --git a/src/lang/en.json b/src/lang/en.json index 8002bc2d7..19d259222 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -1265,6 +1265,8 @@ "Matomo": "Matomo", "Umami": "Umami", "Disable URL in Notification": "Disable URL in Notification", + "Suppress Notifications": "Suppress Notifications", + "discordSuppressNotificationsHelptext": "When enabled, messages will be posted to the channel but won't trigger push or desktop notifications for recipients.", "Ip Family": "IP Family", "ipFamilyDescriptionAutoSelect": "Uses the {happyEyeballs} for determining the IP family.", "Happy Eyeballs algorithm": "Happy Eyeballs algorithm",