Documentation
¶
Overview ¶
Package github provides types and utilities for interacting with GitHub issues and pull requests.
This package contains types for representing GitHub issues and pull requests, along with functionality to check their staleness (whether they are closed or no longer exist).
The staleness checking is used by the Gmail cleanup functionality to determine whether email threads related to GitHub issues/PRs should be archived.
Example usage:
issue := &github.GithubIssue{
Repo: "owner/repo",
Number: "123",
GithubUser: "username",
GithubToken: "token",
}
isStale, err := issue.IsStale()
if err != nil {
log.Fatal(err)
}
if isStale {
fmt.Println("Issue is closed or doesn't exist")
}
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GithubIssue ¶
type GithubIssue struct {
Repo string // "golang/go"
Number string // "123"
GithubUser string
GithubToken string
}
GithubIssue represents a GitHub issue
func (*GithubIssue) IsStale ¶
func (id *GithubIssue) IsStale() (bool, error)
IsStale checks if the GitHub issue is closed or doesn't exist
type GithubPull ¶
type GithubPull struct {
Repo string // "golang/go"
Number string // "123"
GithubUser string
GithubToken string
}
GithubPull represents a GitHub pull request
func (*GithubPull) IsStale ¶
func (id *GithubPull) IsStale() (bool, error)
IsStale checks if the GitHub pull request is closed or doesn't exist