Documentation
¶
Index ¶
- type Client
- func (c *Client) GetCurrentUser() (string, error)
- func (c *Client) GetCurrentUserProject(projectName string, projectNumber int) (*Project, error)
- func (c *Client) GetCurrentUsername() (string, error)
- func (c *Client) GetFieldsWithOptions(projectID string) ([]Field, error)
- func (c *Client) GetProject(org string, projectName string, projectNumber int) (*Project, error)
- func (c *Client) GetProjectFields(projectID string) ([]Field, error)
- func (c *Client) GetProjectItemForIssue(projectID, issueID string) (*ProjectItemData, error)
- func (c *Client) GetProjectNodeID(org string, projectNumber int) (string, error)
- func (c *Client) GetRepoProjects(owner, repo string) ([]Project, error)
- func (c *Client) GetUserProject(username string, projectName string, projectNumber int) (*Project, error)
- func (c *Client) ListProjects(org string) ([]Project, error)
- func (c *Client) ListUserProjects(username string) ([]Project, error)
- type Field
- type FieldOption
- type Project
- type ProjectItemData
- type URLBuilder
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 (*Client) GetCurrentUser ¶ added in v0.0.3
GetCurrentUser is an alias for GetCurrentUsername for compatibility
func (*Client) GetCurrentUserProject ¶
GetCurrentUserProject fetches a project for the current authenticated user
func (*Client) GetCurrentUsername ¶
GetCurrentUsername gets the current authenticated user's username
func (*Client) GetFieldsWithOptions ¶
GetFieldsWithOptions fetches fields with their options including IDs
func (*Client) GetProject ¶
GetProject fetches a project by name or number
func (*Client) GetProjectFields ¶
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 ¶
GetProjectNodeID returns the node ID for a project
func (*Client) GetRepoProjects ¶
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 ¶
ListProjects lists all projects in an organization
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 ¶
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
type URLBuilder ¶ added in v0.3.0
type URLBuilder struct {
// contains filtered or unexported fields
}
URLBuilder helps build GitHub project URLs
func NewURLBuilder ¶ added in v0.3.0
func NewURLBuilder(cfg *config.Config, client *Client) *URLBuilder
NewURLBuilder creates a new URL builder
func (*URLBuilder) GetProjectItemURL ¶ added in v0.3.0
func (b *URLBuilder) GetProjectItemURL(itemDatabaseID int) string
GetProjectItemURL returns the URL for a specific project item (issue/PR)
func (*URLBuilder) GetProjectItemURLFromIssueID ¶ added in v0.3.0
func (b *URLBuilder) GetProjectItemURLFromIssueID(issueNodeID string, issueClient interface { GetProjectItemID(string, string) (string, int, error) }) string
GetProjectItemURLFromIssueID returns the project URL for an issue given its node ID
func (*URLBuilder) GetProjectURL ¶ added in v0.3.0
func (b *URLBuilder) GetProjectURL() string
GetProjectURL returns the base project URL