# We bidirectionally synchronize github.com/ruby/ruby.git's ruby_2_7 branch and # git.ruby-lang.org/ruby.git's ruby_2_7 branch. # We can use a pull request's merge button only on the ruby_2_7 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 name: Pull Request on: [pull_request] jobs: check_branch: runs-on: ubuntu-latest steps: - name: Check if branch is ruby_2_7 run: | if [ "$BASE_REF" != ruby_2_7 ]; then echo "Only ruby_2_7 branch accepts a pull request, but it's '$BASE_REF'." exit 1 fi env: BASE_REF: ${{ github.base_ref }}