Lambdas to update Jira according to Github actions
This project contain 2 AWS lambda which listen to Github webhook and update Jira given the following actions mapping:
create a .env
file with the following environment variables:
TOKEN=YOUR_JIRA_TOKEN
JIRA_DOMAIN=YOUR_JIRA_DOMAIN
USERNAME=YOUR_JIRA_USERNAME
# The following environment variables should be named from your Jira configuration
GITHUB_PR_OPEN="In Review"
GITHUB_BRANCH_OPEN="In Progress"
GITHUB_PR_MERGED="Done"
Install dependencies:
npm install
Deploy the lambda to your AWS distribution:
serverless deploy
Then:
create_branch
event should point to branch-lambda.js
and pull_request
events should point to pr-lambda.js
Install pre-commit on your local machine:
brew install pre-commit
Add a .pre-commit-config.yaml
file to your project with the following content:
repos:
- repo: https://github.com/milin/giticket
rev: "868d937"
hooks:
- id: giticket
args: ["--format=[{ticket}] {commit_msg}"] # Optional