Giter Club home page Giter Club logo

ado_workitems_to_github_issues's Introduction

ado_workitems_to_github_issues

Notes

Just a heads up, if you have the -gh_update_assigned_to flag set to $true, you/your users will receive a lot of emails.

Prerequisites

  1. Install az devops and github cli where this is running (ie: action or locally; GitHub-hosted runners already have)
  2. Create a label for EACH work item type that is being migrated (as lower case)
    • ie: "user story", "bug", "task", "feature"
  3. define under what area path you want to migrate
    • You can modify the WIQL if you want to use a different way to migrate work items, such as [TAG] = "migrate"

Things it migrates

  1. Title
  2. Description (or for a bug, repro steps and/or system info)
  3. State (if the work item is done / closed, it will be closed in GitHub)
  4. It will try to assign the work item to the correct user in GitHub - based on ADO email before the @
    • This uses the -gh_update_assigned_to and -gh_assigned_to_user_suffix options
    • Users have to be added to GitHub org
  5. Migrate acceptance criteria as part of issue body (if present)
  6. Adds in the following as a comment to the issue:
    • Original work item url
    • Basic details in a collapsed markdown table
    • Entire work item as JSON in a collapsed section

To Do

  1. Create a comment on the Azure DevOps work item that says "Migrated to GitHub Issue #"

Things it won't ever migrate

  1. Created date/update dates

Example

Instructions for Running in Actions

The recommendation is to use a GitHub App to run the migration - a GitHub app has higher rate limits than using a user PAT.

  1. Create GitHub App with (can use this reference). Use the following permissions:
    • Repo: Contents:Read
    • Repo: Issues:Read and write
    • Org: Members:Read
  2. Create Private Key for GitHub App
  3. Obtain App ID and Installation ID - see the instructions for using smee.io
  4. Create the following action secrets:
    • ADO_PAT: Azure DevOps PAT with appropriate permissions to read work items
    • PRIVATE_KEY: The contents of the private key created and downloaded in step #2
  5. Use the action and update the App ID and Installation ID obtained in step #3
  6. Update any defaults in the action (ie: Azure DevOps organization and project, GitHub organization and repo)
  7. Ensure the action exists in the repo's default branch
  8. Run the workflow

Instructions for Running Locally

Using the GitHub app might be better so you don't reach a limit on your GitHub account on creating new issues ๐Ÿ˜€

./ado_workitems_to_github_issues.ps1 -ado_pat "xxx" -ado_org "jjohanning0798" -ado_project "PartsUnlimited" -ado_area_path "PartsUnlimited\migrate" -gh_pat "ghp_xxx" -gh_org "joshjohanning-org" -gh_repo "migrate-ado-workitems" -gh_update_assigned_to $true -gh_assigned_to_user_suffix "_corp" -gh_add_ado_comments $true

ado_workitems_to_github_issues's People

Contributors

joshjohanning avatar williamfigtree avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.