Documentation ¶
Index ¶
- Variables
- func ExtractDate(title string) (string, error)
- func Run(gql api.GQLClient, projectUrl string, issueOrPullRequestUrl string, ...) error
- func ShiftDate(date string, offsetDays int) (string, error)
- func UpdateIteration(gql api.GQLClient, projectId string, projectItemId string, fieldId string, ...) error
- type Content
- type ContentState
- type DummyContent
- type GetIssueOrPullRequestQuery
- type GetOrganizationProjectQuery
- type GetProjectQuery
- type GetUserProjectQuery
- type IssueOrPullRequest
- type IssueOrPullRequestDescriptor
- type Iteration
- type IterationMatchType
- type ProjectDescriptor
- type ProjectItem
- type ProjectV2
- type ProjectV2IterationField
- type Repository
- type UpdateIterationMutation
Constants ¶
This section is empty.
Variables ¶
View Source
var ( IterationMatchTypeStartDateExactly = IterationMatchType("startDateExactly") IterationMatchTypeContains = IterationMatchType("contains") )
View Source
var ( ContentStateAll = ContentState("all") ContentStateOpen = ContentState("open") ContentStateClosed = ContentState("closed") )
View Source
var ErrSkipped = fmt.Errorf("skipped")
Functions ¶
func ExtractDate ¶
Types ¶
type Content ¶
func GetIssueOrPullRequest ¶
func GetIssueOrPullRequest( gql api.GQLClient, descriptor IssueOrPullRequestDescriptor, ) (*Content, error)
type ContentState ¶
type ContentState string
type DummyContent ¶
type DummyContent = Content
type GetIssueOrPullRequestQuery ¶
type GetIssueOrPullRequestQuery struct { Repository struct { IssueOrPullRequest IssueOrPullRequest `graphql:"issueOrPullRequest(number: $issueOrPullRequestNumber)"` } `graphql:"repository(owner: $owner, name: $name)"` }
type GetOrganizationProjectQuery ¶
type GetOrganizationProjectQuery struct {
Organization GetProjectQuery `graphql:"organization(login: $owner)"`
}
type GetProjectQuery ¶
type GetProjectQuery struct {
ProjectV2 `graphql:"projectV2(number: $projectNumber)"`
}
type GetUserProjectQuery ¶
type GetUserProjectQuery struct {
User GetProjectQuery `graphql:"user(login: $owner)"`
}
type IssueOrPullRequest ¶
type IssueOrPullRequest struct { Content `graphql:"... on Issue"` DummyContent `graphql:"... on PullRequest"` // dummy to avoid `Content redeclared` }
type IssueOrPullRequestDescriptor ¶
type IssueOrPullRequestDescriptor struct { Repository Repository Number int }
func GetIssueOrPullRequestDescriptor ¶
func GetIssueOrPullRequestDescriptor( issueOrPullRequestUrl string, ) (*IssueOrPullRequestDescriptor, error)
type IterationMatchType ¶
type IterationMatchType string
type ProjectDescriptor ¶
func GetProjectDescriptor ¶
func GetProjectDescriptor( projectUrl string, ) (*ProjectDescriptor, error)
type ProjectItem ¶
type ProjectItem struct { ID string Content IssueOrPullRequest }
type ProjectV2 ¶
type ProjectV2 struct { ID string Field struct { ProjectV2IterationField `graphql:"... on ProjectV2IterationField"` } `graphql:"field(name: $fieldName)"` Items struct { // TODO: pagenation ? Nodes []ProjectItem } `graphql:"items(last: 100)"` }
func GetProject ¶
func (*ProjectV2) SelectItem ¶
func (f *ProjectV2) SelectItem(contentID string) *ProjectItem
type ProjectV2IterationField ¶
type ProjectV2IterationField struct { ID string Name string Configuration struct { Iterations []Iteration CompletedIterations []Iteration } }
func (*ProjectV2IterationField) SelectIteration ¶
func (f *ProjectV2IterationField) SelectIteration( targetDate string, matchType IterationMatchType, ) (*Iteration, error)
type Repository ¶
type UpdateIterationMutation ¶
type UpdateIterationMutation struct { UpdateProjectV2ItemFieldValue struct { ClientMutationId string } `` /* 144-byte string literal not displayed */ }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.