summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkumvijaya <kumvijaya@gmail.com>2025-09-24 22:50:29 +0530
committerkumvijaya <kumvijaya@gmail.com>2025-09-24 22:50:29 +0530
commit1c02b74d680d40373df152d4302b4387db874b0f (patch)
treefd3a78254592026b13f54883dd624b23a2a935b3
parentd222f1accd6d6a5bda92dd570c2761ad5a343f45 (diff)
downloadvyos-1x-1c02b74d680d40373df152d4302b4387db874b0f.tar.gz
vyos-1x-1c02b74d680d40373df152d4302b4387db874b0f.zip
T7748: using mergify rule to handle conflict checks for private repo
-rw-r--r--.github/mergify.yml10
-rw-r--r--.github/workflows/check-pr-conflicts.yml3
-rw-r--r--.mergify.yml25
3 files changed, 37 insertions, 1 deletions
diff --git a/.github/mergify.yml b/.github/mergify.yml
new file mode 100644
index 000000000..985cf0981
--- /dev/null
+++ b/.github/mergify.yml
@@ -0,0 +1,10 @@
+pull_request_rules:
+ - name: Label conflicting pull requests
+ description: Add a label to a pull request with conflict to spot it easily
+ conditions:
+ - conflict
+ - '-closed'
+ actions:
+ label:
+ toggle:
+ - conflict
diff --git a/.github/workflows/check-pr-conflicts.yml b/.github/workflows/check-pr-conflicts.yml
index f09e66415..9b0b97423 100644
--- a/.github/workflows/check-pr-conflicts.yml
+++ b/.github/workflows/check-pr-conflicts.yml
@@ -9,6 +9,7 @@ permissions:
contents: read
jobs:
- check-pr-conflict-call:
+ check-pr-conflict:
+ if: github.repository_owner == 'vyos'
uses: vyos/.github/.github/workflows/check-pr-merge-conflict.yml@current
secrets: inherit
diff --git a/.mergify.yml b/.mergify.yml
new file mode 100644
index 000000000..635cb9e97
--- /dev/null
+++ b/.mergify.yml
@@ -0,0 +1,25 @@
+# pull_request_rules:
+# - name: merge automatically when CI passes and PR is approved
+# conditions:
+# - conflict
+# actions:
+# comment:
+# message: Your PR is in conflict, {{author}}. You should fix it.
+
+pull_request_rules:
+ - name: Label conflicting pull requests
+ description: Add a label to a pull request with conflict to spot it easily
+ conditions:
+ - conflict
+ - '-closed'
+ actions:
+ label:
+ toggle:
+ - conflict
+
+ - name: comment when a pull request is merged
+ conditions:
+ - merged
+ actions:
+ comment:
+ message: Thank you for your contribution @{{author}}! Your pull request has been merged.