cmcm

package module
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 15 Imported by: 0

README

gh-cmcm

gh-cmcm (commit comment) is a gh extension which comments to a commit by GitHub API.

Installation

gh extension install johnmanjiro13/gh-cmcm

Usage

Authorization

If you use github enterprise, you need to set your api base url to GITHUB_BASE_URL environment variable.

Create a comment
gh cmcm create <commit_sha> --body 'Comment by cli'
Get a comment
gh cmcm get <comment_id>

You can use the --json flag if you want to get result as json.

List comments
gh cmcm list <comment_id>

You can use the --json flag if you want to get result as json.

Update a comment
gh cmcm update <comment_id> --body 'Updated comment by cli'
Delete a comment
gh cmcm delete <comment_id>

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidOutputFormat = errors.New("invalid output format")

Functions

func NewRootCmd

func NewRootCmd() (*cobra.Command, error)

Types

type Comment

type Comment struct {
	ID      int64  `json:"id"`
	Body    string `json:"body"`
	Author  string `json:"author"`
	HTMLURL string `json:"html_url"`
}

type OutputFormat

type OutputFormat string
const (
	Plain OutputFormat = "plain"
	JSON  OutputFormat = "json"
)

func ParseOutputFormat

func ParseOutputFormat(s string) (OutputFormat, error)

func (OutputFormat) String

func (o OutputFormat) String() string

func (OutputFormat) Valid

func (o OutputFormat) Valid() error

Directories

Path Synopsis
cmd
gh-cmcm command

Jump to

Keyboard shortcuts

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