22import re
33import json
44import requests
5- from datetime import datetime
5+ from datetime import datetime , timezone
6+
67
78github_headers = {'Authorization' : 'token %s' % os .environ .get ("GITHUB_TOKEN" )}
89
910repo_info_table = {
11+ "apollo-adminservice" : {
12+ "name" : "apollo" ,
13+ "type" : "github" ,
14+ "owner" : "apolloconfig" ,
15+ "match" : "^v[1-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$" ,
16+ },
17+ "apollo-configservice" : {
18+ "name" : "apollo" ,
19+ "type" : "github" ,
20+ "owner" : "apolloconfig" ,
21+ "match" : "^v[1-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$" ,
22+ },
23+ "apollo-portal" : {
24+ "name" : "apollo" ,
25+ "type" : "github" ,
26+ "owner" : "apolloconfig" ,
27+ "match" : "^v[1-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$" ,
28+ },
1029 "alertmanager" : {
1130 "name" : "alertmanager" ,
1231 "type" : "github" ,
6786 "owner" : "erlang" ,
6887 "match" : "^OTP-[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$" ,
6988 },
89+ "etcd" : {
90+ "name" : "etcd" ,
91+ "type" : "github" ,
92+ "owner" : "etcd-io" ,
93+ "match" : "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$" ,
94+ },
7095 "fluentd" : {
7196 "name" : "fluentd" ,
7297 "type" : "github" ,
127152 "owner" : "stedolan" ,
128153 "match" : "^jq-[0-9]{1,}\.[0-9]{1,}\.?[0-9]{0}$" ,
129154 },
155+ "kvrocks" : {
156+ "name" : "kvrocks" ,
157+ "type" : "github" ,
158+ "owner" : "apache" ,
159+ "match" : "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$" ,
160+ },
161+ "kvrocks_exporter" : {
162+ "name" : "kvrocks_exporter" ,
163+ "type" : "github" ,
164+ "owner" : "RocksLabs" ,
165+ "match" : "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$" ,
166+ },
130167 "kubectl" : {
131168 "name" : "kubectl" ,
132169 "type" : "github" ,
211248 "owner" : "redis" ,
212249 "match" : "^[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$" ,
213250 },
214- "redis-cluster-proxy" : {
215- "name" : "redis-cluster-proxy" ,
251+ "valkey" : {
252+ "name" : "valkey" ,
253+ "type" : "github" ,
254+ "owner" : "valkey-io" ,
255+ "match" : "^[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$" ,
256+ },
257+ "valkey-sentinel-proxy" : {
258+ "name" : "valkey-sentinel-proxy" ,
216259 "type" : "github" ,
217260 "owner" : "drycc-addons" ,
218261 "match" : "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$" ,
@@ -484,7 +527,8 @@ def check_github_version(stack):
484527 for tag in response .json ()["data" ]["repository" ]["refs" ]["edges" ]:
485528 if "tagger" in tag ["node" ]["target" ]:
486529 date = datetime .strptime (
487- tag ["node" ]["target" ]["tagger" ]["date" ][:19 ], "%Y-%m-%dT%H:%M:%S" )
530+ tag ["node" ]["target" ]["tagger" ]["date" ][:19 ], "%Y-%m-%dT%H:%M:%S"
531+ ).astimezone (timezone .utc )
488532 else :
489533 date = datetime .strptime (
490534 requests .get (
@@ -493,9 +537,9 @@ def check_github_version(stack):
493537 ), headers = github_headers
494538 ).json ()["commit" ]["author" ]["date" ][:19 ],
495539 "%Y-%m-%dT%H:%M:%S"
496- )
540+ ). astimezone ( timezone . utc )
497541 if re .match (info ["match" ], tag ["node" ]["name" ]):
498- if (datetime .utcnow ( ) - date ).days <= 7 :
542+ if (datetime .now ( timezone . utc ) - date ).days <= 7 :
499543 create_github_issue (stack , tag ["node" ]["name" ])
500544 else :
501545 break
@@ -528,3 +572,4 @@ def main():
528572
529573if __name__ == "__main__" :
530574 main ()
575+
0 commit comments