Skip to content

Commit

Permalink
Save start and end revisions in cache
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioRAgostinho committed Aug 25, 2018
1 parent 0032e6b commit 87782a0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/change_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 87782a0

Please sign in to comment.