Total Complexity | 2 |
Total Lines | 16 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | # Licensed to the StackStorm, Inc ('StackStorm') under one or more |
||
18 | class StoreOauthTokenAction(BaseGithubAction): |
||
19 | def run(self, user, token, github_type): |
||
20 | enterprise = self._is_enterprise(github_type) |
||
21 | |||
22 | if enterprise: |
||
23 | value_name = "token_enterprise_{}".format(user) |
||
24 | results = {'github_type': "enterprise"} |
||
25 | else: |
||
26 | value_name = "token_{}".format(user) |
||
27 | results = {'github_type': "online"} |
||
28 | |||
29 | self.action_service.set_value( |
||
30 | name=value_name, |
||
31 | value=token) |
||
32 | |||
33 | return results |
||
34 |