Repository navigation
fix(promotion): report blocked applies and accept gitlab providers - #28
Merged
Merged
Conversation
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.
Fixes drift between the
n8n promotioncommands and the upstream n8n Public API spec 1.1.1. The worst case: before this change,promotion applyprintedApplied: <id>and exited 0 even when the server answeredblockedand wrote nothing.Apply status (breaking fix)
ApplyPromotionResultnow models theapplyPackageResultDtounion onstatus:applied: counts and warnings.blocked:preflightwith missing projects, missing bindings, access requirements, conflicts and warnings. Nothing was written.source-changed: neither. Nothing was written.statusbut with counts (older servers) is treated as applied.--output jsonis lossless, unknown fields and variants included. Unknown top-level fields are also exposed inExtra. Preflight items use theImportBlockingIssuepattern: a typed view plus the verbatim document.0applied,3blocked,4source-changed,1an unknown status or any other error. Stdout always carries the full result. The newpromotionApplyStoppedErroris reported without the usage hint.blockedlists the items by group, withproject-deletionanddestructive-changeconflicts called out. Stderr says nothing was applied and prints the expected source (configId,branchName,commitSha) for continuing later. The continue command is worded as upcoming (feat(workflow): add workflow copy command #10).PromotionExpectedSource(withcommitShavalidation) andApplyPromotionResult.ExpectedSource()are added for feat(workflow): add workflow copy command #10 to reuse.promotePackageResultDtowas checked and has no drift.GitLab providers
gitlabis accepted.config{schemaVersion, baseUrl}is accepted on create and update. A base URL must be an absolute http(s) URL, andconfigon agitprovider is rejected locally.usernameonly ongitproviders; GitLab ignores it. Update can't know the provider type, so it leaves that check to the server.provider createcan now be built from flags:--name,--type,--base-url,--auth-type,--key-type,--username,--password-stdin. These can't be combined with--input. The token never goes in argv: it comes from a no-echo prompt or from stdin, and the document is validated before the prompt.Read fields that were dropped
config.baseUrl, connectiontarget.repositoryPath, each config'scheckout{hasCheckout, matchesConfig}(on connection get and config upserts), and applydataTables.updatedare now kept.PromotionTarget) and a write document (PromotionTargetDocument).repositoryPathis never sent, and--inputcontaining it is rejected locally with a "read-only" message.Non-breaking
gitConnection:discoverscope entry for feat(workflow): add workflow copy command #10's repository listing.promoteruns on the instance connection and ignores personal projects, so project links don't select what is promoted (needsvariable:listwhen workflows use variables). Theprojectgroup help now says links are for projects-scope connections.Idempotency-Key(chore(release): clarify tag-on-main guard and feat-only curation #12) and the continue/project-selection commands (feat(workflow): add workflow copy command #10).Verification
automate.vineskills.com(403).make docs && make checkgreen.go test -race -shuffle=ongreen for cli/n8n/coverage.🤖 Generated with Claude Code