https://github.com/wallabag/serverless-bot
:zap: A Serverless project does some stuff to help the wallabag team
https://github.com/wallabag/serverless-bot
github github-webhooks hacktoberfest serverless serverless-framework wallabag-team webhook
Last synced: 27 days ago
JSON representation
:zap: A Serverless project does some stuff to help the wallabag team
- Host: GitHub
- URL: https://github.com/wallabag/serverless-bot
- Owner: wallabag
- License: mit
- Created: 2018-12-19T21:10:04.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2025-09-08T00:02:35.000Z (29 days ago)
- Last Synced: 2025-09-08T02:18:59.124Z (29 days ago)
- Topics: github, github-webhooks, hacktoberfest, serverless, serverless-framework, wallabag-team, webhook
- Language: JavaScript
- Homepage:
- Size: 7.5 MB
- Stars: 5
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wallabag Serverless Bot

This serverless project does some stuff to help the wallabag team. It:
- validates PRs sent to site-config repository: [fivefilters](https://github.com/fivefilters/ftr-site-config) & [graby](https://github.com/j0k3r/graby-site-config)
- automatically label PRs created by Weblate
- more to come!
## Use Cases
Available lambdas:
- **extension**: It validates each file in the diff has a `.txt` extension.
- **weblate**: It automatically label PRs created by Weblate.## Prerequisites
- Node.js 22
- OSS Serverless (`npm install -g osls`)
- An AWS account
- Defined [provider credentials](https://serverless.com/framework/docs/providers/aws/guide/credentials/)## Setup
### Deploy the code
- Get a [new personal access token](https://github.com/settings/tokens/new) on GitHub
- Set it in [AWS Parameter Store](https://eu-west-1.console.aws.amazon.com/systems-manager/parameters/create?region=eu-west-1) as a `SecureString` with name `GITHUB_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`### Setup GitHub webhook
Configure the webhook in [the GitHub repository settings](https://developer.github.com/webhooks/creating/#setting-up-a-webhook).
- In the Payload URL, enter the URL you received after deploying. It would be something like `https://.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`.### Some options
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)
## Info
Inspired from [20minutes/serverless-github-check](https://github.com/20minutes/serverless-github-check).