Skip to content

A platform for community discussion. Free, open, simple.

DEV: Adds a GitHub workflow to check target branch (#24273)

Blake Erickson670692cfa978
diff --git a/.github/workflows/check-branches.yml b/.github/workflows/check-branches.yml
new file mode 100644
index 00000000000..cc63e36becf
--- /dev/null
+++ b/.github/workflows/check-branches.yml
@@ -0,0 +1,14 @@
+name: PR base branch check
+on:
+ pull_request:
+jobs:
+ check-branches:
+ if: github.event_name == 'pull_request' && github.repository == 'discourse/discourse-private-mirror'
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check branches
+ run: |
+ if [ ${{ github.base_ref }} == "tests-passed" ]; then
+ echo "PR requests to tests-passed branch are not allowed. Please use main."
+ exit 1
+ fi