Check that pull requests target unstable (#2187)

Attempt to prevent accidental merges to `stable` due to GitHub's default behaviour of opening PRs against it.

I've intentionally opened this PR against `stable` to test the functionality ;)
This commit is contained in:
Michael Sproul 2021-02-09 02:00:53 +00:00
parent 7c059117f4
commit 6f4da9a5d2
2 changed files with 8 additions and 1 deletions

View File

@ -12,6 +12,13 @@ env:
# Deny warnings in CI # Deny warnings in CI
RUSTFLAGS: "-D warnings" RUSTFLAGS: "-D warnings"
jobs: jobs:
target-branch-check:
name: target-branch-check
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Check that pull request is targeting unstable branch
run: test ${{ github.base_ref }} = "unstable"
cargo-fmt: cargo-fmt:
name: cargo-fmt name: cargo-fmt
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -16,4 +16,4 @@ status = [
] ]
use_squash_merge = true use_squash_merge = true
timeout_sec = 7200 timeout_sec = 7200
pr_status = ["license/cla"] pr_status = ["license/cla", "target-branch-check"]