ci: cache get_base_commit function calls

The commit shall not be updated during a CI run, and this calls git
fetch, which is considerably slow at times. This reduces the git fetch
calls down to 1 from 3 in the generate-build-jobs step.

Signed-off-by: Pablo Correa Gómez <pabloyoyoista@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7649>
This commit is contained in:
Pablo Correa Gómez 2025-12-26 17:39:27 +01:00 committed by The Friendly Merge Bot
parent e41cce98e8
commit cd5aaf8e9f
No known key found for this signature in database

View file

@ -76,6 +76,7 @@ def get_upstream_branch():
return channels_cfg[channel]["branch_pmaports"]
@cache
def get_base_commit() -> str:
"""Get the base commit that can be compared with HEAD to get all commits in the
given branch/merge request."""