github / rally

GitHub <> Rally integration
MIT License
123 stars 33 forks source link
github probot rally services-toolbox

Rally + GitHub

A GitHub App in active development built with Probot that integrates Rally (a project management tool) with GitHub. It can be configured to:

The GitHub App will update the Checks API with success/failure as the conditions are met, and provide a detailed report of the artifacts (i.e. defects, user stories) found and their Flow States in Rally.

Get Started

checks-status

rally-pr-connection

How it Works

Every time a pull request is created or updated, Rally + GitHub will check for the existence of a Rally User Story or Defect in the title, body, or commit messages, and then validate that they are in the correct state in Rally.

---
# Name of the GitHub Check
checksName: integrations/rally

# Check PR Body for Rally story/defect (true | false)
checkPRBody: true

# Check PR Title for Rally story/defect (true | false)
checkPRTitle: true

# Check all commit messages for a Rally story/defect (true | false)
checkCommitMessages: true

# Set Rally Flow State to Complete on merge if the PR Body contains "/completes <DEFECT/STORY ID>"
mergeOnPRBody: true

# Comment on the PR in addition to the check message? (true | false)
commentOnPull: false

rally:
  server: https://rally1.rallydev.com

  ## Leave these blank if you use an API key
  ##username: rallyUser
  ##password: rallyPass
  ## This is required if we don't use username/password
  ## NOTE: If you set this in your .env file then you can
  ## leave this commented out. It will override your .env
  #api_key: _1234abc567...

  # Which workspace OID this repo will link to
  workspace: 12345

  # Which projects this repo will link to.
  # To have it connect to any project, leave this value blank
  # Optional - Leave it commented or set to `Any` to allow from any
  #            project in the workspace
  projects:
    - Sample Project
    - devops-engineering

  # List of valid Rally objects to check
  objects:
    - defect
    #- defectsuite
    #- task
    #- testcase
    #- hierarchicalrequirement
    - userstory
    #- story

  # List of Rally states that an issue must be in in order to pass
  states:
    - Defined
    - In-Progress

Creating the GitHub App on your GitHub instance

Deployment

Rally + GitHub is based on the Probot framework and can be deployed as a standard NodeJS application. Ensure that NPM is installed in your deployment environment. Also ensure that the following environment variables are configured. Note: You can also deploy as a Docker container. Please view the Docker Deployment Doc for more info.

# Clone repository to local machine
git clone https://github.com/github/rally

# Change directories into code base
cd rally

# Install all dependencies
npm install

# Create the .env configuration file and update with all needed variables
cp .env.example .env
vi .env
# update .env with configuration variables

# Run the bot
npm start

# Run the bot in the background and output to log
# there are other major ways to achieve this...
# https://github.com/unitech/pm2
# https://github.com/github/auto-fork-sync#running-with-systemd
# https://www.npmjs.com/package/forever
nohup npm start 2>&1 >> /path/to/output.log &

Environment Variables

One of the following is required:

How users can consume Rally + GitHub App

Once you have the GitHub App up and running, users will need to add the configuration file to master branch to have the GitHub App validate their repositories: .github/rally.yml

How to contribute

We invite you to contribute to this GitHub App! Check out Issues (especially those labeled help wanted or good first issue) and jump over to CONTRIBUTING for more details.

License

This project uses the MIT license