mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:23:33 +00:00
ci(upstream-merge): avoid fetching tags to prevent 'would clobber existing tag' errors; add --no-tags to upstream/origin fetches
This commit is contained in:
@@ -197,8 +197,8 @@ jobs:
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git remote add upstream "https://github.com/${UPSTREAM_REPO}.git" 2>/dev/null || true
|
||||
git fetch origin --depth=1
|
||||
git fetch upstream --depth=1 "${UPSTREAM_BRANCH}"
|
||||
git fetch --no-tags origin --depth=1
|
||||
git fetch --no-tags upstream --depth=1 "${UPSTREAM_BRANCH}"
|
||||
# Extra short-circuit: if origin/upstream-merge already contains both
|
||||
# current tips (upstream and default), there is nothing new to do.
|
||||
if git ls-remote --exit-code --heads origin upstream-merge >/dev/null 2>&1; then
|
||||
@@ -229,8 +229,8 @@ jobs:
|
||||
mkdir -p .github/auto
|
||||
git remote add upstream "https://github.com/${UPSTREAM_REPO}.git" 2>/dev/null || true
|
||||
# Fetch with commit graph but no blobs for speed; ensure sufficient history for merge-base
|
||||
git fetch origin --prune --filter=blob:none --tags
|
||||
git fetch upstream --prune --filter=blob:none --tags "${UPSTREAM_BRANCH}"
|
||||
git fetch --no-tags origin --prune --filter=blob:none
|
||||
git fetch --no-tags upstream --prune --filter=blob:none "${UPSTREAM_BRANCH}"
|
||||
RANGE="upstream/${UPSTREAM_BRANCH} ^origin/${DEFAULT_BRANCH}"
|
||||
: > .github/auto/COMMITS.json
|
||||
echo '[' >> .github/auto/COMMITS.json
|
||||
|
||||
Reference in New Issue
Block a user