release: 1.9.0 #139
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 Target Check | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| branches: [main] | |
| jobs: | |
| check-pr-author: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check if PR target is allowed | |
| run: | | |
| if [ "${{ github.event.pull_request.user.login }}" != "stainless-app[bot]" ]; then | |
| echo "❌ PR author ${{ github.event.pull_request.user.login }} is not allowed to create PRs against main" | |
| echo "Only stainless-app[bot] is allowed to create PRs against main" | |
| echo "Did you mean to create a PR against the next branch?" | |
| exit 1 | |
| else | |
| echo "✅ PR author ${{ github.event.pull_request.user.login }} is allowed" | |
| fi |