Skip to content

Commit

Permalink
wip/draft should be a numeric, make it like gitlab
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Gallegos <[email protected]>
  • Loading branch information
thekad committed Feb 16, 2024
1 parent b97276d commit 88601e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions bugwarrior/services/gerrit.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class GerritIssue(Issue):
BRANCH = 'gerritbranch'
TOPIC = 'gerrittopic'
STATUS = 'gerritstatus'
WIP = 'gerritwip'
WORK_IN_PROGRESS = 'gerritwip'

UDAS = {
SUMMARY: {
Expand All @@ -52,8 +52,8 @@ class GerritIssue(Issue):
'type': 'string',
'label': 'Gerrit Status',
},
WIP: {
'type': 'string',
WORK_IN_PROGRESS: {
'type': 'numeric',
'label': 'Gerrit Work in Progress',
},
}
Expand All @@ -72,7 +72,7 @@ def to_taskwarrior(self):
self.BRANCH: self.record['branch'],
self.TOPIC: self.record.get('topic', 'notopic'),
self.STATUS: self.record.get('status', ''),
self.WIP: 'wip' if self.record.get('work_in_progress', False) else '',
self.WORK_IN_PROGRESS: int(self.record.get('work_in_progress', 0)),
}

def get_default_description(self):
Expand Down
4 changes: 2 additions & 2 deletions bugwarrior/services/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ class GithubIssue(Issue):
'label': 'GitHub State',
},
DRAFT: {
'type': 'string',
'type': 'numeric',
'label': 'GitHub Draft',
},
}
Expand Down Expand Up @@ -299,7 +299,7 @@ def to_taskwarrior(self):
self.CLOSED_AT: closed,
self.NAMESPACE: self.extra['namespace'],
self.STATE: self.record.get('state', ''),
self.DRAFT: 'draft' if self.record.get('draft', False) else '',
self.DRAFT: int(self.record.get('draft', 0)),
}

def get_tags(self):
Expand Down

0 comments on commit 88601e0

Please sign in to comment.