File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 8
8
_gh = None
9
9
10
10
def get_token ():
11
- global token
11
+ global _token
12
12
app_id = config .get_section ('github' ).get ('app_id' )
13
13
installation_id = config .get_section ('github' ).get ('installation_id' )
14
14
private_key_path = config .get_section ('github' ).get ('private_key' )
@@ -19,9 +19,9 @@ def get_token():
19
19
20
20
github_integration = GithubIntegration (app_id , private_key )
21
21
# Note that installation access tokens last only for 1 hour, you will need to regenerate them after they expire.
22
- token = github_integration .get_access_token (installation_id )
22
+ _token = github_integration .get_access_token (installation_id )
23
23
24
- return token
24
+ return _token
25
25
26
26
27
27
def connect ():
@@ -30,6 +30,6 @@ def connect():
30
30
31
31
def get_instance ():
32
32
global _gh , _token
33
- if not _gh or (_token and datetime .datetime .utcnow () > token .expires_at ):
33
+ if not _gh or (_token and datetime .datetime .utcnow () > _token .expires_at ):
34
34
_gh = connect ()
35
35
return _gh
You can’t perform that action at this time.
0 commit comments