gcg uses Go’s text/template
library as the basis for the templating.
For an in-depth look into Go Templates, check the official Go docs.
IssuesByMilestone
and IssuesByTag
are arrays of issues and pull requests that are grouped by related labels.
IssuesByMilestone
only available if milestone setting is set and IssuesByTag
only available if since-tag and/or until-tag setting is set.
{{range .IssuesByMilestone}}
{{.Title}}
{{range .Issues}}
{{- end -}}
{{end}}
SinceTag
and UntilTag
are tag titles which can be set by since-tag and until-tag settings and only available if they are set.
{{.SinceTag}}-{{.UntilTag}}
Repository represents a GitHub repository.
- GetAllowMergeCommit
- GetAllowRebaseMerge
- GetAllowSquashMerge
- GetArchiveURL
- GetArchived
- GetAssigneesURL
- GetAutoInit
- GetBlobsURL
- GetBranchesURL
- GetCloneURL
- GetCodeOfConduct
- GetCollaboratorsURL
- GetCommentsURL
- GetCommitsURL
- GetCompareURL
- GetContentsURL
- GetContributorsURL
- GetCreatedAt
- GetDefaultBranch
- GetDeploymentsURL
- GetDescription
- GetDisabled
- GetDownloadsURL
- GetEventsURL
- GetFork
- GetForksCount
- GetForksURL
- GetFullName
- GetGitCommitsURL
- GetGitRefsURL
- GetGitTagsURL
- GetGitURL
- GetGitignoreTemplate
- GetHTMLURL
- GetHasDownloads
- GetHasIssues
- GetHasPages
- GetHasProjects
- GetHasWiki
- GetHomepage
- GetHooksURL
- GetID
- GetIssueCommentURL
- GetIssueEventsURL
- GetIssuesURL
- GetKeysURL
- GetLabelsURL
- GetLanguage
- GetLanguagesURL
- GetLicense
- GetLicenseTemplate
- GetMasterBranch
- GetMergesURL
- GetMilestonesURL
- GetMirrorURL
- GetName
- GetNetworkCount
- GetNodeID
- GetNotificationsURL
- GetOpenIssuesCount
- GetOrganization
- GetOwner
- GetParent
- GetPermissions
- GetPrivate
- GetPullsURL
- GetPushedAt
- GetReleasesURL
- GetSSHURL
- GetSVNURL
- GetSize
- GetSource
- GetStargazersCount
- GetStargazersURL
- GetStatusesURL
- GetSubscribersCount
- GetSubscribersURL
- GetSubscriptionURL
- GetTagsURL
- GetTeamID
- GetTeamsURL
- GetTreesURL
- GetURL
- GetUpdatedAt
- GetWatchersCount
[{{.Repository.GetName}}]({{.Repository.GetHTMLURL}})
Milestone represents a GitHub repository milestone. Only available if milestone setting is set.
- GetClosedAt
- GetClosedIssues
- GetCreatedAt
- GetCreator
- GetDescription
- GetDueOn
- GetHTMLURL
- GetID
- GetLabelsURL
- GetNodeID
- GetNumber
- GetOpenIssues
- GetState
- GetTitle
- GetURL
- GetUpdatedAt
{{.Milestone.GetTitle}} ({{.Milestone.GetClosedAt.Format "2006-01-02"}})
Commit (SinceTagCommit & UntilTagCommit )
Commit represents a GitHub commit. Only available if since-tag and/or until-tag setting is set.
- GetAuthor
- GetCommentCount
- GetCommitter
- GetHTMLURL
- GetMessage
- GetNodeID
- GetSHA
- GetStats
- GetTree
- GetURL
- GetVerification
[{{.SinceTag}}]({{.SinceTagCommit.GetHTMLURL}}) - [{{.UntilTag}}]({{.UntilTagCommit.GetHTMLURL}})
Issue represents a GitHub issue on a repository.
Note: As far as the GitHub API is concerned, every pull request is an issue, but not every issue is a pull request. Some endpoints, events, and webhooks may also return pull requests via this struct. If PullRequestLinks is nil, this is an issue, and if PullRequestLinks is not nil, this is a pull request. The IsPullRequest helper method can be used to check that.
- GetActiveLockReason
- GetAssignee
- GetBody
- GetClosedAt
- GetClosedBy
- GetComments
- GetCommentsURL
- GetCreatedAt
- GetEventsURL
- GetHTMLURL
- GetID
- GetLabelsURL
- GetLocked
- GetMilestone
- GetNodeID
- GetNumber
- GetPullRequestLinks
- GetReactions
- GetRepository
- GetRepositoryURL
- GetState
- GetTitle
- GetURL
- GetUpdatedAt
- GetUser
- IsPullRequest
{{range .IssuesByMilestone}}
{{.Title}}
{{range .Issues}}
{{if .IsPullRequest -}}
- PR [\#{{.GetNumber}}]({{.GetHTMLURL}}): {{.GetTitle}} (by [{{.GetUser.GetLogin}}]({{.GetUser.GetHTMLURL}}))
{{- else -}}
- ISSUE [\#{{.GetNumber}}]({{.GetHTMLURL}}): {{.GetTitle}}
{{- end -}}
{{end}}