project

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

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 is a wrapper around GitHub API client

func NewClient

func NewClient() (*Client, error)

NewClient creates a new project client

func (*Client) GetCurrentUser added in v0.0.3

func (c *Client) GetCurrentUser() (string, error)

GetCurrentUser is an alias for GetCurrentUsername for compatibility

func (*Client) GetCurrentUserProject

func (c *Client) GetCurrentUserProject(projectName string, projectNumber int) (*Project, error)

GetCurrentUserProject fetches a project for the current authenticated user

func (*Client) GetCurrentUsername

func (c *Client) GetCurrentUsername() (string, error)

GetCurrentUsername gets the current authenticated user's username

func (*Client) GetFieldsWithOptions

func (c *Client) GetFieldsWithOptions(projectID string) ([]Field, error)

GetFieldsWithOptions fetches fields with their options including IDs

func (*Client) GetProject

func (c *Client) GetProject(org string, projectName string, projectNumber int) (*Project, error)

GetProject fetches a project by name or number

func (*Client) GetProjectFields

func (c *Client) GetProjectFields(projectID string) ([]Field, error)

GetProjectFields fetches all fields for a project

func (*Client) GetProjectItemForIssue added in v0.0.5

func (c *Client) GetProjectItemForIssue(projectID, issueID string) (*ProjectItemData, error)

GetProjectItemForIssue retrieves the project item for a specific issue

func (*Client) GetProjectNodeID

func (c *Client) GetProjectNodeID(org string, projectNumber int) (string, error)

GetProjectNodeID returns the node ID for a project

func (*Client) GetRepoProjects

func (c *Client) GetRepoProjects(owner, repo string) ([]Project, error)

GetRepoProjects fetches all projects associated with a repository

func (*Client) GetUserProject

func (c *Client) GetUserProject(username string, projectName string, projectNumber int) (*Project, error)

GetUserProject fetches a project by name or number for a user

func (*Client) ListProjects

func (c *Client) ListProjects(org string) ([]Project, error)

ListProjects lists all projects in an organization

func (*Client) ListUserProjects

func (c *Client) ListUserProjects(username string) ([]Project, error)

ListUserProjects lists all projects for a user

type Field

type Field struct {
	ID       string        `json:"id"`
	Name     string        `json:"name"`
	DataType string        `json:"dataType"`
	Options  []FieldOption `json:"options,omitempty"`
}

Field represents a project field

type FieldOption

type FieldOption struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

FieldOption represents an option for a single-select field

type Project

type Project struct {
	ID     string `json:"id"`
	Number int    `json:"number"`
	Title  string `json:"title"`
	URL    string `json:"url"`
	Owner  struct {
		Login string `json:"login"`
		Type  string `json:"__typename"`
	} `json:"owner"`
}

Project represents a GitHub Project v2

type ProjectItemData added in v0.0.5

type ProjectItemData struct {
	ID          string                 `json:"id"`
	DatabaseID  int                    `json:"databaseId"`
	FieldValues map[string]interface{} `json:"fieldValues"`
}

ProjectItemData represents a project item with its data

Jump to

Keyboard shortcuts

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