Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
 
 

README.md

Outline

Serverless Github Check

Serverless Github Check. This repo is part of the Serverless November Challenge

Use Case

The idea is to validate that all Pull Requests are related to a specific trello card.

Check rules:

  • To pass the check, the Pull Request body should start with: "Related trello card: https://trello.com/"

Setup

  • Set your github token in AWS Parameter Store. The project is already configured to take the token from there if you call it githubToken. More info about adding parameters to AWS Parameter Store and why it's good to use it here

  • Deploy the service

serverless deploy

After the deploy has finished, you should see something like:

Service Information
service: serverless-github-check
stage: dev
region: eu-west-1
stack: serverless-github-check-dev
api keys:
  None
endpoints:
  POST - https://abcdefghij.execute-api.eu-west-1.amazonaws.com/dev/webhook
functions:
  githubCheck: serverless-github-check-dev-githubCheck
  • Configure the webhook in the github repository settings. This link can help you.

    • In the Payload URL, set the API POST endpoint of your function.
    • In the types of events to trigger the webhook, select "Let me select individual events". Once there, select at least Pull Requests.
  • Apply the github check for Trello cards or change the rule to apply a new one! :)

Morty Proxy This is a proxified and sanitized view of the page, visit original site.