comment

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package comment implements the PR comment command

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdComment

func NewCmdComment(f *cmdutil.Factory, runF func(*CommentOptions) error) *cobra.Command

NewCmdComment creates the comment command

Types

type CommentOptions

type CommentOptions struct {
	IO         *iostreams.IOStreams
	HttpClient func() (*http.Client, error)
	BaseRepo   func() (string, error)

	// Arguments
	Repository string
	Number     int

	// Flags
	Body     string
	BodyFile string
	Path     string // File path for inline comment
	Position int    // Line number in the new version of the file (new side of the diff) for inline comment
	JSON     bool
}

type CommentResult added in v0.5.0

type CommentResult struct {
	ID        string `json:"id"`
	URL       string `json:"url"`
	Author    string `json:"author,omitempty"`
	CreatedAt string `json:"created_at,omitempty"`
	Path      string `json:"path,omitempty"`
	Position  int    `json:"position,omitempty"`
	Body      string `json:"body"`
}

CommentResult represents the JSON output for pr comment

Source Files

  • comment.go

Directories

Path Synopsis
Package delete implements the PR comment delete command
Package delete implements the PR comment delete command
Package edit implements the PR comment edit command
Package edit implements the PR comment edit command
Package resolve implements the PR comment resolve/unresolve commands
Package resolve implements the PR comment resolve/unresolve commands

Jump to

Keyboard shortcuts

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