Feat: stránka Reality – seznam inzerátů s filtrováním a historií cen #27
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: Assign PR author if no assignee exists | |
| on: | |
| pull_request: | |
| types: [opened] | |
| permissions: | |
| pull-requests: write | |
| issues: write | |
| jobs: | |
| assign-author-if-empty: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Assign PR author when no assignee exists | |
| uses: actions/github-script@v9 | |
| with: | |
| script: | | |
| const pr = context.payload.pull_request; | |
| const assignees = pr.assignees || []; | |
| if (assignees.length > 0) { | |
| core.info(`PR already has assignee(s): ${assignees.map(a => a.login).join(", ")}`); | |
| return; | |
| } | |
| const author = pr.user.login; | |
| await github.rest.issues.addAssignees({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: pr.number, | |
| assignees: [author] | |
| }); | |
| core.info(`Assigned PR author: ${author}`); |