vscode-pull-request-github icon indicating copy to clipboard operation
vscode-pull-request-github copied to clipboard

Display linked issue(s) from the PR Overview

Open mohamedamara1 opened this issue 1 year ago • 6 comments

This is feature request to adding the ability to link an issue(s) to a PR from the PR Overview in the sidebar just like in Github, I often find myself doing this.

I would like to also work on this if possible .

image

image

mohamedamara1 avatar Mar 10 '24 09:03 mohamedamara1

@alexr00 any infos on if we need this now? I opened a PR and want to keep working on it

mohamedamara1 avatar Mar 11 '24 17:03 mohamedamara1

I am not aware of GitHub API that lets us do this, but if you've found GitHub API that lets you link an issue then that's great. I would accept a PR for it. I imagine that the feature would work like this:

  • There would be a new "Development" section in the sidebar
  • When you click on the gear or section title it would open a quick pick with issues
  • I don't know what the query for the issues should be. You would likely need to update the query based on what the user types

alexr00 avatar Mar 12 '24 10:03 alexr00

Well, after researching, there is no API that links an issue to a PR or vice versa, yet.

But we can for now create the Development section and it will be read only, it will list the linked issues without allowing the user to make changes to it.

There's also the workaround of creating comments with a keyword like "fixes #" or "resolves #" etc.. to indirectly reference an issue, but I don't think this looks good when there are multiple issues to link.

This is how it looks like in the draft PR that I opened (it's WIP just wanted to see if I can get it to list the linked issues)

image

mohamedamara1 avatar Mar 12 '24 11:03 mohamedamara1

Sounds good. We should not show the gear icon in the Linked Issues section though since it cannot be changed.

alexr00 avatar Mar 12 '24 11:03 alexr00

Alright, I will create another issue for it then to mention that it will just display the linked issues and feel free to close this one if you'd like.

mohamedamara1 avatar Mar 12 '24 11:03 mohamedamara1

It's fine to use this issue since we have had a discussion in it. I'll just rename the issue.

alexr00 avatar Mar 12 '24 12:03 alexr00