fix(core): preserve compound command output #251
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: Auto Assign | |
| on: | |
| issues: | |
| types: | |
| - opened | |
| - reopened | |
| pull_request_target: | |
| types: | |
| - opened | |
| - reopened | |
| - ready_for_review | |
| permissions: | |
| issues: write | |
| pull-requests: write | |
| jobs: | |
| assign: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Assign maintainer | |
| uses: actions/github-script@v8 | |
| with: | |
| script: | | |
| const assignee = "vincentkoc"; | |
| const issueNumber = | |
| context.payload.issue?.number ?? context.payload.pull_request?.number; | |
| if (!issueNumber) { | |
| core.setFailed("Could not determine issue or pull request number."); | |
| return; | |
| } | |
| try { | |
| await github.rest.issues.addAssignees({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: issueNumber, | |
| assignees: [assignee], | |
| }); | |
| } catch (error) { | |
| const status = typeof error?.status === "number" ? `status ${error.status}: ` : ""; | |
| const message = error?.message ?? String(error); | |
| core.warning(`Could not assign ${assignee}: ${status}${message}`); | |
| } |