Fix GitHub installation tokens not getting updated in the cache file
Signed-off-by: magic_rb <richard@brezak.sk>
This commit is contained in:
parent
d586b9155b
commit
5dc05ea3fe
|
@ -86,7 +86,7 @@ class InstallationToken(RepoToken):
|
||||||
# token: "token"
|
# token: "token"
|
||||||
# }
|
# }
|
||||||
# }
|
# }
|
||||||
installations_token_map: dict[int, Any]
|
installations_token_map: dict[str, Any]
|
||||||
if self.installations_token_map_name.exists():
|
if self.installations_token_map_name.exists():
|
||||||
installations_token_map = json.loads(
|
installations_token_map = json.loads(
|
||||||
self.installations_token_map_name.read_text()
|
self.installations_token_map_name.read_text()
|
||||||
|
@ -94,10 +94,14 @@ class InstallationToken(RepoToken):
|
||||||
else:
|
else:
|
||||||
installations_token_map = {}
|
installations_token_map = {}
|
||||||
|
|
||||||
installations_token_map[self.installation_id] = {
|
installations_token_map.update(
|
||||||
"expiration": self.expiration.isoformat(),
|
{
|
||||||
"token": self.token,
|
str(self.installation_id): {
|
||||||
}
|
"expiration": self.expiration.isoformat(),
|
||||||
|
"token": self.token,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
atomic_write_file(
|
atomic_write_file(
|
||||||
self.installations_token_map_name, json.dumps(installations_token_map)
|
self.installations_token_map_name, json.dumps(installations_token_map)
|
||||||
|
|
Loading…
Reference in a new issue