0.0.2 • Published 4 years ago

servicegithub v0.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

servicegithub - Version 0.0.2

Monday <> Github integration

This service allows us to

  • change the status of a pulse to "Merge" when the corresponding PR is merged
  • change the status of a pulse from "Catching required" to "Changes required" when the catcher clicks on "Request changes"
  • change the status of a pulse from "Catching required" to "Approved" when the catcher clicks on "Approve"
  • change the status of a pulse from "Catching required" to "Help requested" when the catcher leaves a comment
  • change the status of a pulse from "Catching required" to "Conflict" when the PR is on conflict

IC/DC

This service will also allows us to implement continuous integration and deployment : 1. Once the preprod branch is deployed on the preprod environment (Github > Heroku integration) 2. Then the github service creates the PR from preprod to master 3. It launches all the tests (puppeteer, checking that there are no dependencies from other releases) 4. If the tests are successful, it sends a message to the Release Owner 5. The Release Owner can merge the PR from preprod to master

Glass Review App

This service checks also that the best practices are respected for the PRs: 1. the PRs should not be too long 2. the PRs should be detailed if necessary 3. the release should isolate any database migration 4. the README.md explains what's new for all new versions of the package If the PR does not respect these best practices, the Github Service will change the status of the corresponding pulse on Monday to "GithubCI failed"

Setup

To implement this service on a new repo you have to : 1. add the repo in Github.constant.ts 2. add a github webhook on the repo's settings with Payload URL = https://servicegithubbeta.herokuapp.com/webhook/github/index, Content type = application/json, Secret = ${process.env.SERVICE_GITHUB_TOKEN} and the options Let me select individual events with Pull requests and Pull requests reviews 3. add a heroku webhook on https://dashboard.heroku.com/apps/APP_NAME/webhooks with Payload URL = https://servicegithubbeta.herokuapp.com/webhook/heroku/index, Secret = ${process.env.SERVICE_GITHUB_TOKEN} and the option api:release for the preprod and prod environment 4. On circleCI, add the variable CIRCLECI_TOKEN_TO_SERVICE_GITHUB (you can find the value on heroku app servicegithubbeta) on https://circleci.com/gh/medgo2/{{repo}}/edit#env-vars