Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Latest commit

 

History

History
62 lines (43 loc) · 2.51 KB

README.md

File metadata and controls

62 lines (43 loc) · 2.51 KB

The usage of this marketplace extension is pretty low and we have decided to deprecate it.

Sync GitHub Pull Requests to Azure DevOps

Create a Pull Request in GitHub and have that Pull Request show up on Azure Boards

Update the Pull Request description will update the Pull Request in Azure Boards

Complete the Pull Request in GitHub will close the Pull Request in Azure DevOps

alt text

Outputs

The id of the work item created or update

Example usage

  1. Add a secret named ADO_PERSONAL_ACCESS_TOKEN containing an Azure Personal Access Token with "read & write" permission for Work Items

  2. Add an optional secret named GH_PERSONAL_ACCESS_TOKEN containing a GitHub Personal Access Token with "repo" permissions. See optional information below.

  3. Install the Azure Boards App from the GitHub Marketplace

  4. Add a workflow file which responds to pull request events of opened, edited, closed

    • Set Azure DevOps organization and project details.
    • Set specific work item type settings (work item type, new state, active state, closed state)

    Optional Env Variables

    • github_token: Used to update the Issue with AB# syntax to link the work item to the issue. This will only work if the project is configured to use the GitHub Azure Boards app.
    • debug: true for verbose logging to help debug problems. Remove this variable from the YAML file if you do not want to see verbose logging.
name: Sync Pull Request to Azure Boards

on:
  pull_request_target:
    types: [opened, edited, closed]
    branches:
      - master

jobs:
  alert:
    runs-on: ubuntu-latest
    steps:
    - uses: danhellem/github-actions-pr-to-work-item@master
      env:
        ado_token: '${{ secrets.ADO_PERSONAL_ACCESS_TOKEN }}'   
        github_token: '${{ secrets.GH_TOKEN }}'    
        ado_organization: 'privatepreview'
        ado_project: 'Agile'
        ado_wit: 'User Story' 
        ado_new_state: 'New'
        ado_active_state: 'Active'
        ado_close_state: 'Closed'
        ado_area_path: 'optional_area_path\\optional_area_path'

Want to contribute?

See Contribution guidelines for more information