closeissues

package
v0.15.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 9 Imported by: 0

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

func (c *Controller) Close(ctx context.Context, logger *slog.Logger) error

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, or one that kept failing, 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.

type Registry

type Registry interface {
	Version(ctx context.Context, pkgName, version string) (*aquag2.Registry, error)
}

Registry is what the registry serves for a version of a package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL