Documentation
¶
Index ¶
- func LoadInstances(dir string) ([]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) GetIssue(ctx context.Context, key string) (*tracker.Issue, error)
- func (c *Client) ListComments(ctx context.Context, issueKey string) ([]tracker.Comment, error)
- func (c *Client) ListIssues(ctx context.Context, opts tracker.ListOptions) ([]tracker.Issue, error)
- func (c *Client) ListStatuses(ctx context.Context, key string) ([]tracker.Status, error)
- func (c *Client) SetHTTPDoer(doer apiclient.HTTPDoer)
- func (c *Client) TransitionIssue(ctx context.Context, key string, targetStatus string) error
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a Linear GraphQL 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) ListComments ¶
ListComments implements tracker.Commenter.
func (*Client) ListIssues ¶
ListIssues implements tracker.Lister.
func (*Client) ListStatuses ¶
ListStatuses implements tracker.StatusLister.
func (*Client) SetHTTPDoer ¶
SetHTTPDoer replaces the HTTP client used for API requests.
type Config ¶
type Config struct {
Name string `mapstructure:"name"`
URL string `mapstructure:"url"`
Token string `mapstructure:"token"`
Description string `mapstructure:"description"`
Safe bool `mapstructure:"safe"`
Projects []string `mapstructure:"projects"`
}
Config holds the configuration for a single Linear instance.
func LoadConfigs ¶
LoadConfigs reads a .humanconfig YAML file from dir and returns the list of configured Linear instances. Returns nil and no error if the file does not exist.