diff options
author | Dylan Baker <dylan.c.baker@intel.com> | 2022-03-17 11:02:35 -0700 |
---|---|---|
committer | Dylan Baker <dylan.c.baker@intel.com> | 2022-04-21 16:10:21 -0700 |
commit | e238597cbf1010a7beecb245514d5bfe8b0094c3 (patch) | |
tree | bf061c57ec9b74f788be73b85d4d9f28a6a7a0dc /bin | |
parent | b6e25103ea1975b7f9015dbef4625f22224e1523 (diff) |
pick/core: have update_commits return the commit list
Diffstat (limited to 'bin')
-rw-r--r-- | bin/pick/core.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/pick/core.py b/bin/pick/core.py index 0f5b73f74be..b0e373a3abb 100644 --- a/bin/pick/core.py +++ b/bin/pick/core.py @@ -371,7 +371,7 @@ async def gather_commits(version: str, previous: typing.List['Commit'], return commits -async def update_commits() -> None: +async def update_commits() -> typing.List[Commit]: """Gather all new commits and update the on-disk cache. """ commits = load() @@ -387,7 +387,9 @@ async def update_commits() -> None: else: collected_commits = [] - save(itertools.chain(collected_commits, commits)) + all_commits = list(itertools.chain(collected_commits, commits)) + save(all_commits) + return all_commits def load() -> typing.List['Commit']: |