Skip to content

Commit ed12ff5

Browse files
Save start and end revisions in cache
1 parent 0032e6b commit ed12ff5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/change_log.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,11 +405,15 @@ def parse_arguments():
405405
pr_info = fetch_pr_info(prs, auth=args.auth)
406406
if args.cache:
407407
with open(args.cache, "w") as fp:
408-
fp.write(json.dumps(pr_info))
408+
d = {"start": args.start, "end": args.end, "pr_info": pr_info}
409+
fp.write(json.dumps(d))
409410
else:
410411
# Load previously cached info
411412
with open(args.from_cache) as fp:
412-
pr_info = json.loads(fp.read())
413+
d = json.loads(fp.read())
414+
pr_info = d["pr_info"]
415+
args.start = d["start"]
416+
args.end = d["start"]
413417

414418

415419
# Generate text content based on changes

0 commit comments

Comments
 (0)