Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

ci: make sure new PRs are sent to dev (#7342)

Percy Ma5c596f142ce8
diff --git a/.github/workflows/target-branch.yml b/.github/workflows/target-branch.yml
new file mode 100644
index 0000000000..e644c8305c
--- /dev/null
+++ b/.github/workflows/target-branch.yml
@@ -0,0 +1,20 @@
+name: Make sure new PRs are sent to dev
+
+on:
+ pull_request_target:
+ types: [opened, edited]
+
+jobs:
+ check-branch:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: Vankka/pr-target-branch-action@v2
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ target: master
+ exclude: dev
+ change-to: dev
+ comment: |
+ Your PR was set to target `master`, PRs should be target `dev`
+ The base branch of this PR has been automatically changed to `dev`, please check that there are no merge conflicts