github

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompleteIssueFromTodo

func CompleteIssueFromTodo(todoDir string, todoItem *todo.Todo) error

func SyncAllGitHubProjects

func SyncAllGitHubProjects(todoDir string) error

func SyncCompletedTodos

func SyncCompletedTodos(todoDir string) error

func SyncGitHubProject

func SyncGitHubProject(todoDir string, projectName string) error

func SyncIssues

func SyncIssues(todoDir string, organization string, projectNumber int, statusFilters []string) error

Types

type Client

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

func NewClient

func NewClient(org string) (*Client, error)

func (*Client) CloseIssue

func (c *Client) CloseIssue(repoName string, issueNumber int) error

func (*Client) GetProjectIssues

func (c *Client) GetProjectIssues(projectNumber int, status string) ([]ProjectIssue, error)

func (*Client) GetProjectV2Issues

func (c *Client) GetProjectV2Issues(projectNumber int, statusFilters []string) ([]IssueWithStatus, error)

func (*Client) GetReviewRequests

func (c *Client) GetReviewRequests() ([]PullRequestInfo, error)

GetReviewRequests fetches open pull requests where the current user is requested to review

func (*Client) GetUserPullRequests

func (c *Client) GetUserPullRequests() ([]PullRequestInfo, error)

GetUserPullRequests fetches open pull requests created by or assigned to the current user

func (*Client) UpdateIssueFromURL

func (c *Client) UpdateIssueFromURL(issueURL string) error

func (*Client) UpdateProjectItemStatus

func (c *Client) UpdateProjectItemStatus(projectNumber int, projectItemID string, newStatus string) error

type IssueWithStatus

type IssueWithStatus struct {
	ProjectIssue
	GitHubStatus  string
	ProjectItemID string
	UpdatedAt     time.Time
}

type ProjectIssue

type ProjectIssue struct {
	ID        int
	Title     string
	Body      string
	Number    int
	State     string
	URL       string
	Labels    []string
	UpdatedAt time.Time
}

type ProjectMetadata

type ProjectMetadata struct {
	ID            string
	StatusFieldID string
	StatusOptions map[string]string
}

type PullRequestInfo

type PullRequestInfo struct {
	ID        int
	Title     string
	Body      string
	Number    int
	State     string
	URL       string
	RepoOwner string
	RepoName  string
	Labels    []string
	UpdatedAt time.Time
	IsDraft   bool
	IsReview  bool // true if this is a review request, false if it's the user's PR
}

Jump to

Keyboard shortcuts

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