Feat: Ranging support with ryuw122 #970
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PR Branch Name Check | |
| on: | |
| pull_request_target: | |
| types: [opened, reopened, synchronize] | |
| permissions: | |
| contents: read | |
| issues: write | |
| jobs: | |
| check-source-branch: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check PR source branch | |
| if: ${{ github.event.pull_request.head.repo.fork && (github.event.pull_request.head.ref == 'master' || github.event.pull_request.head.ref == 'main') }} | |
| run: | | |
| echo "ERROR: Pull requests from the master/main branch of forks are not allowed, because it prevents maintainers from contributing to your PR." | |
| echo "Please create a feature branch in your fork and submit the PR from that branch instead." | |
| exit 1 | |
| - name: Leave comment if PR is from master/main branch of fork | |
| if: ${{ github.event.pull_request.head.repo.fork && (github.event.pull_request.head.ref == 'master' || github.event.pull_request.head.ref == 'main') }} | |
| uses: actions/github-script@v9 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: 'WARNING: Pull requests from the master/main branch of forks are not allowed, because it prevents maintainers from contributing to your PR. Please create a feature branch in your fork and submit the PR from that branch instead.' | |
| }) |