Documentation
¶
Overview ¶
Package ghevent appends entries to the Redis stream ev:github and reads them back.
Every entry has the fields repo, kind, number, head, action, at, sender, comment_id. Four kinds add their own fields, always all of them, empty included: pull_request adds branch, base and merged (closed only: true or false); issues adds labels (a JSON array of the issue's label names after the change), body, state and state_reason; workflow_run adds run_id, workflow, status and conclusion; check_run adds check (check_run.name), check_run_id (check_run.id), status and conclusion; runner rows are keyed by check name and ordered by attempt id and status.
Index ¶
Constants ¶
const Stream = gheventwire.Stream
Stream is the Redis stream every carried delivery is appended to.
Variables ¶
This section is empty.
Functions ¶
func Fields ¶
Fields is the stream entry's key set for e: the eight common fields, plus the issues, workflow_run, check_run or pull_request fields for those kinds.
Types ¶
type Entry ¶
type Entry struct {
Repo string
Kind string
Number string
Head string
Action string
At string
Sender string
CommentID string
// issues only.
Labels []string
Body string
State string
StateReason string
// workflow_run only.
RunID string
Workflow string
// pull_request only (card pr-record-follows-github): the head branch,
// the base branch and, on closed, "true" when the PR merged ("false"
// otherwise, "" on the other actions).
Branch string
Base string
Merged string
// check_run only: the check's name and its id (a decimal string).
Check string
CheckRunID string
// workflow_run and check_run.
Status string
Conclusion string
}
Entry is one ev:github record. Number and CommentID are decimal strings, empty when the payload has none, so a missing pull request is not number 0.