Documentation
¶
Overview ¶
Package claim is a desk's claim of an issue as GitHub carries it: one marker comment per issue and desk, which every desk working the same repository reads, whatever its configuration, board or machine.
The comment's first line is the marker, an HTML comment GitHub does not render; a sentence for people follows it:
<!-- beekeeper:claim desk=platform-desk session=0b5c… at=2026-11-01T00:12:00Z seen=2026-11-01T06:12:00Z --> Claimed by beekeeper desk platform-desk for session "0b5c…" since 2026-11-01 00:12 UTC.
A desk refreshes seen while its claim holds and adds released=<time> when the claim ends; it edits its one comment in place, never adding another.
Index ¶
- Variables
- type Client
- func (c *Client) Delete(ctx context.Context, issue string, id int64) error
- func (c *Client) Edit(ctx context.Context, issue string, id int64, m Marker) error
- func (c *Client) Post(ctx context.Context, issue string, m Marker) (int64, error)
- func (c *Client) Pull(ctx context.Context, issue string) (bool, error)
- func (c *Client) Read(ctx context.Context, issue string) ([]Comment, error)
- type Comment
- type Marker
Constants ¶
This section is empty.
Variables ¶
var ErrGone = errors.New("the claim's comment is gone")
ErrGone is the answer to an edit of a comment GitHub no longer has.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client reads and writes the marker comments of issues through GitHub's REST API, acting on each issue's repository (github.ActingOn). A read sends the ETag of the last answer for the issue (Cache, a JSON file; none when empty): an unchanged thread costs no rate limit.
func (*Client) Delete ¶
Delete removes comment id on issue; ErrGone when GitHub has no such comment.
func (*Client) Edit ¶
Edit replaces comment id on issue with m; ErrGone when GitHub has no such comment.
type Comment ¶
Comment is a marker comment as GitHub keeps it: its id and its marker.
type Marker ¶
Marker is one desk's claim of an issue: the desk's configured name, the session holding it, since when, when the desk last refreshed it and, once it ended, when.
func Parse ¶
Parse reads the marker a comment's body opens with; ok is false for any other comment, or a marker without a desk or a valid time.