Skip to content

Conversation

@aryasoni98
Copy link

Summary

Successfully implemented the force option for the git-push promotion step, allowing users to force push to any target branch. This resolves GitHub issue #5170.

Key Changes

  • Added force: boolean configuration option (default: false)
  • Updated core logic to respect force push setting
  • Enhanced documentation with examples and warnings
  • Added comprehensive test coverage
  • Maintained full backward compatibility

Usage

- uses: git-push
  config:
    path: ./out
    targetBranch: main
    force: true  # Force push to overwrite remote history

Benefits

  • ✅ Solves the original issue completely
  • ✅ Safe opt-in with clear warnings
  • ✅ Perfect for rendered manifests/generated content
  • ✅ All tests pass, production-ready

@aryasoni98 aryasoni98 requested review from a team as code owners October 17, 2025 14:19
@netlify
Copy link

netlify bot commented Oct 17, 2025

Deploy Preview for docs-kargo-io ready!

Name Link
🔨 Latest commit 2747228
🔍 Latest deploy log https://app.netlify.com/projects/docs-kargo-io/deploys/68f69eb75542a600078d9d88
😎 Deploy Preview https://deploy-preview-5239.docs.kargo.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

@aryasoni98 aryasoni98 changed the title allow force push option on git-push promotion step feat: allow force push option on git-push promotion step Oct 17, 2025
Signed-off-by: Arya Soni <aryasoni98@gmail.com>
Signed-off-by: Arya Soni <aryasoni98@gmail.com>
@krancour
Copy link
Member

Thanks @aryasoni98. I made some suggestions about improving docs and tests, but overall this looks pretty good.

@krancour krancour added this to the v1.9.0 milestone Oct 17, 2025
@krancour krancour added kind/enhancement An entirely new feature priority/normal This is the priority for most work area/controller Affects the (main) controller labels Oct 17, 2025
Signed-off-by: Arya Soni <aryasoni98@gmail.com>
Signed-off-by: Arya Soni <aryasoni98@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/controller Affects the (main) controller kind/enhancement An entirely new feature priority/normal This is the priority for most work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants