gh

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddItem

func AddItem(params *AddItemParams) (*[]byte, error)

func AddItemMutation

func AddItemMutation(projectId string, contentId string) string

func CreateDraftIssue

func CreateDraftIssue(params *CreateDraftIssueParams) (*[]byte, error)

func CreateIssue

func CreateIssue(params *CreateIssueParams) (*[]byte, error)

func CreateLabelApiArgs

func CreateLabelApiArgs(owner string, repo string, labelName string) []string

func GetDraftIssueMutation

func GetDraftIssueMutation(projectId string, title string, body string, assigneeIds []string) string

func GetLabelApiArgs

func GetLabelApiArgs(owner string, repo string, labelName string) []string

func GetListQuery added in v0.2.0

func GetListQuery(clientType ClientType, name string) string

func GetProjectFields

func GetProjectFields(params *GetProjectFieldsParams) (*[]byte, error)

func GetProjectFieldsQuery

func GetProjectFieldsQuery(projectId string) string

func GetProjectItems added in v0.2.0

func GetProjectItems(params *GetProjectItemsParams) (*[]byte, error)

func GetProjectItemsQuery added in v0.2.0

func GetProjectItemsQuery(projectId string, cursor *string) string

func GetRepo

func GetRepo(params *GetRepoParams) (*[]byte, error)

func GetRepoQuery

func GetRepoQuery(owner string, repo string) string

func GetUser

func GetUser(users []string) (*[]byte, error)

func GetUserQuery

func GetUserQuery(users []string) string

func IssueMutation

func IssueMutation(repositoryId string, title string, body string, assigneeIds []string, labelIds []string) string

func ListProject

func ListProject(params *ListProjectParams) (*[]byte, error)

func UpdateItem

func UpdateItem(params *UpdateItemParams) (*[]byte, error)

func UpdateItemMutation

func UpdateItemMutation(projectId string, itemId string, fieldId string, valueType PROJECT_V2_DATA_TYPE, value any) string

Types

type AddItemParams

type AddItemParams struct {
	ProjectId string
	ContentId string
}

type ClientType

type ClientType = string
const (
	ORGANIZATION ClientType = "organization"
	USER         ClientType = "user"
)

type CreateDraftIssueParams

type CreateDraftIssueParams struct {
	ProjectId  string
	Title      string
	AssiginIds []string
}

type CreateIssueParams

type CreateIssueParams struct {
	RepositoryId string
	Title        string
	Body         string
	LabelIds     []string
	AssigneeIds  []string
}

type GetProjectFieldsParams added in v0.2.0

type GetProjectFieldsParams struct {
	ProjectId string
}

type GetProjectItemsParams added in v0.2.0

type GetProjectItemsParams struct {
	ProjectId string
	Cursor    *string
}

type GetRepoParams

type GetRepoParams struct {
	Owner string
	Repo  string
}

type ITEM_TYPE added in v0.2.0

type ITEM_TYPE = string
const (
	ISSUE       ITEM_TYPE = "ISSUE"
	DRAFT_ISSUE ITEM_TYPE = "DRAFT_ISSUE"
)

type Label

type Label struct {
	Id          int64  `json:"id"`
	NodeID      string `json:"node_id"`
	URL         string `json:"url"`
	Name        string `json:"name"`
	Color       string `json:"color"`
	Description string `json:"description"`
}

func CreateLabel

func CreateLabel(owner string, repo string, labelName string) (*Label, error)

func GetLabel

func GetLabel(owner string, repo string, labelName string) (*Label, error)

type ListProjectParams

type ListProjectParams struct {
	ClientType ClientType
	Name       string
}

type PROJECT_V2_DATA_TYPE

type PROJECT_V2_DATA_TYPE = string
const (
	ASSIGNEES            PROJECT_V2_DATA_TYPE = "ASSIGNEES"
	DATE                 PROJECT_V2_DATA_TYPE = "DATE"
	ITERATION            PROJECT_V2_DATA_TYPE = "ITERATION"
	LABELS               PROJECT_V2_DATA_TYPE = "LABELS"
	LINKED_PULL_REQUESTS PROJECT_V2_DATA_TYPE = "LINKED_PULL_REQUESTS"
	MILESTONE            PROJECT_V2_DATA_TYPE = "MILESTONE"
	NUMBER               PROJECT_V2_DATA_TYPE = "NUMBER"
	REPOSITORY           PROJECT_V2_DATA_TYPE = "REPOSITORY"
	REVIEWERS            PROJECT_V2_DATA_TYPE = "REVIEWERS"
	SINGLE_SELECT        PROJECT_V2_DATA_TYPE = "SINGLE_SELECT"
	TEXT                 PROJECT_V2_DATA_TYPE = "TEXT"
	TITLE                PROJECT_V2_DATA_TYPE = "TITLE"
	TRACKS               PROJECT_V2_DATA_TYPE = "TRACKS"
)

type UpdateItemParams

type UpdateItemParams struct {
	ProjectId string
	ItemId    string
	FieldId   string
	ValueType PROJECT_V2_DATA_TYPE
	Value     any
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL