[PR #345] [MERGED] Fix protected branch push rejections not being detected #623

Closed
opened 2026-04-16 15:20:17 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mountain-loop/yaak/pull/345
Author: @gschier
Created: 1/5/2026
Status: Merged
Merged: 1/5/2026
Merged by: @gschier

Base: mainHead: claude/fix-protected-branch-push-BbEZU


📝 Commits (6)

  • dd29c74 Fix protected branch push rejections not being detected
  • 7ff13bc Fix double error toasts on git ops
  • efe98e0 Better error toasts
  • f077fff Lint fixes
  • e045e77 Pre wrap
  • d12c393 Merge branch 'main' into claude/fix-protected-branch-push-BbEZU

📊 Changes

11 files changed (+137 additions, -70 deletions)

View changed files

📝 packages/plugin-runtime-types/src/plugins/Context.ts (+23 -23)
📝 packages/plugin-runtime-types/src/plugins/WebsocketRequestActionPlugin.ts (+4 -1)
📝 packages/plugin-runtime-types/tsconfig.json (+3 -10)
📝 packages/plugin-runtime/tsconfig.json (+2 -7)
📝 src-tauri/yaak-git/src/push.rs (+34 -12)
📝 src-web/components/CreateWorkspaceDialog.tsx (+5 -1)
📝 src-web/components/core/Toast.tsx (+4 -5)
📝 src-web/components/git/GitCommitDialog.tsx (+5 -1)
📝 src-web/components/git/GitDropdown.tsx (+36 -6)
📝 src-web/hooks/useHttpAuthentication.ts (+5 -1)
📝 src-web/lib/toast.tsx (+16 -3)

📄 Description

https://feedback.yaak.app/p/if-the-branch-is-protected-from-pushes-a-rejected-push

When pushing to a protected branch that rejects the push, Yaak
incorrectly reported success because:

  1. The "up-to-date" check happened before the exit status check
  2. There was no explicit check for rejection indicators in git output

This fix:

  • Checks for explicit rejection indicators ("rejected", "failed to push")
    first, before any other checks
  • Moves exit status check before the "up-to-date" check
  • Only reports success/up-to-date when exit code is 0 AND no rejection
    indicators are present
image

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mountain-loop/yaak/pull/345 **Author:** [@gschier](https://github.com/gschier) **Created:** 1/5/2026 **Status:** ✅ Merged **Merged:** 1/5/2026 **Merged by:** [@gschier](https://github.com/gschier) **Base:** `main` ← **Head:** `claude/fix-protected-branch-push-BbEZU` --- ### 📝 Commits (6) - [`dd29c74`](https://github.com/mountain-loop/yaak/commit/dd29c74517d64d760b5dc887a3e496c85c492546) Fix protected branch push rejections not being detected - [`7ff13bc`](https://github.com/mountain-loop/yaak/commit/7ff13bc38c08fb47c5e9fb8a1e836d0e4165a717) Fix double error toasts on git ops - [`efe98e0`](https://github.com/mountain-loop/yaak/commit/efe98e0c3e215b4b50c8893fc7ead87a3f9fca6f) Better error toasts - [`f077fff`](https://github.com/mountain-loop/yaak/commit/f077fffc33bfeb3f2774eeb13e089c91eacb2c99) Lint fixes - [`e045e77`](https://github.com/mountain-loop/yaak/commit/e045e77b0b4ff63a2bf4a0b1ff559a2d047e00cb) Pre wrap - [`d12c393`](https://github.com/mountain-loop/yaak/commit/d12c393ffc1a533dae641e6ef4f3b8433c232256) Merge branch 'main' into claude/fix-protected-branch-push-BbEZU ### 📊 Changes **11 files changed** (+137 additions, -70 deletions) <details> <summary>View changed files</summary> 📝 `packages/plugin-runtime-types/src/plugins/Context.ts` (+23 -23) 📝 `packages/plugin-runtime-types/src/plugins/WebsocketRequestActionPlugin.ts` (+4 -1) 📝 `packages/plugin-runtime-types/tsconfig.json` (+3 -10) 📝 `packages/plugin-runtime/tsconfig.json` (+2 -7) 📝 `src-tauri/yaak-git/src/push.rs` (+34 -12) 📝 `src-web/components/CreateWorkspaceDialog.tsx` (+5 -1) 📝 `src-web/components/core/Toast.tsx` (+4 -5) 📝 `src-web/components/git/GitCommitDialog.tsx` (+5 -1) 📝 `src-web/components/git/GitDropdown.tsx` (+36 -6) 📝 `src-web/hooks/useHttpAuthentication.ts` (+5 -1) 📝 `src-web/lib/toast.tsx` (+16 -3) </details> ### 📄 Description https://feedback.yaak.app/p/if-the-branch-is-protected-from-pushes-a-rejected-push When pushing to a protected branch that rejects the push, Yaak incorrectly reported success because: 1. The "up-to-date" check happened before the exit status check 2. There was no explicit check for rejection indicators in git output This fix: - Checks for explicit rejection indicators ("rejected", "failed to push") first, before any other checks - Moves exit status check before the "up-to-date" check - Only reports success/up-to-date when exit code is 0 AND no rejection indicators are present <img width="1366" height="392" alt="image" src="https://github.com/user-attachments/assets/a3ecdddc-4688-434b-b7f0-7dcb56e69a2a" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-16 15:20:17 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/yaak#623