From 61fdbe26476b031d407e9b873fffe235ff2b8364 Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Thu, 30 Jan 2025 21:24:32 +0000 Subject: [PATCH] ci/update: fix re-apply commit order We need to reverse the `rev-list` output so that the commits are re-applied in the correct order; oldest first. --- .github/workflows/update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index aaf777a2..a15ea3f2 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -142,7 +142,7 @@ jobs: remote="origin/$pr_branch" author_rxp='^github-actions\[bot\] <41898282+github-actions\[bot\]@users\.noreply\.github\.com>$' base=$(git rev-list --author="$author_rxp" --max-count=1 "$remote") - commits=( $(git rev-list "$base..$remote") ) + commits=( $(git rev-list --reverse "$base..$remote") ) if [[ -n "$commits" ]]; then echo "Applying ${#commits[@]} commits..." echo "count=${#commits[@]}" >> $GITHUB_OUTPUT