changelog

package
v0.0.0-...-d345545 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package changelog implements basic auditing methods on public repositories.

Package changelog implements basic auditing methods on public repositories.

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
}

Client wraps a github client.

func NewClient

func NewClient(client *http.Client) Client

NewClient returns new github client.

func (*Client) GetChangelog

func (c *Client) GetChangelog(ctx context.Context, owner, repo, sha string) ([]Commit, error)

GetChangelog of a repository github.com/<owner>/<repo> from <sha> to HEAD on the default branch. If sha is HEAD, then the commit at HEAD is returned.

type Commit

type Commit struct {
	SHA, Message string
}

Commit represents a single commit in a GitHub repository.

func (Commit) CommitBody

func (c Commit) CommitBody() string

CommitBody returns body of a commit message without the first line returned from FirstLine(). Body of the message is already shifted to the right with a single '\t'.

func (Commit) FirstLine

func (c Commit) FirstLine() string

FirstLine returns the first line of the commit message.

func (Commit) String

func (c Commit) String() string

Jump to

Keyboard shortcuts

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