Documentation
¶
Index ¶
- func LoadInstances(dir string) ([]tracker.Instance, error)
- func LoadInstancesWithLookup(dir string, lookup config.EnvLookup) ([]tracker.Instance, error)
- func LoadInstancesWithResolver(dir string, lookup config.EnvLookup, resolver config.SecretResolveFunc) ([]tracker.Instance, error)
- type Client
- func (c *Client) AddComment(ctx context.Context, issueKey string, body string) (*tracker.Comment, error)
- func (c *Client) AssignIssue(ctx context.Context, key string, userID string) error
- func (c *Client) CreateIssue(ctx context.Context, issue *tracker.Issue) (*tracker.Issue, error)
- func (c *Client) DeleteIssue(ctx context.Context, key string) error
- func (c *Client) EditIssue(ctx context.Context, key string, opts tracker.EditOptions) (*tracker.Issue, error)
- func (c *Client) GetCurrentUser(ctx context.Context) (string, error)
- func (c *Client) GetCustomFields(ctx context.Context, key string) ([]CustomFieldValue, error)
- func (c *Client) GetIssue(ctx context.Context, key string) (*tracker.Issue, error)
- func (c *Client) GetMarkdownDescription(ctx context.Context, key string) (string, error)
- func (c *Client) ListComments(ctx context.Context, issueKey string) ([]tracker.Comment, error)
- func (c *Client) ListFolderlessLists(ctx context.Context, spaceID string) ([]List, error)
- func (c *Client) ListFolders(ctx context.Context, spaceID string) ([]Folder, error)
- func (c *Client) ListIssues(ctx context.Context, opts tracker.ListOptions) ([]tracker.Issue, error)
- func (c *Client) ListLists(ctx context.Context, folderID string) ([]List, error)
- func (c *Client) ListSpaces(ctx context.Context, teamID string) ([]Space, error)
- func (c *Client) ListStatuses(ctx context.Context, key string) ([]tracker.Status, error)
- func (c *Client) ListWorkspaceMembers(ctx context.Context, teamID string) ([]Member, error)
- func (c *Client) SetCustomField(ctx context.Context, taskID, fieldID string, value any) error
- func (c *Client) SetHTTPDoer(doer apiclient.HTTPDoer)
- func (c *Client) SetMarkdownDescription(ctx context.Context, key string, markdown string) error
- func (c *Client) TeamID() string
- func (c *Client) TransitionIssue(ctx context.Context, key string, targetStatus string) error
- type Config
- type CustomFieldValue
- type Folder
- type List
- type Member
- type Space
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadInstances ¶
LoadInstances reads config, applies env overrides, creates clients, and returns ready-to-use tracker instances.
func LoadInstancesWithLookup ¶
LoadInstancesWithLookup is like LoadInstances but uses a custom env lookup function for per-project token scoping.
func LoadInstancesWithResolver ¶
func LoadInstancesWithResolver(dir string, lookup config.EnvLookup, resolver config.SecretResolveFunc) ([]tracker.Instance, error)
LoadInstancesWithResolver is like LoadInstances but uses a custom env lookup and a vault secret resolver for 1pw:// references.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a ClickUp REST API client that implements tracker.Provider.
func (*Client) AddComment ¶
func (c *Client) AddComment(ctx context.Context, issueKey string, body string) (*tracker.Comment, error)
AddComment implements tracker.Commenter.
func (*Client) AssignIssue ¶
AssignIssue implements tracker.Assigner.
func (*Client) CreateIssue ¶
CreateIssue implements tracker.Creator.
func (*Client) DeleteIssue ¶
DeleteIssue implements tracker.Deleter.
func (*Client) EditIssue ¶
func (c *Client) EditIssue(ctx context.Context, key string, opts tracker.EditOptions) (*tracker.Issue, error)
EditIssue implements tracker.Editor.
func (*Client) GetCurrentUser ¶
GetCurrentUser implements tracker.CurrentUserGetter.
func (*Client) GetCustomFields ¶
GetCustomFields returns the custom field values on a task.
func (*Client) GetMarkdownDescription ¶
GetMarkdownDescription fetches the task's markdown description source.
func (*Client) ListComments ¶
ListComments implements tracker.Commenter.
func (*Client) ListFolderlessLists ¶
ListFolderlessLists lists all lists directly under a space (not inside a folder).
func (*Client) ListFolders ¶
ListFolders lists all folders in the given space.
func (*Client) ListIssues ¶
ListIssues implements tracker.Lister using GET /api/v2/list/{list_id}/task with pagination. Requires opts.Project to be set (= ClickUp list ID).
func (*Client) ListSpaces ¶
ListSpaces lists all spaces in the workspace identified by teamID.
func (*Client) ListStatuses ¶
ListStatuses implements tracker.StatusLister. Fetches the task to find its list ID, then fetches the list to get statuses.
func (*Client) ListWorkspaceMembers ¶
ListWorkspaceMembers lists all members of the workspace.
func (*Client) SetCustomField ¶
SetCustomField sets a custom field value on a task.
func (*Client) SetHTTPDoer ¶
SetHTTPDoer replaces the HTTP client used for API requests.
func (*Client) SetMarkdownDescription ¶
SetMarkdownDescription updates the task's markdown description.
type Config ¶
type Config struct {
Name string `mapstructure:"name"`
URL string `mapstructure:"url"`
Token string `mapstructure:"token"`
TeamID string `mapstructure:"team_id"`
Description string `mapstructure:"description"`
Role string `mapstructure:"role"`
Safe bool `mapstructure:"safe"`
Projects []string `mapstructure:"projects"`
}
Config holds the configuration for a single ClickUp instance.
func LoadConfigs ¶
LoadConfigs reads a .humanconfig YAML file from dir and returns the list of configured ClickUp instances. Returns nil and no error if the file does not exist.
type CustomFieldValue ¶
type CustomFieldValue struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Value any `json:"value"`
Required bool `json:"required"`
}
CustomFieldValue is a public representation of a custom field value on a task.