GitHub Issues – Do you sync to Azure DevOps?

Last updated by Tiago Araújo [SSW] almost 2 years ago.See history

If you store all your code in GitHub, why not create all your issues there too?

You might be reluctant to move your backlog to GitHub from Azure DevOps as you don’t want to lose the metrics functionality.

But you can easily sync all your GitHub Issues to Azure DevOps automatically to have the best of both worlds.

Here's a quick guide in setting it up for your GitHub Repository and Azure DevOps.

  1. Install the Azure Boards App from the GitHub Marketplace
  2. Create the GitHub Action secrets
  3. ADO_PERSONAL_ACCESS_TOKEN (Azure DevOps | User settings | Security | Personal access tokens)
    The Azure Personal Access Token requires "read & write" permission for Work Items.
  4. GH_PERSONAL_ACCESS_TOKEN (GitHub | Personal settings | Developer settings | Personal access tokens)
    The GitHub Personal Access Token requires "repo" permissions.
  5. ADO_ORGANIZATION (https:// ssw .visualstudio.com/SSW.Rules)
    The Organization name is in your Azure DevOps URL.
  6. ADO_PROJECT (https://ssw.visualstudio.com/ SSW.Rules)
    The Project name can also be found in your Azure DevOps URL.
  7. Create the following GitHub Action

E.g. SSW uses this template for their projects, you may need to change the new and closed states depending on your environment.

name: Sync issue to Azure DevOps work item
on:
  issues:
    types:
      [opened, edited, deleted, closed, reopened, labeled, unlabeled, assigned]

jobs:
  alert:
    runs-on: ubuntu-latest
    steps:
      - uses: danhellem/github-actions-issue-to-work-item@master
        env:
          ado_token: "${{ secrets.ADO_PERSONAL_ACCESS_TOKEN }}"
          github_token: "${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}"
          ado_organization: "${{ secrets.ADO_ORGANIZATION }}"
          ado_project: "${{ secrets.ADO_PROJECT }}"
          ado_wit: "Product Backlog Item"
          ado_new_state: "New"
          ado_close_state: "Done"
          ado_bypassrules: true

Figure: Good Example - GitHub Action to Sync Issues to Azure DevOps

GitHub Issues Syncing to AzDevOps
Figure: Good Example - GitHub Issues Syncing to Azure DevOps

Pros

  • Easily manage Sprints and calculate burndown and cycle time
  • See all your GitHub Issues and Azure DevOps PBIs in one Backlog
  • Automated tagging and hyperlinking between Issues and PBIs

Cons

  • The sync is only one-way GitHub Issues -> Azure DevOps Backlog
  • It won’t sync existing GitHub Issues unless they are updated

More information about this GitHub Action can be found here https://github.com/danhellem/github-actions-issue-to-work-item

To avoid people adding a PBI to the Azure DevOps, add a PBI at the top of your backlog to indicate that they should add it to GitHub issues.

GitHub PBI Backlog
Figure: Add the PBI at the top of your backlog

GitHub PBI Backlog Text
Figure: Inform users where to add new PBIs

We open source. Powered by GitHub