fix(publish): skip already-staged submissions, add --force to re-stage - #98
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
extctl publishrun 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.Runnow skips a fully-staged branch (points atapprove/retry-screenshotsinstead), and auto-heals a branch a prior run created but crashed before finishing (noextension.yamlcommitted) by re-staging it automatically.--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 newTestBranchHasCompleteSubmission/TestDeleteLocalBranchcovering the new git helpers