Completed
Pull Request — master (#563)
by
unknown
03:08
created

StoreOauthToken   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 13
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 12 2
1
from lib.base import BaseGithubAction
2
3
4
class StoreOauthToken(BaseGithubAction):
5
    def run(self, user, token, enterprise=False):
6
7
        if enterprise:
8
            value_name = "token_enterprise_{}".format(user)
9
        else:
10
            value_name = "token_{}".format(user)
11
12
        self.action_service.set_value(
13
            name=value_name,
14
            value=token)
15
16
        return True
17