add(gitea-api): comment getter and update functions
This implements the getter api functions and update functions for comments. WIP for #1.
This commit is contained in:
@@ -20,10 +20,24 @@ func main() {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
os.Exit(-1)
|
||||
}
|
||||
comments, err := server.GetComments(repository)
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
os.Exit(-1)
|
||||
}
|
||||
|
||||
fmt.Printf("%#v\n", issue)
|
||||
fmt.Println("---")
|
||||
fmt.Printf("%#v\n", milestone)
|
||||
fmt.Println("---")
|
||||
|
||||
for _, comment := range comments {
|
||||
// NOTE: filter comments to only include comments which are related to the current issue
|
||||
// Order them by their Id's as that's the order they are in the issue (most likely)
|
||||
if comment.Issue_url == issue.Html_url {
|
||||
fmt.Printf("%#v\n", comment)
|
||||
}
|
||||
}
|
||||
|
||||
// necessary configurations (see config file gitw.json)
|
||||
// - access code for gitea
|
||||
|
||||
Reference in New Issue
Block a user