[#2696] Bumped git-artifact to 1.7.0 and add an option for stale deployment branch cleanup.#2827
Conversation
WalkthroughThe deployment script now uses git-artifact 1.7.0 and supports optional stale remote branch cleanup through new environment variables. Tests cover default flag omission and configured flag propagation, while documentation describes the settings and cleanup guarantees. ChangesGit artifact stale branch cleanup
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant vortex-deploy-artifact
participant git-artifact
participant RemoteGit
vortex-deploy-artifact->>git-artifact: Invoke artifact push
git-artifact->>RemoteGit: Push destination branch
vortex-deploy-artifact->>git-artifact: Pass cleanup flags when pattern is configured
git-artifact->>RemoteGit: Remove eligible stale branches
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
This comment has been minimized.
This comment has been minimized.
|
Code coverage (threshold: 90%) Per-class coverage |
This comment has been minimized.
This comment has been minimized.
1 similar comment
|
Code coverage (threshold: 90%) Per-class coverage |
|
📖 Documentation preview for this pull request has been deployed to Netlify: https://6a6088b92715ec68e8d1fa1f--vortex-docs.netlify.app This preview is rebuilt on every commit and is not the production documentation site. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2827 +/- ##
==========================================
- Coverage 86.78% 86.35% -0.44%
==========================================
Files 98 91 -7
Lines 4783 4624 -159
Branches 47 3 -44
==========================================
- Hits 4151 3993 -158
+ Misses 632 631 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@coderabbitai full review |
✅ Action performedFull review finished. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.vortex/docs/content/tools/git-artifact.mdx:
- Around line 59-62: Update the user-facing sentence in the git-artifact
documentation to replace “a same-named branch” with idiomatic wording such as “a
branch with the same name,” while preserving the existing meaning.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 0254a158-ff43-42b9-8eab-019a7da9f97f
📒 Files selected for processing (3)
.vortex/docs/content/tools/git-artifact.mdx.vortex/tooling/src/vortex-deploy-artifact.vortex/tooling/tests/unit/deploy-artifact.bats
| Each source branch is deployed to a same-named branch in the destination | ||
| repository, so over time the destination accumulates branches for source | ||
| branches that no longer exist. **Vortex** can prune these stale branches after | ||
| each successful push. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Use idiomatic wording.
“a same-named branch” is ungrammatical in user-facing documentation.
Proposed fix
-Each source branch is deployed to a same-named branch in the destination
+Each source branch is deployed to a correspondingly named branch in the destination📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Each source branch is deployed to a same-named branch in the destination | |
| repository, so over time the destination accumulates branches for source | |
| branches that no longer exist. **Vortex** can prune these stale branches after | |
| each successful push. | |
| Each source branch is deployed to a correspondingly named branch in the destination | |
| repository, so over time the destination accumulates branches for source | |
| branches that no longer exist. **Vortex** can prune these stale branches after | |
| each successful push. |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.vortex/docs/content/tools/git-artifact.mdx around lines 59 - 62, Update the
user-facing sentence in the git-artifact documentation to replace “a same-named
branch” with idiomatic wording such as “a branch with the same name,” while
preserving the existing meaning.
Closes #2696
Summary
Bumps
git-artifactfrom 1.4.0 to 1.7.0 invortex-deploy-artifactand wires its new stale-branch cleanup so remote deployment branches left behind by deleted or merged source branches can be pruned automatically after a successful artifact push. Cleanup is controlled by two new environment variables,VORTEX_DEPLOY_ARTIFACT_CLEANUP_PATTERNandVORTEX_DEPLOY_ARTIFACT_CLEANUP_AGE, and stays disabled by default until a pattern is set.Changes
.vortex/tooling/src/vortex-deploy-artifact: bumped the defaultgit-artifactversion and SHA256 checksum to 1.7.0, addedVORTEX_DEPLOY_ARTIFACT_CLEANUP_PATTERN(comma-separated globs or a single regex literal; a non-empty value enables cleanup) andVORTEX_DEPLOY_ARTIFACT_CLEANUP_AGE(default7), and built thegit-artifactinvocation into anartifact_argsarray so--cleanup-stale,--cleanup-pattern, and--cleanup-ageare only appended when a pattern is set..vortex/tooling/tests/unit/deploy-artifact.bats: updated the two hardcodedgit-artifactdownload version strings to 1.7.0, added an isolated scenario asserting all three cleanup flags stay absent when the cleanup variables are unset, and added a new scenario asserting the flags are passed correctly for a comma-separated multi-pattern value..vortex/docs/content/tools/git-artifact.mdx: bumped the documented default version to 1.7.0 and added a "Stale branch cleanup" section documenting both variables, with glob (feature/*,bugfix/*) and regex pattern examples.Screenshots
N/A - this change affects deploy-time Bash tooling, BATS tests, and docs, with no rendered UI.
Before / After
Summary by CodeRabbit
New Features
Improvements
git-artifactrelease to version 1.7.0.