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:
@@ -13,6 +13,11 @@ type PullRequest struct {
|
||||
Merged_at time.Time `json:"merged_at"`
|
||||
}
|
||||
|
||||
type IssueState string
|
||||
|
||||
const CLOSED IssueState = "closed"
|
||||
const OPEN IssueState = "open"
|
||||
|
||||
type Issue struct {
|
||||
Id uint `json:"id"`
|
||||
Url string `json:"url"`
|
||||
@@ -104,7 +109,7 @@ func (gitea *Gitea) NewIssue(repo Repository, issue Issue) (Issue, error) {
|
||||
payload["assignee"] = issue.Assignee
|
||||
payload["assignees"] = issue.Assignees
|
||||
payload["body"] = issue.Body
|
||||
payload["closed"] = issue.State == "closed"
|
||||
payload["closed"] = issue.State == string(CLOSED)
|
||||
payload["due_date"] = issue.Due_date
|
||||
payload["lables"] = issue.Labels
|
||||
payload["milestone"] = issue.Milestone.Title != ""
|
||||
|
||||
Reference in New Issue
Block a user