Documentation
¶
Overview ¶
Package publish posts the GitHub plugin's approved drafts as issue comments on their pull request.
Index ¶
- type Publisher
- func (p *Publisher) Place(context.Context, src.Draft) (string, error)
- func (p *Publisher) Publish(ctx context.Context, d src.Draft) (src.Evidence, error)
- func (p *Publisher) Validate(ctx context.Context, d src.Draft) error
- func (p *Publisher) Verify(ctx context.Context, d src.Draft, startedAt time.Time) (src.Evidence, bool, error)
- func (p *Publisher) Where(ctx context.Context, d src.Draft) (string, error)
- type REST
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Publisher ¶
type Publisher struct {
GH REST
Viewer func(ctx context.Context) (string, error)
// People are the persons the unit's items name, for mentions of other
// providers.
People func(ctx context.Context, u sdk.Unit) ([]src.Person, error)
// Record keeps an event on the host.
Record func(ctx context.Context, ev src.Event) error
Now func() time.Time
Log func(format string, args ...any)
}
Publisher posts GitHub drafts as issue comments on their pull request.
func (*Publisher) Publish ¶
Publish posts d as a comment. A nudge then records its nudged event, as the nudge intent does, so the comment reads as a nudge; a refused post records none.
func (*Publisher) Validate ¶
Validate refuses a draft GitHub cannot take as a comment on the draft's own pull request.