Documentation
¶
Overview ¶
Package closeissues closes the issues ar2 opened once what they are about is resolved.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller closes the resolved issues.
func New ¶
func New(issues Issues, registry Registry, owner, repo string) *Controller
New creates a Controller.
func (*Controller) Close ¶
Close closes every open issue ar2 opened whose every version and environment is resolved.
What an issue is about is read from the records ar2 wrote into it and into each comment it added, and asked of what the default branch serves: an environment left out is resolved once the version's file covers it again, or the version is no longer served at all, and a version a check of integrity stopped is resolved once it is served. An issue saying something nothing has resolved yet stays open, and so does one holding no record, which is one written before the records were.
func (*Controller) DryRun ¶
func (c *Controller) DryRun()
DryRun makes Close say which issues it would close and close none.
type Issues ¶
type Issues interface {
ListByRepo(ctx context.Context, owner, repo string, opts *gogithub.IssueListByRepoOptions) ([]*gogithub.Issue, *gogithub.Response, error)
ListComments(ctx context.Context, owner, repo string, number int, opts *gogithub.IssueListCommentsOptions) ([]*gogithub.IssueComment, *gogithub.Response, error)
CreateComment(ctx context.Context, owner, repo string, number int, comment gogithub.IssueCommentRequest) (*gogithub.IssueComment, *gogithub.Response, error)
Update(ctx context.Context, owner, repo string, number int, issue gogithub.UpdateIssueRequest) (*gogithub.Issue, *gogithub.Response, error)
}
Issues is the repository's issues.