aviator-co / av

A command line tool to manage stacked PRs with Aviator
https://aviator.co
MIT License
149 stars 12 forks source link

Try checkout the default branch if the current branch is deleted #359

Closed draftcode closed 2 months ago

draftcode commented 2 months ago

This is a continuation of #357. There are people who prefers checkout the default branch if the current branch is deleted after av stack sync. All things considered, change the behavior like this. After av stack sync:

  1. If the originally checked out branch still exists, check it out.
  2. If the originally checked out branch is deleted, check out the default branch if it exists.
  3. If the default branch doesn't exist, check out the remote tracking branch of the default branch if it exists. (It should exist at this point usually.)
  4. Otherwise, do nothing.

This should satisfy all the parties.

aviator-app[bot] commented 2 months ago

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes. Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This PR was merged using Aviator.


See the real-time status of this PR on the Aviator webapp.
Use the Aviator Chrome Extension to see the status of your PR within GitHub.
aviator-app[bot] commented 2 months ago

FlexReview Summary

Based on the code complexity and the author's expertise score, these are the suggested reviewers:

See the list of alternate reviewers in the detailed breakdown below.

Detailed Breakdown Author’s expertise score for the modified files: - `internal/git/gitui/prune.go` (1.00) | Files | Reviewers | | --- | --- | | `internal/git/gitui/prune.go` † | **`@jainankit`** (score: 0.69, current review load: 0) | † Indicates that the file doesn't need an expert review. [(?)](https://docs.aviator.co/flexreview/concepts/approval-requirements) See full breakdown of the reviewers on the Aviator webapp.