Documentation
¶
Overview ¶
Package issues2markdown queries issues and renders the result to markdown following the Github flavored Markdown task lists format described at https://help.github.com/articles/about-task-lists/.
Index ¶
Constants ¶
const ( // DefaultIssueTemplate is the default template to render a list of issues in Markdown DefaultIssueTemplate = `` /* 165-byte string literal not displayed */ )
const ( // DefaultQuery is the default query to be used if none is provided on the // CLI arguments. DefaultQuery = `type:issue is:open author:{{ .Organization }} archived:false` )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Issue ¶
Issue represents an Issue from the provider
func (*Issue) GetOrganization ¶
GetOrganization return the organization name for this Issue
func (*Issue) GetRepository ¶
GetRepository return the repository name for this Issue
type IssuesToMarkdown ¶
type IssuesToMarkdown struct {
GithubToken string
User *github.User
// contains filtered or unexported fields
}
IssuesToMarkdown is the main type to interact, query and render issues to Markdown
func NewIssuesToMarkdown ¶
func NewIssuesToMarkdown(provider *github.Client) (*IssuesToMarkdown, error)
NewIssuesToMarkdown creates an IssuesToMarkdown instance
func (*IssuesToMarkdown) Authorize ¶
func (im *IssuesToMarkdown) Authorize() (*github.User, error)
Authorize gets authentication information
func (*IssuesToMarkdown) Query ¶
func (im *IssuesToMarkdown) Query(options *QueryOptions, q string) ([]Issue, error)
Query queries the provider and returns the list of Issues that match the query
func (*IssuesToMarkdown) Render ¶
func (im *IssuesToMarkdown) Render(issues []Issue, options *RenderOptions) (string, error)
Render renders a list of Issues to Markdown
type QueryOptions ¶
type QueryOptions struct {
Organization string
}
QueryOptions are the available options to modify the query of issues
func NewQueryOptions ¶
func NewQueryOptions() *QueryOptions
NewQueryOptions creates a new QueryOptions instance with sensible defaults
func (*QueryOptions) BuildQuey ¶
func (qo *QueryOptions) BuildQuey(q string) string
BuildQuey builds the query string to query issues
It modifies the default query according the proviced query options
type RenderOptions ¶
type RenderOptions struct {
TemplateSource string
}
RenderOptions are the available options to modify the rendering of issues
func NewRenderOptions ¶
func NewRenderOptions() *RenderOptions
NewRenderOptions creates a new RenderOptions instance with sensible defaults