@nhi/todo-to-azure

0.0.13 • Public • Published

@nhi/todo-to-azure

THIS IS EXPERIMENTAL

Parses your code for TODO (and other) annotations, and creates tasks/backlog items on Azure DevOps Boards, under the Current Iteration.

It will write back a URL for the created item into the comment.

Example:

Before:

/**
 * TODO:
 * This must be done!
 */ 

After:

/**
 * TODO: https://dev.azure.com/{organization}/{project}/_workitems/edit/{id}
 * This must be done!
 */ 

And this will be added as a Work Item to organization in project, with id.

Installation

yarn add -D @nhi/todo-to-azure

or

npm i -D @nhi/todo-to-azure

Usage

Usage: todoo [options]

Options:
  -v, --verbose         Verbose logging (default: false)
  -d, --dry             Only show parsed Work Items (default: false)
  -P, --show-processed  Show a list of already processed Work Items (default: false)
  -c, --config          Specify location of config file (default: .todo-to-azure.js)
  -i  --include         Glob pattern for files to parse (default: src/**/*.js)
  -t, --token           Personal Access Token for Azure Devops
                        Required scopes:
                        • Project and Team - Read & Write
                        • Work Items - Read & Write
                        Can be also defined in the config file
  -V, --version         output the version number
  -h, --help            display help for command

If you specify the Personal Access Token token in your config file, be sure the file is gitignored, if your repository is public!

Configuration

You can either use the flags shown in Usage, or use an external file. This is .todo-to-azure.js by default.

It looks like this:

module.exports = {
  include: "path/to/src/**/*.js",
  organization: "ORG",
  teamContext: {
    team: "Team name",
    project: "Project name"
  },
  token: "PERSONAL_ACCESS_TOKEN",
  annotations: ["TODO", "HACK", "BUG", "FIX"]
}

Created by NHI.no

Readme

Keywords

none

Package Sidebar

Install

npm i @nhi/todo-to-azure

Weekly Downloads

0

Version

0.0.13

License

MIT

Unpacked Size

13.2 kB

Total Files

6

Last publish

Collaborators

  • petterrein
  • balazsorban