Skip to content

chore(docs): add mdbook mermaid build processor for diagrams support #283

chore(docs): add mdbook mermaid build processor for diagrams support

chore(docs): add mdbook mermaid build processor for diagrams support #283

Workflow file for this run

name: "[Bot] auto-assign PR author"
on:
pull_request:
types: [opened]
permissions:
pull-requests: write
jobs:
auto-assign:
# run only in 'trezor/trezor-firmware' repository
if: github.repository == 'trezor/trezor-firmware'
runs-on: ubuntu-latest
steps:
- name: Assign PR author to PR
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # actions/github-script@v8.0.0
with:
script: |
const author = context.payload.pull_request.user.login;
try {
const response = await github.rest.issues.addAssignees({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
assignees: [author]
});
const isAssigned = (response.data.assignees || []).some(
a => a.login === author
);
if (!isAssigned) {
core.info(`Could not assign ${author} (not assignable in this repo). Skipping.`);
}
} catch (e) {
core.setFailed(`Failed to assign ${author}: ${e.status ?? "unknown"} ${e.message}`);
}