github

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateClient

func CreateClient() *githubv4.Client

func IsLatestRelease

func IsLatestRelease(latestRelease string) bool

func LatestRelease

func LatestRelease() (string, error)

func LatestReleaseOf

func LatestReleaseOf(owner, repo string) (string, error)

Types

type AssociatedPRsQuery

type AssociatedPRsQuery struct {
	Repository struct {
		DefaultBranch struct {
			Target struct {
				Commit struct {
					Oid     string
					History struct {
						Nodes []struct {
							Oid             string
							MessageHeadline string
							AuthoredDate    githubv4.DateTime
							Author          struct {
								User struct {
									Login string
								}
							}
							AssociatedPullRequests struct {
								Nodes []struct {
									Title     string
									Number    int
									Permalink string
									Author    struct {
										Login string
									}
									Labels struct {
										Nodes []struct {
											Name string
										}
									} `graphql:"labels(first: 8)"`
								}
							} `graphql:"associatedPullRequests(first: 4)"`
						}
					} `graphql:"history(since: $createdAt)"`
				} `graphql:"... on Commit"`
			} `graphql:"target"`
		} `graphql:"defaultBranchRef"`
	} `graphql:"repository(owner: $owner, name: $name)"`
}

type Commit

type Commit struct {
	Hash            string
	MessageHeadline string
	Author          string
	CreatedAt       githubv4.DateTime
}

type MatchingCommitQuery

type MatchingCommitQuery struct {
	Repository struct {
		Object struct {
			Commit struct {
				Oid           string
				CommittedDate githubv4.DateTime
			} `graphql:"... on Commit"`
		} `graphql:"object(expression: $expr)"`
	} `graphql:"repository(owner: $owner, name: $name)"`
}

func FindMatchingCommit

func FindMatchingCommit(client *githubv4.Client, repo []string, ref string) MatchingCommitQuery

type PullRequest

type PullRequest struct {
	RelatedCommit Commit
	Title         string
	Number        int
	Permalink     string
	Author        string
	Labels        []string
}

PullRequest is a type holding relevant information about pull request used in generating changelog

func FindAssociatedPRs

func FindAssociatedPRs(client *githubv4.Client, repo []string, matchingCommit MatchingCommitQuery) []PullRequest

Jump to

Keyboard shortcuts

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