add get labels endpoint
This commit is contained in:
16
giteaClient/createIssueProxy.go
Normal file
16
giteaClient/createIssueProxy.go
Normal file
@ -0,0 +1,16 @@
|
||||
package giteaClient
|
||||
|
||||
type GetCreateIssueProxy struct {
|
||||
Title string `json:"title"`
|
||||
Body string `json:"body"`
|
||||
Assignee string `json:"assignee"`
|
||||
Labels []int64 `json:"labels"`
|
||||
Closed bool `json:"closed"`
|
||||
}
|
||||
|
||||
type PostCreateIssueProxy struct {
|
||||
Title string `json:"title"`
|
||||
Body string `json:"body"`
|
||||
Labels []int64 `json:"labels"`
|
||||
}
|
||||
|
@ -58,12 +58,21 @@ func GetIssue(issueID int64) (*gitea.Issue, error) {
|
||||
func GetIssueComments(issueID int64) ([]*gitea.Comment, error) {
|
||||
giteaIssueComments, err := giteaClient.ListIssueComments(giteaOwner, giteaRepo, issueID)
|
||||
if( err != nil){
|
||||
fmt.Println(fmt.Sprintf("Gitea error: %+v", err.Error()))
|
||||
fmt.Println(fmt.Sprintf("Gitea get isse comments error: %+v", err.Error()))
|
||||
return nil, err
|
||||
}
|
||||
return giteaIssueComments, nil
|
||||
}
|
||||
|
||||
func GetLabels() ([]*gitea.Label, error) {
|
||||
giteaLabels, err := giteaClient.ListRepoLabels(giteaOwner, giteaRepo)
|
||||
if( err != nil){
|
||||
fmt.Println(fmt.Sprintf("Gitea get labels error: %+v", err.Error()))
|
||||
return nil, err
|
||||
}
|
||||
return giteaLabels, nil
|
||||
}
|
||||
|
||||
func CreateIssue(issue gitea.Issue){
|
||||
|
||||
}
|
Reference in New Issue
Block a user