Test script-path approach #15
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 issue owners | |
| on: | |
| issues: | |
| types: [labeled] | |
| permissions: | |
| contents: read | |
| jobs: | |
| assign-owners: | |
| permissions: | |
| contents: read | |
| issues: write | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.event.label.name, 'component:') | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 | |
| with: | |
| cache: npm | |
| cache-dependency-path: .github/scripts/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| working-directory: .github/scripts | |
| - name: Parse component label and assign owners | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 | |
| env: | |
| NODE_PATH: ${{ github.workspace }}/.github/scripts/node_modules | |
| with: | |
| script: | | |
| const script = require('./.github/scripts/assign-issue-owners.js'); | |
| await script({ github, context, core }); |