Streamdown #2706
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: Assign Team Pull Requests to Author | |
| on: | |
| pull_request: | |
| types: [opened] | |
| permissions: | |
| pull-requests: write | |
| jobs: | |
| assign: | |
| runs-on: ubuntu-latest | |
| # Only assign pull requests by team members, ignore pull requests from forks | |
| # And only assign if pull request was created by a user, ignore bots | |
| if: github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.user.type == 'User' | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Assign pull request to author | |
| run: gh pr edit $PULL_REQUEST_URL --add-assignee $AUTHOR_LOGIN | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PULL_REQUEST_URL: ${{ github.event.pull_request.html_url }} | |
| AUTHOR_LOGIN: ${{ github.event.pull_request.user.login }} |