From ed12ff5e7ecb12b643a68a3e74e5f935a09b0887 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81rgio=20Agostinho?= Date: Sat, 25 Aug 2018 19:32:24 +0100 Subject: [PATCH] Save start and end revisions in cache --- .github/change_log.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/change_log.py b/.github/change_log.py index e036e50d1b6..e4a59eb8830 100755 --- a/.github/change_log.py +++ b/.github/change_log.py @@ -405,11 +405,15 @@ def parse_arguments(): pr_info = fetch_pr_info(prs, auth=args.auth) if args.cache: with open(args.cache, "w") as fp: - fp.write(json.dumps(pr_info)) + d = {"start": args.start, "end": args.end, "pr_info": pr_info} + fp.write(json.dumps(d)) else: # Load previously cached info with open(args.from_cache) as fp: - pr_info = json.loads(fp.read()) + d = json.loads(fp.read()) + pr_info = d["pr_info"] + args.start = d["start"] + args.end = d["start"] # Generate text content based on changes