Features: TRIssues will:
- provide an Integration panel within Pivotal Tracker allowing you to see (selected) issues from GitHub and drag them into other Tracker panels to make matching Tracker stories.
- set labels on GitHub issues named after Tracker story states each time a story imported from GitHub changes state in Tracker
- keep labels on Tracker stories imported from GitHub in sync with the labels applied to them in GitHub
Assumptions (aka current limitations):
- TRIssues links a single "project" in Pivotal Tracker to a single GitHub repository
-
Set up your Tracker integration
- Go to https://www.pivotaltracker.com/projects/{project id}/integrations
- Scroll to #External Tool Integrations
- Select "Other" from the Create New Integration dropdown
- Enter a name, and basic auth credentials if the server you'll be running TRIssues on requires it
- For Base URL, enter https://github.com/{repo owner}/{repo name}/issues/
- For Import API URL, enter {your TRIssues server scheme/host/port}/githubissues
- Click save, mouse over the new "Edit" link, and copy the integration ID number from the URL — you'll need this for the TRIssues config.
-
Set up your Tracker webhook
- Go to https://www.pivotaltracker.com/projects/{project id}/integrations
- Scroll to #Activity Web Hook
- Enter {your TRIssues server scheme/host/port}/fromtracker
- Make sure v5 is selected and click "ADD"
-
Set up your GitHub webhook
- Go to https://github.com/{repo owner}/{repo name}/settings/hooks
- Click "Add Webhook"
- For Payload URL enter {your TRIssues server scheme/host/port}/fromgithub
- Choose "All"
- Click Add Webhook
-
Collect configuration information
- You already have:
- A Tracker project
- A corresponding GitHub repository
- The ID number for the Tracker project (from the web page address when you're logged in to Tracker and viewing that project)
- The owner and repository names for the mathing GitHub repo (from the web page address of that repo in GitHub)
- The Tracker integration ID number for its connection to GitHub (from the step above where you created that integration)
- Get/create a Tracker API token:
- Choose a Tracker user, youself or another Tracker profile that is a Member or Owner of your Tracker project. Updates to your project performed by TRIssues on behalf of GitHub will be recorded in your project history as actions by the user you select.
- Sign in to Tracker as the selected user
- Go to https://www.pivotaltracker.com/profile
- Scroll to #API TOKEN
- Get the long letters-and-numbers string next to "API token", or click "Create Token" if there isn't a token value present already
- Get a GitHub API token
- Choose a GitHub user, youself or another GitHub user that has access to your repository. Updates to your repo performed by TRIssues on behalf of Tracker will be recorded in your repository's history as actions by the user you select.
- Generate the access token by accessing the GitHub API with the credentials of the selected GitHub user
- You already have:
$ curl -i -u username -d '{"scopes":["repo"]}' https://api.github.com/authorizations ```
- Deploy TRIssues on a publicly-accessible server
- if using run.pivotal.io:
- if using run.pivotal.io:
$ cf login -a https://api.run.pivotal.io $ cf push trissues --no-start #Doesn't restart cleanly. ```
- Set server-configuration environment variables on your server
- Required:
- Required:
TRISSUES_AUTH_GITHUB={Github API key} TRISSUES_AUTH_TRACKER={Tracker API token} TRISSUES_GITHUB_REPO={owner name/repo name} TRISSUES_TRACKER_PROJECTID={Tracker project id} TRISSUES_TRACKER_INTEGRATIONID={Tracker integration id} ```
* Optional:
```sh
TRISSUES_SERVER_PORT={server port on which to receive webhooks—you'll have already included this in the Tracker and GitHub webhook configurations if needed} TRISSUES_EXCLUDE_LABELS={comma-separated list of GitHub labels that should exclude Issues from the Tracker integration panel} ```
- If hosting on run.pivotal.io, use
$ cf start trissues
- Else,
npm start