Skip to content

Refactor PR handling and commit flow - #50

Merged
bennekrouf merged 1 commit into
mainfrom
refactor/pr-handling
Sep 3, 2026
Merged

Refactor PR handling and commit flow#50
bennekrouf merged 1 commit into
mainfrom
refactor/pr-handling

Conversation

@bennekrouf

Copy link
Copy Markdown
Owner

What changed

  • Refactored the RepoStatus struct in src/services/probe.rs to improve PR handling and commit flow.
  • Added a new method pr_to_act_on to determine the most actionable pull request.
  • Updated the default_pr method to use pr_to_act_on for better decision-making.
  • Added tests in src/services/probe.rs to ensure the new logic works as expected.
  • Added a new test in src/services/trusted.rs to simulate the end-to-end commit flow, including the sync step that checks out the base branch.

Why

The changes aim to improve the decision-making process for handling pull requests and ensure a smoother commit flow. The new method pr_to_act_on prioritizes the most actionable pull request, which helps in making better decisions during the commit process. The additional test ensures that the application can handle the sync step correctly without getting stuck.

How to test

  • Open the Repository Status screen and verify that the pull request to act on is correctly identified and prioritized.
  • Run the end-to-end commit flow simulation test in src/services/trusted.rs to ensure that the application can handle the sync step without getting stuck.
  • Check the Sidebar to ensure that the one-line summary reflects the correct status and actions needed.

Refactors PR handling logic to prioritize actionable PRs and ensures commit flow continuity.
@bennekrouf
bennekrouf merged commit 6fb120e into main Sep 3, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant