Documentation
¶
Index ¶
- func DiscussionToMarkdown(d *github.Discussion) (string, error)
- func IssueToMarkdown(issue *github.Issue) (string, error)
- func PullRequestToMarkdown(pr *github.PullRequest) (string, error)
- func WriteDiscussion(d *github.Discussion) (string, error)
- func WriteIssue(issue *github.Issue) (string, error)
- func WritePullRequest(pr *github.PullRequest) (string, error)
- type BaseFrontmatter
- type DiscussionFrontmatter
- type IssueFrontmatter
- type IssueReferenceFrontmatter
- type Item
- type PullRequestFrontmatter
- type SubIssuesSummaryFrontmatter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiscussionToMarkdown ¶
func DiscussionToMarkdown(d *github.Discussion) (string, error)
DiscussionToMarkdown converts a discussion to markdown with YAML frontmatter.
func IssueToMarkdown ¶
IssueToMarkdown converts an issue to markdown with YAML frontmatter.
func PullRequestToMarkdown ¶
func PullRequestToMarkdown(pr *github.PullRequest) (string, error)
PullRequestToMarkdown converts a PR to markdown with YAML frontmatter.
func WriteDiscussion ¶
func WriteDiscussion(d *github.Discussion) (string, error)
WriteDiscussion writes a discussion to the filesystem.
func WriteIssue ¶
WriteIssue writes an issue to the filesystem.
func WritePullRequest ¶
func WritePullRequest(pr *github.PullRequest) (string, error)
WritePullRequest writes a PR to the filesystem.
Types ¶
type BaseFrontmatter ¶ added in v0.2.0
type BaseFrontmatter struct {
ID string `yaml:"id"`
URL string `yaml:"url"`
Number int `yaml:"number"`
Owner string `yaml:"owner"`
Repo string `yaml:"repo"`
Title string `yaml:"title"`
State string `yaml:"state"`
Author string `yaml:"author,omitempty"`
Created time.Time `yaml:"created"`
Updated time.Time `yaml:"updated"`
LastPulled time.Time `yaml:"last_pulled"`
}
BaseFrontmatter contains fields common to all item types.
type DiscussionFrontmatter ¶
type DiscussionFrontmatter struct {
BaseFrontmatter `yaml:",inline"`
Category string `yaml:"category"`
AnswerID string `yaml:"answer_id,omitempty"`
Locked bool `yaml:"locked,omitempty"`
}
DiscussionFrontmatter represents the YAML frontmatter for a discussion.
type IssueFrontmatter ¶
type IssueFrontmatter struct {
BaseFrontmatter `yaml:",inline"`
Labels []string `yaml:"labels,omitempty"`
Assignees []string `yaml:"assignees,omitempty"`
Parent *IssueReferenceFrontmatter `yaml:"parent,omitempty"`
Children []IssueReferenceFrontmatter `yaml:"children,omitempty"`
SubIssuesSummary *SubIssuesSummaryFrontmatter `yaml:"sub_issues_summary,omitempty"`
}
IssueFrontmatter represents the YAML frontmatter for an issue.
type IssueReferenceFrontmatter ¶
type IssueReferenceFrontmatter struct {
Number int `yaml:"number"`
Title string `yaml:"title"`
URL string `yaml:"url"`
State string `yaml:"state"`
Owner string `yaml:"owner,omitempty"` // Only if cross-repo
Repo string `yaml:"repo,omitempty"` // Only if cross-repo
}
IssueReferenceFrontmatter represents a reference to a parent or child issue in frontmatter.
type PullRequestFrontmatter ¶
type PullRequestFrontmatter struct {
BaseFrontmatter `yaml:",inline"`
Draft bool `yaml:"draft,omitempty"`
Labels []string `yaml:"labels,omitempty"`
Assignees []string `yaml:"assignees,omitempty"`
Reviewers []string `yaml:"reviewers,omitempty"`
HeadRef string `yaml:"head_ref"`
BaseRef string `yaml:"base_ref"`
MergeCommit string `yaml:"merge_commit,omitempty"`
Merged time.Time `yaml:"merged,omitempty"`
}
PullRequestFrontmatter represents the YAML frontmatter for a PR.
type SubIssuesSummaryFrontmatter ¶
type SubIssuesSummaryFrontmatter struct {
Total int `yaml:"total"`
Completed int `yaml:"completed"`
PercentComplete int `yaml:"percent_complete"`
}
SubIssuesSummaryFrontmatter provides statistics about sub-issues in frontmatter.