ReleaseHawk automatically creates pull requests as soon as your GitHub, file or API dependencies are updated.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.vscode
config
content
custom_modules
jobs
migrations
public
src
test
.editorconfig
.eslintrc.json
.gitignore
.sequelizerc
LICENSE
Procfile
README.md
package-lock.json
package.json
queue.js

README.md

ReleaseHawk

Getting Started

Environment Variables

Create an .env file and populate it with the values for the following variables:

  • FEATHERS_AUTH_SECRET: Secret for feathers-authentication
  • PORT: port to start server on (local only)
  • GITHUB_CLIENT_SECRET: secret from GitHub App
  • GITHUB_CLIENT_ID: id from GitHub App
  • GITHUB_ISSUE_ID: issue id from GitHub App
  • GITHUB_PRIVATE_KEY: Private key generated via GitHub app
  • GITHUB_WEBHOOK_SECRET: Private secret to verify event signatures
  • DATABASE_URL: Postgres connection string
  • CLOUDAMQP_URL: AMQP connection string
  • WORK_PATH: Local directory where repos are cloned and worked on
  • CHECK_INTERVAL: Time in ms before a check is considered out of date

Running the Application Locally

  • Start RabbitMQ server
  • Run migrations yarn run develop:sequelize db:migrate
  • Run yarn run develop

Running a job

yarn run develop:<job name>

All develop: scripts use the environment variables from your .env file so it is required when running locally.

Deploying

git push heroku master


Data Structure

Repositories (repos)

Stores each repo ReleaseHawk is installed on along with the installationId.

Watches (watches)

Represents each entity that needs to be watched. lastUpdated is a checksum for the current release, lastCheckedAt is the timestamp of the last time the target was checked.

Background Tasks

check

This is a periodic task that checks if there is a newer or different release than the current one recorded in the DB. This will also remove any watches not in the repo's config.

check-settings

This is a periodic task that checks if there are changes in a watch's config. New targets are added as watches.

RabbitMQ Jobs

setup

Clones the repo and creates a PR with a starter config file and instructions. If any issues are encountered, an issue will be created instead.

finalize

Parses a repo's config file creating an entry in watches for each target.

update

Clones a repo, downloads the latest version of the target and (optionally) runs a script before submitting a PR for the update.

GitHub App Integration

Events

ReleaseHawk listens to installation, installation_repository, pull_request and issue events from each repository.

Incoming events are verified by matching the X-Event-Signature with a signature created using ReleaseHawk's webhook secret.

Changelog

0.0.1

  • Initial release

License

Copyright (c) 2018

Licensed under the MIT license.