Skip to content

fix(publish): skip already-staged submissions, add --force to re-stage - #98

Merged
LukasHirt merged 1 commit into
mainfrom
fix/publish-force-restage
Jul 24, 2026
Merged

fix(publish): skip already-staged submissions, add --force to re-stage#98
LukasHirt merged 1 commit into
mainfrom
fix/publish-force-restage

Conversation

@LukasHirt

Copy link
Copy Markdown
Owner

Summary

  • extctl publish run twice for the same extension re-did the download + screenshot capture even when it was already staged locally (branch committed, not yet approved) — since capture is non-deterministic, this could stack a second commit onto the publish branch instead of amending it.
  • Run now skips a fully-staged branch (points at approve/retry-screenshots instead), and auto-heals a branch a prior run created but crashed before finishing (no extension.yaml committed) by re-staging it automatically.
  • Adds --force (requires --id) to explicitly discard an already-staged branch and re-stage it from scratch (fresh download, fresh screenshots, fresh tag/minOCIS resolution).

Test plan

  • go build ./...
  • go vet ./...
  • go test ./... — all packages pass, including new TestBranchHasCompleteSubmission / TestDeleteLocalBranch covering the new git helpers

A second `extctl publish` run redid the expensive download+screenshot
capture for an extension already staged locally (branch committed but
never approved), risking a duplicate commit since screenshot capture is
non-deterministic. Run now skips a fully-staged branch, auto-heals a
branch a prior run created but never finished committing to (e.g. it
crashed mid-download), and adds `--force` (with `--id`) to explicitly
discard a staged branch and re-stage it from scratch.

Signed-off-by: Lukas Hirt <info@hirt.cz>
@LukasHirt LukasHirt self-assigned this Jul 24, 2026
@LukasHirt
LukasHirt enabled auto-merge (squash) July 24, 2026 11:05
@LukasHirt
LukasHirt merged commit 41181d3 into main Jul 24, 2026
3 checks passed
@LukasHirt
LukasHirt deleted the fix/publish-force-restage branch July 24, 2026 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant