Rename lspPath and tests to match naming conventions (#5006) #1024
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 PR Owner | ||
|
Check warning on line 1 in .github/workflows/auto_assign.yml
|
||
| on: | ||
| pull_request_target: | ||
| types: [opened] | ||
| permissions: | ||
| contents: read | ||
| issues: write | ||
| pull-requests: write | ||
| jobs: | ||
| assign-owner: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Auto-assign known contributors | ||
| uses: actions/github-script@v8 | ||
| with: | ||
| script: | | ||
| // Pyrefly team GitHub handles — single source of truth in | ||
| // .github/owners.json. | ||
| const ownersFile = await github.rest.repos.getContent({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| path: '.github/owners.json', | ||
| }); | ||
| const OWNERS = JSON.parse( | ||
| Buffer.from(ownersFile.data.content, 'base64').toString('utf8'), | ||
| ); | ||
| const author = context.payload.pull_request.user.login; | ||
| if (OWNERS.includes(author.toLowerCase())) { | ||
| await github.rest.issues.addAssignees({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| issue_number: context.payload.pull_request.number, | ||
| assignees: [author], | ||
| }); | ||
| console.log(`Assigned ${author} as owner`); | ||
| } else { | ||
| console.log(`${author} not in owner list, skipping`); | ||
| } | ||