[Bug]: Malformed attachment object if adding under the same key when using the Async client #16
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: Issue Triage | |
| on: | |
| issues: | |
| types: [opened, labeled, unlabeled, reopened] | |
| permissions: | |
| contents: read | |
| jobs: | |
| triage: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| issues: write | |
| steps: | |
| - name: Initial triage | |
| uses: actions/github-script@v8 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const issue = context.payload.issue; | |
| // Check if this is a bug report | |
| if (issue.title.includes('[Bug]')) { | |
| // Add priority labels based on content | |
| if (issue.body.toLowerCase().includes('crash') || | |
| issue.body.toLowerCase().includes('data loss')) { | |
| github.rest.issues.addLabels({ | |
| issue_number: issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| labels: ['priority: high'] | |
| }); | |
| } | |
| // Assign to bug team | |
| github.rest.issues.addAssignees({ | |
| issue_number: issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| assignees: [''] | |
| }); | |
| } | |
| // Check if this is a feature request | |
| if (issue.title.includes('[Feature]')) { | |
| github.rest.issues.addLabels({ | |
| issue_number: issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| labels: ['needs-review'] | |
| }); | |
| } |