Skip to content

Commit

Permalink
Check that pull requests target unstable (#2187)
Browse files Browse the repository at this point in the history
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 ;)
  • Loading branch information
michaelsproul committed Feb 9, 2021
1 parent 7c05911 commit 6f4da9a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ env:
# Deny warnings in CI
RUSTFLAGS: "-D warnings"
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:
name: cargo-fmt
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion bors.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ status = [
]
use_squash_merge = true
timeout_sec = 7200
pr_status = ["license/cla"]
pr_status = ["license/cla", "target-branch-check"]

0 comments on commit 6f4da9a

Please sign in to comment.