From f5edc87e4d12747ff93fb9242ea89938323e89be Mon Sep 17 00:00:00 2001
From: bo0tzz <git@bo0tzz.me>
Date: Thu, 13 Feb 2025 22:10:00 +0100
Subject: [PATCH] feat: comment URL on previewed PRs (#16085)

---
 .github/workflows/preview-comment.yaml | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 .github/workflows/preview-comment.yaml

diff --git a/.github/workflows/preview-comment.yaml b/.github/workflows/preview-comment.yaml
new file mode 100644
index 0000000000..f49c271fe5
--- /dev/null
+++ b/.github/workflows/preview-comment.yaml
@@ -0,0 +1,17 @@
+name: Preview comment
+
+on:
+  pull_request:
+    types: [labeled]
+
+jobs:
+  comment-status:
+    runs-on: ubuntu-latest
+    if: ${{ github.event.label.name == 'preview' }}
+    permissions:
+      pull-requests: write
+    steps:
+      - uses: mshick/add-pr-comment@v2
+        with:
+          message-id: "preview-status"
+          message: "Deploying preview environment to https://pr-${{ github.event.pull_request.number }}.preview.internal.immich.cloud/"