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

ListIssuesAction   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 33
Duplicated Lines 0 %
Metric Value
dl 0
loc 33
rs 10
wmc 8

1 Method

Rating   Name   Duplication   Size   Complexity  
D run() 0 32 8
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