Completed
Pull Request — master (#348)
by Tomaz
02:21
created

ListIssuesAction.run()   D

Complexity

Conditions 8

Size

Total Lines 32

Duplication

Lines 0
Ratio 0 %
Metric Value
cc 8
dl 0
loc 32
rs 4
1
from lib.base import BaseGithubAction
2
3
__all__ = [
4
    'AddCommentAction'
5
]
6
7
8
class AddCommentAction(BaseGithubAction):
9
    def run(self, user, repo, issue, body):
10
        issue = int(issue)
11
12
        user = self._client.get_user(user)
13
        repo = user.get_repo(repo)
14
        issue = repo.get_issue(issue)
15
16
        issue.create_comment(body=body)
17
        return True
18