README
Sprinter
Provides some extended utilities for the GitHub API for operating against multiple GitHub issue trackers at once. |
If you're like me, this library might save you an hour a week. I'm a "scrum master", which sounds silly but is actually a real thing. We have a lot of repos on GitHub. Most of them have issue trackers. So it takes a long time to update all of them for common recurring tasks like sprint changes. This library takes your GitHub credentials and gives you easy ways to set up tasks that execute against multiple GitHub Issue Trackers at once, so you can:
Run the following actions across multiple repos:
- list issues
- list milestones
- create milestones
- close milestones
- update milestones
- create labels
- list labels
- list collaborators
Need a UI?
Use sprinter-dash!
Example Usage
Sprinter is used as the backend to report on issues across all the repositories in the Numenta GitHub Organization on our status board.
Installation
As a library for local scripts
npm install sprinter
Now you can require('sprinter')
and use as defined below in the examples.
As a command line tool
npm install -g sprinter
Now you can run sprinter
from the command line.
sprinter --help
Displays usage information.
Sprinter CLI Tool: Utilities for operating on issue trackers of several repositories at once.
REQUIREMENTS
Environment variables with the GitHub username and personal access token (NOT your master password) for API calls:
GH_USERNAME=<username>
GH_PASSWORD=<personal access token>
Create a personal access token for sprinter.js at https://github.com/settings/applications -> 'Generate token' with 'repo', 'public_repo', and 'repo:status' checked.
USAGE
sprinter <command> <cmd-options> --repos=org/repo,org2/repo2
or
sprinter <command> <cmd-options> --repos=./path/to/repo/file
The repo file should have one repo slug on each line. Instead of providing a --repos option, you could
set the $SPRINTER_REPOS environment variable instead.
COMMANDS
printRepos
Prints the repositories Sprinter is configured to run against.
listIssues [--milestone="milestone name"] [--state="open/closed/all"]
[--assignee="github username"]
Prints all issues. Optionally filters by milestone name, assignee, or state.
listMilestones
Prints all milestones.
listLabels
Prints all labels.
listCollaborators
Prints all collaborators.
createMilestones <title> <description> <due_on>
Creates new milestone in each repo with given title, description, and due date.
`due_on` should be a JS-formattable date string like 'Apr 16, 2014'.
closeMilestones <title>
Closes all milestones matching title across all repos.
updateMilestones <title> <new-title> [due_on]
Updates all milestones matching title across all repos.
EXAMPLE
sprinter createMilestones "1.0.1" "Bug Bash Release" "April 16, 2015" --repos=rhyolight/highlinker,rhyolight/chesster
WARNING: The CLI is not complete. There are some functions within the library that are not exposed as CLI functions.
CLI Usage
Create a file with a list of repositories you want to use sprinter against. It should look something like mine:
nupic-repos.txt
numenta/nupic numenta/nupic.cerebro numenta/nupic.documents # You can add comments numenta/nupic.core numenta/nupic.fluent numenta/nupic.fluent.server numenta/nupic-linux64 numenta/nupic-darwin64 # Whitespace between lines is okay numenta/pycept numenta/nupic.tools numenta/nupic.wallboard numenta/numenta.org
You can also provide the list of repositories directly with the
--repos
option: