feat(io): add non-blocking TcpSocket/TcpServer over a poll reactor (roadmap 9.3, closes M9) #53
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: pr-metadata | |
| # Standing rule (AGENTS.md §6.4): every pull request automatically gets its author as | |
| # assignee and exactly one type label derived from the branch prefix (feat/ -> feat, chore/ -> | |
| # chore, ...). The roadmap milestone is NOT set here — it is chosen per PR by the author, who | |
| # knows which roadmap item the PR implements (GitHub milestones mirror the roadmap M1..M10). | |
| # Projects are populated separately by the repository Project's native "Auto-add to project" | |
| # workflow (docs/workflow/github-setup.md), because GITHUB_TOKEN cannot write GitHub Projects v2. | |
| # | |
| # Runs only for same-repo branches (a fork PR gets a read-only token and is curated by the | |
| # maintainer on merge). The job is idempotent: it only fills metadata that is missing. | |
| on: | |
| pull_request: | |
| types: [opened, reopened, ready_for_review, synchronize] | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| issues: write | |
| jobs: | |
| metadata: | |
| name: assignee + type label | |
| runs-on: ubuntu-24.04 | |
| if: github.event.pull_request.head.repo.full_name == github.repository | |
| steps: | |
| - name: Apply PR metadata | |
| uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 | |
| with: | |
| script: | | |
| const pr = context.payload.pull_request; | |
| const { owner, repo } = context.repo; | |
| const TYPES = ['feat', 'fix', 'refactor', 'perf', 'docs', 'test', 'build', 'chore', 'ci']; | |
| // 1. Assignee — the PR author (skip bots and already-assigned PRs). | |
| if (pr.assignees.length === 0 && pr.user && pr.user.type !== 'Bot') { | |
| await github.rest.issues.addAssignees({ | |
| owner, repo, issue_number: pr.number, assignees: [pr.user.login], | |
| }); | |
| core.info(`Assigned @${pr.user.login}`); | |
| } | |
| // 2. Exactly one type label, derived from the branch prefix. | |
| const prefix = (pr.head.ref.split('/')[0] || '').toLowerCase(); | |
| if (TYPES.includes(prefix)) { | |
| const present = pr.labels.map((l) => l.name); | |
| for (const t of present.filter((n) => TYPES.includes(n) && n !== prefix)) { | |
| await github.rest.issues.removeLabel({ owner, repo, issue_number: pr.number, name: t }) | |
| .catch(() => {}); | |
| } | |
| if (!present.includes(prefix)) { | |
| await github.rest.issues.addLabels({ owner, repo, issue_number: pr.number, labels: [prefix] }); | |
| core.info(`Applied type label '${prefix}'`); | |
| } | |
| } else { | |
| core.warning(`Branch prefix '${prefix}' is not a known type; no type label applied.`); | |
| } | |
| // The roadmap milestone is intentionally NOT set here: it is assigned per PR by the | |
| // author (it cannot be derived generically from a PR). See AGENTS.md §6.4 / ADR-0003. |