From f26a760f86b9353ab27c1c1f692e246d47c1603d Mon Sep 17 00:00:00 2001 From: Lain Soykaf Date: Thu, 29 Oct 2026 12:37:02 +0400 Subject: [PATCH] ci: fetch only the target branch tip trees in check-changelog The check fetched the whole history of develop with all tags for every pull request (about 250 MB), which was slow and loaded the git server. Listing added files only needs the trees of the tip. --- changelog.d/ci-cheap-changelog-check.skip | 0 tools/check-changelog | 4 +++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelog.d/ci-cheap-changelog-check.skip diff --git a/changelog.d/ci-cheap-changelog-check.skip b/changelog.d/ci-cheap-changelog-check.skip new file mode 100644 index 000000000..e69de29bb diff --git a/tools/check-changelog b/tools/check-changelog index d09a68895..f2a81d427 100644 --- a/tools/check-changelog +++ b/tools/check-changelog @@ -6,7 +6,9 @@ git config --global --add safe.directory "$(pwd)" echo "looking for change log" git remote add upstream https://git.pleroma.social/pleroma/pleroma.git -git fetch upstream ${CI_COMMIT_TARGET_BRANCH}:refs/remotes/upstream/${CI_COMMIT_TARGET_BRANCH} +# Only the tip's trees are needed to list added files: no history, tags or file contents. +git fetch --depth=1 --no-tags --filter=blob:none upstream \ + ${CI_COMMIT_TARGET_BRANCH}:refs/remotes/upstream/${CI_COMMIT_TARGET_BRANCH} git diff --raw --no-renames upstream/${CI_COMMIT_TARGET_BRANCH} HEAD -- changelog.d | \ grep ' A\t' | grep '\.\(skip\|add\|remove\|fix\|security\|change\)$'