Merged stacked diffes shouldn't error in the upstreams diffes

Checklist

  • I'm using the latest version of the extension (Run glab --version)
    • Extension version: 1.45.0
  • Operating system and version: Windows 11
  • Gitlab.com or self-managed instance? self-managed
  • GitLab version (if self-managed) 16.8.1
  • I have performed glab auth status to check for authentication issues

Summary

When working with a feature in a stacked diffes. Let's say you have made branches a, b, and c. When a is completed, if you tried to sync c or a new d, you get an error:

could not run sync: error getting merge request from branch: no open merge request available for "glab-stack-user-page-51c505cc". Does it still exist?

It should either ignore merged MRs or prompt to delete them. For example, Graphite prompts you to delete merged PRs.

Environment

  • OS: MINGW64_NT-10.0-22631 3.4.10-87d57229.x86_64 x86_64
  • SHELL: /usr/bin/bash
  • TERM: xterm-256color
  • GLAB: Current glab version: 1.45.0

Other:

Steps to reproduce

  • Crate stack with multiple diffes
  • Merge one
  • run glab stack sync

What is the current bug behavior?

could not run sync: error getting merge request from branch: no open merge request available for "glab-stack-user-page-51c505cc". Does it still exist?

What is the expected correct behavior?

Ignore the merged MRs or prompt to delete

Possible fixes

Currently, I have to edit files in .git/stacked manually removing some pref and the files of merged MRs

Assignee Loading
Time tracking Loading