ghcomment

package module
v0.0.0-...-e86a3d2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: MIT Imports: 7 Imported by: 0

README

* =ghcomment= - comment on GitHub pull requests and issues from the CLI
This is a simple program that allows you to leave comments on GitHub issues and pull requests in a very simple manner, optionally also hiding previous comments that match a given regular expression.

** Usage
#+begin_src shell
  ghcomment -owner inkel -repo ghcomment \
            -nr 1 \
            -token $token \
            -body="your comment's body" \
            -hide-regexp='^this'
#+end_src

The program accepts the following flags:
- =owner= and =repo= are the owner and repository name.
- =nr= is the pull request or issue number.
- =token= is your GitHub [[https://github.com/settings/tokens?type=beta][access token]].
- =body= should be your comment's Markdown body; you can add a =@= character and use a file path instead.
- =hide-regexp= is an optional regular expression used to match any previous comments and hide them.

** LICENSE
MIT. See [LICENSE](LICENSE).

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(ctx context.Context, c *http.Client) Client

func (Client) Comment

func (c Client) Comment(ctx context.Context, org, repo string, nr int, body string) error

func (Client) HideCommentsMatching

func (c Client) HideCommentsMatching(ctx context.Context, org, repo string, nr int, re *regexp.Regexp) error

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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