Documentation ¶
Index ¶
- Constants
- func GetIssues(PersonalAccessToken, URL, Action string) (*[]Issues, error)
- func GetUserinfo() (string, string, string)
- func MoveFile(from, to string)
- func Parsehttpurl(Filepath, State, IssueNumber string, Locked bool) (string, string, string, *[]byte)
- func ReadTemplate(Filepath string) []byte
- func UpdateIssues(PersonalAccessToken, URL, Action string, data *[]byte) string
- func UpdateUserinfo(id, idtoken, idrepo string)
- func WriteToFile(f string, d []byte)
- type Assignees
- type Issues
- type Issueyamlfile
- type Owner
- type Repos
- type Userinfo
Constants ¶
View Source
const ( IssuesURL = "https://api.github.com/repos/" ReposURL = "https://api.github.com/user/repos" UserReposURL = "https://api.github.com/repos/" MethodGet = "GET" MethodHead = "HEAD" MethodPost = "POST" MethodPut = "PUT" MethodPatch = "PATCH" // RFC 5789 MethodDelete = "DELETE" MethodConnect = "CONNECT" MethodOptions = "OPTIONS" MethodTrace = "TRACE" )
Variables ¶
This section is empty.
Functions ¶
func GetUserinfo ¶
Get user info including userid/token/passwd
func Parsehttpurl ¶
func Parsehttpurl(Filepath, State, IssueNumber string, Locked bool) (string, string, string, *[]byte)
parse http url request for get/post/patch/put
func ReadTemplate ¶
read the yaml file of repo/issue template, which will be removed in the future
func UpdateIssues ¶
post/patch/put for issue update
func UpdateUserinfo ¶
func UpdateUserinfo(id, idtoken, idrepo string)
update user info as the parameter
Types ¶
type Issueyamlfile ¶
type Issueyamlfile struct { Title string `yaml:"title"` Body string `yaml:"body"` Assignees []string `yaml:"assignees"` State string `yaml:"state"` Locked bool `yaml:"locked"` Labels []string `yaml:"labels"` }
func (*Issueyamlfile) UpdateIssueyaml ¶
func (yamlfile *Issueyamlfile) UpdateIssueyaml(Title, Body, State string, Locked bool, Assignees, Labels *[]string) (*[]byte, string, bool)
update yaml file of issue template
type Repos ¶
type Repos struct { ID int `json:"id"` Name string `json:"name"` Private bool `json:"private"` Owner Owner HTMLURL string `json:"html_url"` Description string `json:"description"` Homepage string `json:"homepage"` Fork bool Teamurl string `json:"team_url"` CreateAt time.Time `json:"created_at"` Forks int `json:"forks"` Openissues int `json:"open_issues"` Language string `json:"language"` }
Click to show internal directories.
Click to hide internal directories.