PR Management Auto Assign #321
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 Management Auto Assign" | |
| on: | |
| workflow_run: | |
| workflows: | |
| - "PR Management Auto Assign Collect Data" | |
| types: [completed] | |
| jobs: | |
| auto-assign: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| permissions: | |
| actions: read | |
| pull-requests: write | |
| steps: | |
| - name: Download PR data artifact | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 | |
| with: | |
| name: pr-auto-assign-data | |
| run-id: ${{ github.event.workflow_run.id }} | |
| github-token: ${{ github.token }} | |
| - name: Load PR data | |
| run: | | |
| cat pr-auto-assign-data.env >> $GITHUB_ENV | |
| - name: Auto assign PR author | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| echo "Assigning PR author: $PR_AUTHOR" | |
| gh pr edit "$PR_NUMBER" --repo "${{ github.repository }}" --add-assignee "$PR_AUTHOR" |