Skip to content

Commit

Permalink
services.IssueService: Remove unused get_author
Browse files Browse the repository at this point in the history
Defining this method on the base class gave the impression that it was a
required method and services started implementing it even though it is
unused.
  • Loading branch information
ryneeverett committed Feb 2, 2024
1 parent d5ab94a commit 77d2979
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 14 deletions.
4 changes: 0 additions & 4 deletions bugwarrior/services/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,6 @@ def get_owner(self, issue):
""" Override this for filtering on tickets """
raise NotImplementedError()

def get_author(self, issue):
""" Override this for filtering on tickets """
raise NotImplementedError()

@abc.abstractmethod
def issues(self):
""" Returns a list of dicts representing issues from a remote service.
Expand Down
4 changes: 0 additions & 4 deletions bugwarrior/services/pivotaltracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ def get_owner(self, issue):
_, issue = issue
return issue.get('pivotalowners')

def get_author(self, issue):
_, issue = issue
return issue.get('pivotalrequesters')

def to_taskwarrior(self):
description = self.record.get('description')
created = self.parse_date(self.record.get('created_at'))
Expand Down
5 changes: 0 additions & 5 deletions bugwarrior/services/teamwork_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@ def get_owner(self):
self.user_id in self.record.get("responsible-party-ids", "")):
return self.name

def get_author(self, issue):
if issue:
author = self.record["creator-firstname"] + " " + self.record["creator-lastname"]
return author

def get_task_url(self):
return self.extra["host"] + "/#/tasks/" + str(self.record["id"])

Expand Down
1 change: 0 additions & 1 deletion tests/test_teamwork_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,3 @@ def test_issues(self):
issue.name = "Greg McCoy"
self.assertEqual(issue.get_taskwarrior_record(), expected_data)
self.assertEqual(issue.get_owner(), "Greg McCoy")
self.assertEqual(issue.get_author(issue), "Greg McCoy")

0 comments on commit 77d2979

Please sign in to comment.