add(taskwarrior): pull implementation for new tasks
This implements the pull functionality for new tasks, which are not yet in the local taskwarrior instance created. WIP for #3.
This commit is contained in:
@@ -6,6 +6,8 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"gitea.yves-biener.de/yves-biener/gitwarrior/internal/taskwarrior"
|
||||
)
|
||||
|
||||
type Milestone struct {
|
||||
@@ -21,6 +23,11 @@ type Milestone struct {
|
||||
Closed_at time.Time `json:"closed_at"`
|
||||
}
|
||||
|
||||
// TODO: implement merge for milestone tasks
|
||||
func (milestone *Milestone) Merge(task taskwarrior.Task) taskwarrior.Task {
|
||||
return task
|
||||
}
|
||||
|
||||
func (gitea *Gitea) GetMilestones(repo Repository) ([]Milestone, error) {
|
||||
url := fmt.Sprintf("%s/repos/%s/milestones?state=all", gitea.Url(), repo.Full_name)
|
||||
response, err := http.Get(url)
|
||||
|
||||
Reference in New Issue
Block a user