Reference GitHub Issues and Pull Requests in Visual Studio

Jessie Houghton

We’re excited to announce the preview release of linking GitHub Issues. With Visual Studio 2022 17.6 Preview 1 you can now mention your issues in the commit message box in the Git Changes window.

Speed up your workflow by linking your related work items directly in Visual Studio. You can use the related items to get more context from the Git Repository window. Learn more about how to leverage this feature below.

Reference Github Issues

Building on the existing Azure DevOps work item support, we’ve enabled the same experience with GitHub. To try it out:

  1. Type # or click the ‘#’ button in the commit message box
  2. The dropdown list includes the most recently opened issues and pull requests that the current user was assigned to, commented on, authored, or was mentioned in
  3. Select the item you’d like to reference
  4. From the Related Work Items section, you can easily open the items in the web

Open a Related Work Item

Get Access to Issues

The feature is on by default in Preview, and it can be toggled from the Preview Features page in settings.

Github Issues preview settings

Additionally, if you aren’t signed into GitHub to view the issues, a message will prompt you to sign in.

Understand the Previous Commits Better in History

Related Work Items in Commit Details

When investigating past commits in the Git Repository window, you can view linked issues and pull requests in the Commit Details pane.

  • First, double-click on the commit in the Git Repository Window to open the Commit Details
  • Then, find the Related Work Items on the right side of the panel with the list of Changes

You’ll get additional context when perusing Git history to understand why changes have occurred.

If the section doesn’t show, please verify that your account setting credentials are up to date.

Engage with us

Without your great feedback and suggestions, we wouldn’t be able to deliver the features you’re looking for! Please continue letting us know how we can improve Visual Studio and let us know what you think about this feature.

7 comments

Discussion is closed. Login to edit/delete existing comments.

  • Eugene Astafiev 1

    Nice!

  • Cédric Vernou 0

    Cool.
    Do it need credential also on public repository?

  • Brian Baker 1

    It’s nice to see the GitHub integration catching up to what we had in TFVC many years ago. I’m looking forward to trying this out!

  • Anonymous 0

    Nice!

    I hope this is very easy to use because I like version control, but sometimes version control is a bit difficult for me. To handle merge conflicts, to know when a commit message is too long, to understand what a tag is and what it should be used for, to understand what relation releases have to tags.

  • Pierre Letter 0

    Does this also work with Azure DevOps Repos?
    It used to be possible in 2019 but that feature is gone.

    • Jessie HoughtonMicrosoft employee 0

      Yes, this also works for Azure DevOps Repos!

  • Adam O'Neil 0

    This is great! Would be nice to see issue number(s) as a column in the commit history itself where they could be searchable and more visible.

Feedback usabilla icon