github

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: BSD-3-Clause Imports: 4 Imported by: 0

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

Jump to

Keyboard shortcuts

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