Documentation
¶
Overview ¶
Package activity owns the M4 "activity" plugin. It walks the user's public events feed (REST /users/<login>/events) and surfaces a typed timeline of recent activity for the classic SVG.
Contracts: specs/004-m4-github-plugins/contracts/plugin-p1-mvp.md §2 Data model: specs/004-m4-github-plugins/data-model.md E-013
Index ¶
Constants ¶
const Name = "activity"
Name is the canonical plugin slug.
Variables ¶
var Plugin plugins.Plugin = &activityPlugin{}
Plugin is the singleton registered with the global plugin registry.
Functions ¶
Types ¶
type ActivityEvent ¶
type ActivityEvent struct {
Type string `json:"type"`
Repo string `json:"repo"`
Date time.Time `json:"date"`
Visibility string `json:"visibility"`
}
ActivityEvent mirrors one entry from the upstream events array.
type Result ¶
type Result struct {
Skipped bool `json:"skipped,omitempty"`
SkippedReason string `json:"-"`
Mode string `json:"mode,omitempty"`
Events []ActivityEvent `json:"events"`
Days int `json:"days"`
}
Result is the JSON payload the plugin publishes under data.Plugins["activity"]. Field set mirrors upstream data.plugins.activity.