Skip to main content

Tracking Changes from GitHub in Azure Boards

Hands-On Lab

 

Photo of Chad Crowell

Chad Crowell

DevOps Training Architect II in Content

Length

00:45:00

Difficulty

Intermediate

In this hands-on lab, you will be integrating a GitHub repository with your Kanban board in Azure DevOps. The integration will allow you to track commits, pull requests, and merges in your GitHub repository and automatically sync those changes with Azure Boards, so you can better visualize work in progress.

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.

Tracking Changes from GitHub in Azure Boards

Introduction

In this hands-on lab, we will be integrating a GitHub repository with our Kanban board in Azure DevOps. The integration will allow us to track commits, pull requests, and merges in our GitHub repository and automatically sync those changes with Azure Boards, so we can better visualize work in progress.

Connecting to the Lab

Log in to the Azure Portal using the credentials provided on the lab instructions page.

Create a New Azure DevOps Organization

  1. Click All services in the left-hand menu
  2. Run a search for "DevOps" and select Azure DevOps.
  3. Click the My Azure DevOps Organizations link (this will open a new tab).
  4. Once the fields have auto-populated with the name, email, and location, click Continue.
  5. Click Create new organization.
  6. Uncheck the checkbox and then click Continue.
  7. Choose a name for your new DevOps organization (the default will suffice).
  8. Leave the default name for the new DevOps organization, select Central US as the location, and click Continue.
  9. In a new browser tab, navigate to the Demo Generator to populate the Azure Board.
  10. On the Demo Generator website, click Sign In, scroll to the bottom, and click Accept.
  11. On the Create New Project screen, select the organization you just created in the previous steps from the dropdown menu.
  12. Enter the project name "PartsUnlimited".
  13. Click Choose template, choose PartsUnlimited from the pop-up menu, and click Select Template.
  14. Click Create Project. It will take a minute or so for the project to finish being created.

(Optional) Create a New GitHub Account for Free

  1. In a new browser tab, navigate to https://github.com.
  2. Click Sign up.
  3. Create a new username, enter your email address, and create a new password.
  4. Click Verify to verify your account, and click Next: Select a plan.
  5. Under Choose a plan, select Choose Free.
  6. On the Welcome to GitHub page, scroll down and select Skip this step.
  7. GitHub has just sent you an email. Click the link inside the email to verify your email address. (Once you've clicked the link in the email, you are brought back to GitHub.com.)

Fork the PartsUnlimited Repo and Connect GitHub Account

  1. Navigate to the PartsUnlimited repo.
  2. Click Fork to fork the repo to your GitHub account.
  3. Back in the Azure DevOps tab, open the PartsUnlimited Azure DevOps project we created in the first task.
  4. Click Project settings in the lower left corner.
  5. Select GitHub connections and then Connect your GitHub account.
  6. Click Authorize AzureBoards when prompted. (This directs you to GitHub.com temporarily.)
  7. Back in your project settings, select the PartsUnlimited forked repo and click Save in the bottom right corner.
  8. Click Approve, Install, & Authorize when prompted. (This directs you to GitHub.com temporarily.)

Change the Code in GitHub and View Tracking Info Within the Work Item

  1. Click Boards in the left-hand menu.

  2. Click Boards as the sub-menu item, and select PartsUnlimited Team boards.

  3. View the bug labeled Decline in orders noticed - Please Investigate immediately, and copy the issue number (needed for the following steps).

  4. Back in the GitHub repository we forked in the previous task, select the PartsUnlimited.Mobile.sln file from within the repository.

  5. Click the pencil icon to edit the file.

  6. Under the # Visual Studio line, enter a new line and type the comment:

    # Orders Change
  7. In the Commit changes section, enter your commit message (replacing <issue number> with the bug issue number you copied a few minutes ago):

    fixed AB#<issue number>
  8. Select Create a new branch for this commit and start a pull request.

  9. Click Propose file change.

  10. Leave a comment in the pull request (e.g., "change orders"), and click Create pull request.

  11. Click Merge pull request to merge this branch to the master branch, and click Confirm merge.

  12. Go back to the Kanban board and view the changes, as they were automatically synced with the work item. Notice the issue has been moved across the board into the Done lane.

(Optional) Delete your GitHub Account

  1. Go to GitHub, and click your avatar in the upper right corner.
  2. Select Settings from the dropdown menu.
  3. Click Account in the left-hand menu.
  4. Click Delete your account.
  5. Type your username or email, and verify by typing in "delete my account."
  6. Click Cancel plan and delete this account.

Conclusion

Congratulations on successfully completing this hands-on lab!