done

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package done provides the "close" workflow shortcut — a combined close-with- reason command that adds a comment and then closes the issue in one step.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmd

func NewCmd(f *cmdutil.Factory) *cli.Command

NewCmd constructs the "close" command, which adds a closing reason as a comment and then closes the issue. This is a workflow shortcut that combines "comment add" and "state close" into a single step.

func Run

func Run(ctx context.Context, input RunInput) error

Run executes the done workflow: delegates to the service's CloseWithReason method, which atomically adds a comment with the reason text and closes the issue within a single transaction. The author for the closing comment is derived from the claim record by the service.

Types

type RunInput

type RunInput struct {
	Service driving.Service
	IssueID string
	ClaimID string
	Reason  string
	JSON    bool
	WriteTo io.Writer
}

RunInput holds the parameters for the done command's core logic, decoupled from CLI flag parsing so it can be tested directly. The command delegates to CloseWithReason, which derives the author from the claim record and performs the comment + close atomically.

Jump to

Keyboard shortcuts

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