Skip to content

Commit

Permalink
Merge pull request #372 from gdetrez/github-milestone
Browse files Browse the repository at this point in the history
Use milestone title instead of id for githubmilestone
  • Loading branch information
ralphbean authored Aug 29, 2016
2 parents b6f3620 + 321f79f commit e331ec8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bugwarrior/services/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class GithubIssue(Issue):
'label': 'Github Updated',
},
MILESTONE: {
'type': 'numeric',
'type': 'string',
'label': 'Github Milestone',
},
REPO: {
Expand Down Expand Up @@ -155,7 +155,7 @@ def _normalize_label_to_tag(self, label):
def to_taskwarrior(self):
milestone = self.record['milestone']
if milestone:
milestone = milestone['id']
milestone = milestone['title']

body = self.record['body']
if body:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_github.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class TestGithubIssue(AbstractServiceTest, ServiceTest):
'url': 'https://api.github.com/repos/arbitrary_username/arbitrary_repo/issues/1',
'number': 10,
'body': 'Something',
'milestone': {'id': 'alpha'},
'milestone': {'title': 'alpha'},
'labels': [{'name': 'bugfix'}],
'created_at': arbitrary_created.isoformat(),
'updated_at': arbitrary_updated.isoformat(),
Expand Down Expand Up @@ -69,7 +69,7 @@ def test_to_taskwarrior(self):
issue.UPDATED_AT: self.arbitrary_updated,
issue.CREATED_AT: self.arbitrary_created,
issue.BODY: self.arbitrary_issue['body'],
issue.MILESTONE: self.arbitrary_issue['milestone']['id'],
issue.MILESTONE: self.arbitrary_issue['milestone']['title'],
}
actual_output = issue.to_taskwarrior()

Expand Down

0 comments on commit e331ec8

Please sign in to comment.