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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址