https://github.com/tamdilip/aws-git-pull-request-review
Architecture to integrate git repositories with AWS services via webhook to validate pull-requests for code reviews and coverage quality.
https://github.com/tamdilip/aws-git-pull-request-review
api-gateway cloudwatch-event codebuild coverage-report github lambda pull-request-review pull-requests request-review webhook
Last synced: 12 months ago
JSON representation
Architecture to integrate git repositories with AWS services via webhook to validate pull-requests for code reviews and coverage quality.
- Host: GitHub
- URL: https://github.com/tamdilip/aws-git-pull-request-review
- Owner: tamdilip
- Created: 2021-02-08T06:17:51.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-02-08T07:50:50.000Z (about 5 years ago)
- Last Synced: 2025-02-12T10:43:56.497Z (about 1 year ago)
- Topics: api-gateway, cloudwatch-event, codebuild, coverage-report, github, lambda, pull-request-review, pull-requests, request-review, webhook
- Language: JavaScript
- Homepage:
- Size: 231 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🔫 aws-git-pull-request-review
Architecture to integrate git repositories with AWS services via webhook to validate pull-requests for code reviews and coverage quality.
For every pull-request and consecutive commits on PR, github webhkook will trigger an API gateway which is bound to a lambda where the payload will be extracted and a codebuild will be triggered which will save the test and coverage reports as part of codebuild report groups and a cloudwatch event will trigger another lambda on build completion to update PR commit staus and post a comment with metrics.
## Architecture

### Setup
- Create two lambdas - [pre-pr-build-lambda](https://github.com/tamdilip/aws-git-pull-request-review/tree/main/pre-pr-build-lambda) and [post-pr-build-lambda](https://github.com/tamdilip/aws-git-pull-request-review/tree/main/post-pr-build-lambda) (override necessary config values inside).
- Create a [codebuild](https://github.com/tamdilip/aws-git-pull-request-review/blob/main/cloudformation-for-codebuild-reports-with-cloudwatch-events.yaml#L1-L60) enabled with report groups.
- Create a [cloudwatch event](https://github.com/tamdilip/aws-git-pull-request-review/blob/main/cloudformation-for-codebuild-reports-with-cloudwatch-events.yaml#L61-L95) to trigger [post-pr-build-lambda](https://github.com/tamdilip/aws-git-pull-request-review/tree/main/post-pr-build-lambda)
- Create an API Gateway mapped to [pre-pr-build-lambda](https://github.com/tamdilip/aws-git-pull-request-review/tree/main/pre-pr-build-lambda)
- Configure Github repo webhook with API Gateway URL and the secret key used inside [pre-pr-build-lambda](https://github.com/tamdilip/aws-git-pull-request-review/tree/main/pre-pr-build-lambda)
### 📽 Codebuild - Test report group

### 📽 Codebuild - Coverage report group

### 📽 Github - Pull-Request review comment and status

**Happy coding :) !!**