* Nightly workflow fixes #194
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
| # New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE) | |
| # Modifications by Peter Wagner (aka Wagnerp), Simon Coghlan (aka Smurf-IV), tobitege et al. 2025 - 2026. All rights reserved. | |
| name: Auto-assign PR author | |
| on: | |
| pull_request_target: | |
| types: | |
| - opened | |
| permissions: | |
| issues: write | |
| pull-requests: write | |
| jobs: | |
| assign-author: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Assign PR author | |
| uses: actions/github-script@v8 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const { owner, repo } = context.repo; | |
| const pr = context.payload.pull_request; | |
| const branch = pr.head.ref; | |
| let assignee = context.actor; | |
| if (branch.startsWith('dependabot/')) { | |
| assignee = owner; | |
| } | |
| if (!pr.assignees?.length) { | |
| await github.rest.issues.addAssignees({ | |
| owner, | |
| repo, | |
| issue_number: pr.number, | |
| assignees: [assignee], | |
| }); | |
| } |