fix: simplify updater to @mosaic/mosaic only, add explicit tea repo/login flags (#387)
BREAKING CHANGE: Remove legacy @mosaic/cli fallback from update-checker. The updater now targets only @mosaic/mosaic — legacy package compatibility is out of scope per approved breaking change. - update-checker.ts: remove LEGACY_PKG, INSTALLED_PACKAGE_ORDER, candidate iteration, and cache key comparison. Single query for @mosaic/mosaic only. - update-checker.test.ts: remove legacy fallback and cross-contamination tests. Add test asserting no @mosaic/cli queries are made. - pr-merge.sh: add --repo and --login flags to tea merge command; resolve OWNER/REPO before case block. - issue-close.sh: add --repo and --login flags to tea issue commands; resolve OWNER/REPO after detect_platform. - pr-ci-wait.sh: no changes needed (uses curl, not tea). - detect-platform.sh: no changes needed (provides get_repo_owner/name). Ref: #387
This commit is contained in:
@@ -45,6 +45,8 @@ fi
|
||||
|
||||
# Detect platform and close issue
|
||||
detect_platform
|
||||
OWNER=$(get_repo_owner)
|
||||
REPO=$(get_repo_name)
|
||||
|
||||
if [[ "$PLATFORM" == "github" ]]; then
|
||||
if [[ -n "$COMMENT" ]]; then
|
||||
@@ -54,9 +56,9 @@ if [[ "$PLATFORM" == "github" ]]; then
|
||||
echo "Closed GitHub issue #$ISSUE_NUMBER"
|
||||
elif [[ "$PLATFORM" == "gitea" ]]; then
|
||||
if [[ -n "$COMMENT" ]]; then
|
||||
tea issue comment "$ISSUE_NUMBER" "$COMMENT"
|
||||
tea issue comment "$ISSUE_NUMBER" "$COMMENT" --repo "$OWNER/$REPO" --login "${GITEA_LOGIN:-mosaicstack}"
|
||||
fi
|
||||
tea issue close "$ISSUE_NUMBER"
|
||||
tea issue close "$ISSUE_NUMBER" --repo "$OWNER/$REPO" --login "${GITEA_LOGIN:-mosaicstack}"
|
||||
echo "Closed Gitea issue #$ISSUE_NUMBER"
|
||||
else
|
||||
echo "Error: Unknown platform"
|
||||
|
||||
@@ -89,6 +89,8 @@ if [[ "$SKIP_QUEUE_GUARD" != true ]]; then
|
||||
fi
|
||||
|
||||
PLATFORM=$(detect_platform)
|
||||
OWNER=$(get_repo_owner)
|
||||
REPO=$(get_repo_name)
|
||||
|
||||
case "$PLATFORM" in
|
||||
github)
|
||||
@@ -97,8 +99,7 @@ case "$PLATFORM" in
|
||||
eval "$CMD"
|
||||
;;
|
||||
gitea)
|
||||
# tea pr merge syntax
|
||||
CMD="tea pr merge $PR_NUMBER --style squash"
|
||||
CMD="tea pr merge $PR_NUMBER --style squash --repo $OWNER/$REPO --login ${GITEA_LOGIN:-mosaicstack}"
|
||||
|
||||
# Delete branch after merge if requested
|
||||
if [[ "$DELETE_BRANCH" == true ]]; then
|
||||
|
||||
Reference in New Issue
Block a user