actions-reporting
Use when reporting what a GitHub Action or GitHub API caller did — workflow-command logs, a job summary, a GitHub check run, a sticky pull-request comment, or a living markdown document of check state. Also use when: check run, job summary, sticky comment, CommentMarker, log group, notice annotation, workflow command, findings table, managed document, check state, ActionLogger, GitHubMarkdown, CheckDocument, PullRequestComment, ReportBuilder, ErrorAccumulator
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 8
- Forks
- 2
01 前言 Front Matter
- name
- actions-reporting
- description
- Use when reporting what a GitHub Action or GitHub API caller did — workflow-command logs, a job summary, a GitHub check run, a sticky pull-request comment, or a living markdown document of check state. Also use when: check run, job summary, sticky comment, CommentMarker, log group, notice annotation, workflow command, findings table, managed document, check state, ActionLogger, GitHubMarkdown, CheckDocument, PullRequestComment, ReportBuilder, ErrorAccumulator
02 资源文件 3
- 参考文档references/check-runs-and-comments.md11.7 KB
- 参考文档references/logging-contract.md8.5 KB
- 参考文档references/managed-sections.md7.0 KB
03 SKILL.md 正文
Actions reporting
One surface — Effect.log* or a value a program already has — and four sinks: the runner log (workflow commands), the job summary, a GitHub check run, a sticky pull-request comment. The first two live in @effected/github-actions (ActionLogger, WorkflowCommand, ActionOutputs); the last two live in @effected/github (CheckRun, PullRequestComment). A GFM writer, a marker-delimited document primitive, and a debounced check-state reconciler sit between "a value my program has" and the comment/description sinks.
For the general Effect.log*/span rules every package follows, see effect-v4-observability; for Context.Service/Layer mechanics, see effect-v4-services-layers; for the rest of the runtime, see actions-runtime; for inputs and the rest of ActionOutputs, see actions-inputs-outputs; for Redacted and masking mechanics, see actions-state-and-secrets; for the REST/GraphQL client itself, see github-api; for test doubles, see testing-actions.
What you have
| Construct | Import | Reach for it when |
|---|---|---|
ActionLogger.group / .heading / .withBuffer / .withStep / .notice / .annotated |
import { ActionLogger } from "@effected/github-actions" |
grouping log output, a phase header over groups that opens none, holding a quiet-green transcript, or attaching source annotations to Effect.log* |
WorkflowCommand |
same (re-exported from @effected/github-commands) |
rendering a command's exact wire text with no runner or service — mostly internal |
CommandNeutralizer |
import { CommandNeutralizer } from "@effected/github-commands" |
writing text you did not author (an error message, file contents) to the log by a route other than ActionLogger, so the runner never reads it as a command |
ActionOutputs.summary / .setSecret |
import { ActionOutputs } from "@effected/github-actions" |
writing the job summary, or masking a value in the runner's log filter |
CheckRun.withCheckRun / .create / .update / .complete |
import { CheckRun } from "@effected/github" |
creating, updating or reaching a terminal state on a GitHub check run |
PullRequestComment.upsert / CommentMarker |
import { PullRequestComment, CommentMarker } from "@effected/github" |
posting or updating a sticky, marker-findable PR comment |
GitHubMarkdown.table / .tableFor / .heading / … |
import { GitHubMarkdown } from "@effected/github-actions" |
rendering GFM fragments — a findings table, a heading, a code block |
ManagedDocument |
import { ManagedDocument } from "@effected/github-actions" |
maintaining marker-delimited regions inside text a human also edits |
CheckDocument / CheckState / projectCheckState |
import { CheckDocument, CheckState } from "@effected/github-actions" |
reconciling changing check state onto one living document, push-based |
Standards
- Design reporting on one stack.
GitHubMarkdown,CheckState,CheckDocumentandManagedDocumentcover check runs, sticky comments and PR descriptions together — reach for a shim only when the installed kit genuinely lacks a piece, never a hand-rolled namespace object duplicating what the stack already covers. - Write the logging contract deliberately: a run-context opening block, a
Step: X — SKIPPED: <reason>line for every skipped step (never silence), warnings reserved for acceptance signals rather than routine status, and a closing result block. Enforce it with a test that asserts on the captured log stream — the log is the decision record a later reader trusts. - Reuse
ActionLogger.annotatedfor source annotations rather than spelling a runner variable name by hand. The readable field names (startLine,endLine, …) are this package's vocabulary; onlyWorkflowCommand's private mapper turns them into GitHub's wire abbreviations. - Let
CheckRun.withCheckRun's bracket reach a terminal state; callconcludewhen the verdict isn't a plain pass/fail. The bracket always concludes from theExitunlessuserecords a verdict — that's howneutral,timed_out,action_requiredandskippedbecome reachable without dropping to a rawcreate/completepair. - Treat check-run output and comment payloads as budgeted, at design time.
CheckRunOutput's 65535-byte cap is automatic on everyupdate/complete, but a program that assembles a large findings table should design its own truncation rather than discover the cap at runtime. - Follow the five managed-section rules for any sticky comment or PR description: write the running state before doing the work, never blank a section, sha-stamp staleness, keep sections independent, write monotonically. See
references/managed-sections.md. - Reach for
Effect.partitioninstead of a hand-rolled accumulator when fanning out over a collection. It runs every effect and never fails, returning[successes, failures]in one call.
Footguns
Info-level logs are deliberately plain text with no workflow command — prefixing every informational line would turn it into an annotation in the workflow summary. There is no ANSI/colour API to reach for either; GitHub's log viewer colours the commands itself.Effect.logDebugrenders as::debug::only if it survives core'sMinimumLogLevelfilter first.Action.runlowers that level toDebugunderRUNNER_DEBUG=1— do not hand-wire it — but a program that opted out (stepDebugLogLevel: false) or runs outsideAction.run, such as a test, keeps core'sInfodefault and drops every debug entry. Seeactions-runtime's logging reference.- Passing a bare object literal where a
CheckRunOutputis expected fails to compile with an error naming a missingtruncatedproperty — that's the instance method, not a data field; construct throughCheckRunOutput.makeinstead. Seereferences/check-runs-and-comments.md. finding a marked PR comment must paginate — a single-page lookup silently misses a marker past the first page on a busy pull request and duplicates the comment on everyupsert. Seereferences/check-runs-and-comments.md.
Additional resources
- references/check-runs-and-comments.md — the full
CheckRunbracket contract (terminal-state guarantee,conclude's four properties, the explicit-call alternatives),CheckRunOutput's truncation and construction traps, andPullRequestComment's full member table with the pagination fix. Load when: creating, updating or completing a check run, or reading/writing a sticky pull-request comment. - references/logging-contract.md — the run-context block, skip-reason line convention, and the log-stream test pattern that enforces a logging contract as executable rather than aspirational. Load when: designing or reviewing an action's log output as a decision record.
- references/managed-sections.md — the five managed-section rules in full,
ManagedDocument's region-replacement contract and its structural error taxonomy, and the payload-budget design step for check output and comment bodies. Load when: building a sticky comment, a managed PR description, or any document a human and an action both write to.
04 同仓库更多 Skills
testing-actions
Use when writing or reviewing tests for @effected/github-actions, @effected/github, @effected/sbom or @effected/commands — stubbing the GitHub API, writing a service's layerTest or makeTest double, testing the pre/main/post lifecycle through Action.run, or debugging why a test hits the real network or hangs.
supply-chain-attestation
Use when generating a CycloneDX SBOM, checking NTIA minimum elements, building an in-toto statement or a SLSA provenance predicate, signing into a Sigstore DSSE bundle, or uploading an attestation to GitHub.
structuring-an-action
Use when laying out a new GitHub Action repository on the @effected suite, deciding where a piece of code belongs (an entry point, a step, a shared service, a shim), or reviewing an existing action's file structure against the canonical shape.
running-commands-and-tools
Use when running a subprocess in Effect v4, spawning a command, capturing stdout/stderr/exit code, checking whether a CLI tool is installed or which copy to run, running a package-manager script through the project's launcher, detaching a background process, or redacting a secret from argv or captured output.
release-and-publish
Use when publishing a package to npm, reading the npm registry from Effect v4, checking whether a version is already published, cutting a release tag or GitHub release from an action, applying a release-age gate, or deriving tracking tags for GitHub Actions distribution.
hardening-a-parser-port
Use when porting or writing a recursive-descent parser, lexer, or tree-walker over untrusted text in the @effected monorepo — the class of hardening the cloud reviewer scans for on every migration. Covers stack-overflow depth guards (on EVERY recursion surface, which a facade has N of — not two), numeric bound guards that must reject NaN and non-integers, code-point range checks scoped to formats with wide escapes, prototype-pollution, control-character rejection, and the invariant that malformed input must fail through the typed error channel, never as an unhandled defect.