Skip to content

Change check_branch workflow to check for PRs to microjit #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions .github/workflows/check_branch.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
# We bidirectionally synchronize github.com/ruby/ruby.git's master branch and
# git.ruby-lang.org/ruby.git's master branch.
# We can use a pull request's merge button only on the master branch.
#
# Therefore, we require to pass this "check_branch" on all protected branches
# to prevent us from accidentally pushing commits to GitHub directly.
#
# Details: https://bugs.ruby-lang.org/issues/16094
# A safeguard for accidentally opening a PR against upstream Github repo.
name: Pull Request
on: [pull_request]
jobs:
check_branch:
runs-on: ubuntu-latest
steps:
- name: Check if branch is master
- name: Check if branch is microjit
run: |
if [ "$BASE_REF" != master ]; then
echo "Only master branch accepts a pull request, but it's '$BASE_REF'."
if [ "$BASE_REF" != microjit ]; then
echo "Only the microjit branch accepts pull requests, but it's '$BASE_REF'."
exit 1
fi
env:
Expand Down