Lesson 2 of 3 Integrating DevOps Tools

Connecting Azure Boards and GitHub Repositories

This lesson explains how to install the integration, and the exact linking syntax.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe the setup of the Azure Boards app.
  • Use AB# syntax in the supported places.
  • Explain when state transitions occur.
  • Explain the limits of the integration.

Setting up the connection

The integration is delivered by the Azure Boards app for GitHub. The following sequence shows the setup.

  1. Check permissions

    The installer must be an owner or administrator of the GitHub organization, and must have rights in the Azure DevOps project, such as Project Administrator.

  2. Install the app

    Install Azure Boards from GitHub Marketplace, and select all repositories or only selected repositories.

  3. Connect the project

    Choose the Azure DevOps organization and project, then authorize the connection.

  4. Confirm the result

    In Project settings > GitHub connections, the connected repositories appear.

  5. Use the syntax

    Developers include AB# references in commit messages and descriptions.

Repository access can be changed later under the app's Configure page. A GitHub repository should connect to only one Azure DevOps organization, and Azure DevOps Services supports up to 2,000 repositories on one connection. Both GitHub.com and GitHub Enterprise Server are supported.

True or false

Connecting Boards to GitHub

Exam skills 1.3.5

Check the requirements and limits of the Azure Boards app for GitHub.

Log in to try this activity Interactive activities are free with an account.

Linking syntax

The syntax is AB# followed by the work item ID. It is recognized in a commit message, a pull request description and a GitHub issue description. Microsoft documents an important limit: placing AB#125 in a comment, or only in a pull request title, does not create a link. This is a popular exam distractor.

Beyond linking, keywords can change a work item's state. The following table shows how the wording affects the outcome. A state transition happens only when the pull request is merged into the default branch.

Text in the descriptionEffect after merging to the default branch
AB#123Links only; the state does not change
Fixes AB#123 or Fixed AB#123Moves the item to its Resolved category, or Completed if there is none
Closed AB#123Moves the item to the Closed state, if that state exists

The following diagram shows where an AB# reference creates a link to an Azure Boards work item.

Where an AB# reference creates a link. In the pull request title it does not; in the pull request description or a commit message it does, and Fixes AB#512 also moves the work item when the pull request merges.
The scenario is illustrative.
Sort into groups

Will it link, and will it move?

Exam skills 1.3.5

Decide what each reference does once its pull request merges into the default branch.

Log in to try this activity Interactive activities are free with an account.

What appears after connecting

In Azure Boards, the Development section of a work item shows linked commits, branches, pull requests and issues, and pull request cards can show their status, such as draft, review state and checks. A developer can create a GitHub branch from a work item. If a pipeline builds the code in Azure Pipelines, an Integrated in build link can be recorded for a YAML pipeline, and a status badge can be added to a GitHub README to show a board's state.

The integration links items, but it does not synchronize them. A GitHub issue and an Azure Boards work item remain separate records, so a team must decide which is the source of truth. A common design is for Azure Boards to hold planned work, with GitHub issues being used by contributors, and an issue linked to a work item when it is accepted for planning.

Scenario questions

After the connection

Exam skills 1.3.5

Apply what the Boards and GitHub integration does and does not do.

Log in to try this activity Interactive activities are free with an account.
Worked example

A link that does not appear

A developer merges a pull request titled "AB#512 Fix timeout" with an empty description. The commits say only "fix timeout". Work item 512 shows no link. The connection is working for other repositories. What should the developer have done?

The reference is only in the pull request title, which does not create a link. The developer should place AB#512 in the pull request description or a commit message, and using Fixes AB#512 would also move the work item when merged. Reinstalling the app is unnecessary, as the connection works for other repositories, although the administrator should confirm that this repository is among those selected.

Check yourself

A pull request description says Fixes AB#44. When does work item 44 change state?

Show answer

When the pull request is merged into the default branch. Merging into another branch creates a link but does not transition the item.

Exam Tips

Remember for the exam

  • Install the Azure Boards app from GitHub Marketplace; the installer needs organization admin or owner rights.
  • AB# works in commit messages, pull request descriptions and issue descriptions.
  • AB# does not link from comments or from a pull request title alone.
  • Transitions happen when a pull request merges into the default branch.
  • Connect each repository to one Azure DevOps organization.