magit / forge

Work with Git forges from the comfort of Magit
GNU General Public License v3.0
1.33k stars 117 forks source link

Cannot visit closed topics from magit status buffer #583

Closed jroimartin closed 1 year ago

jroimartin commented 1 year ago

Expected behavior:

  1. C-x g to open a magit status buffer
  2. f n to fetch topics
  3. TAB on Pull requests or Issues to expand section
  4. RET on a closed pull request or issue
  5. The pull request or issue is shown in a new buffer

Observed behavior:

  1. C-x g to open a magit status buffer
  2. f n to fetch topics
  3. TAB on Pull requests or Issues to expand section
  4. RET on a closed pull request or issue
  5. The prompt View pull-request or View issue is shown in the minibuffer.

However, I can visit both closed and open pull requests and issues if I press N l t (or N l p, N l i) and RET on an item.

forge version: 20230522.1054 (MELPA) magit version: 20230606.1402 (MELPA)

tarsius commented 1 year ago

For the time being, as a workaround, use C-u RET instead of RET.

Fixing this would be simple (while risking to break other commands in the process), but doing it properly will involve some design decisions and testing.

jroimartin commented 1 year ago

Thanks for the workaround! It works perfectly. Just out of curiosity, what's the effect of setting the prefix?

c3d commented 1 year ago

@tarsius Tested the workaround as well. Works fine.

johannes-mueller commented 1 year ago

The prompt View pull-request is quite confusing when there are only closed PRs around. In that case there are no completions offered and the only thing the user can do is to quit the command. Hitting return on a closed PR and then confirming the empty prompt leads to the error message

cl-no-applicable-method: No applicable method: forge-get-pullreq, nil

which somehow suggests that there is a bug somewhere or something is not properly configured/installed.

tarsius commented 1 year ago

I am actually working on this now. Should be ready in a day or two.

tarsius commented 1 year ago

Fixed in 3b73be586c746c919f4c866936651845430395ad, as part of a major refactoring of view, browse and copy commands.

There are some changes in behavior and room for future tweaking. Most notably, C-c C-w now puts an url on the kill-ring; only C-c C-o actually opens the url in a browser. On the other hand, that now works in more places. And on commits it now browses the commit, not some random branch.