This serverless project does some stuff to help the wallabag team. It:
- validates PRs sent to site-config repository: fivefilters & graby
- automatically label PRs created by Weblate
- more to come!
Available lambdas:
- extension: It validates each file in the diff has a
.txt
extension. - weblate: It automatically label PRs created by Weblate.
- Node.js 20
- Serverless CLI v3.37.0 or later (
npm install -g serverless@3
) - An AWS account
- Defined provider credentials
- Get a new personal access token on GitHub
- Set it in AWS Parameter Store as a
SecureString
with nameGITHUB_TOKEN
- Deploy the service using:
serverless deploy
By default
- it'll use the AWS profile
default
, but you can use your own using (be sure it's defined in your~/.aws/credentials
):serverless deploy --aws-profile myprofile
- it'll be deployed to the AWS region
eu-west-1
but you can change it using:serverless deploy --region us-east-1
Configure the webhook in the GitHub repository settings.
- In the Payload URL, enter the URL you received after deploying. It would be something like
https://<your_url>.amazonaws.com/dev/webhook/...
. - Choose the "application/json" in Content type.
- In the types of events to trigger the webhook, select "Let me select individual events", then select at least
Pull Requests
.
You can update some options from the serverless.yml
file:
NAMESPACE
: change the namespace used in the PR check (displayed at the bottom of each PR)
Inspired from 20minutes/serverless-github-check.