Skip to content

Rename lspPath and tests to match naming conventions (#5006) #1024

Rename lspPath and tests to match naming conventions (#5006)

Rename lspPath and tests to match naming conventions (#5006) #1024

Workflow file for this run

name: Auto Assign PR Owner

Check warning on line 1 in .github/workflows/auto_assign.yml

View workflow run for this annotation

GitHub Actions / Auto Assign PR Owner

Workflow execution policy warning (evaluate mode)

On November 2, 2026, GitHub will restrict `pull_request_target` on public repositories by default. To continue allowing the event trigger, configure an Actions policy. Learn more: https://gh.io/securely-using-pull_request_target#default-policy-for-pull_request_target
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`);
}