Skip to content

Feat: stránka Reality – seznam inzerátů s filtrováním a historií cen #27

Feat: stránka Reality – seznam inzerátů s filtrováním a historií cen

Feat: stránka Reality – seznam inzerátů s filtrováním a historií cen #27

name: Assign PR author if no assignee exists
on:
pull_request:
types: [opened]
permissions:
pull-requests: write
issues: write
jobs:
assign-author-if-empty:
runs-on: ubuntu-latest
steps:
- name: Assign PR author when no assignee exists
uses: actions/github-script@v9
with:
script: |
const pr = context.payload.pull_request;
const assignees = pr.assignees || [];
if (assignees.length > 0) {
core.info(`PR already has assignee(s): ${assignees.map(a => a.login).join(", ")}`);
return;
}
const author = pr.user.login;
await github.rest.issues.addAssignees({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr.number,
assignees: [author]
});
core.info(`Assigned PR author: ${author}`);