Skip to content

Lambda for (reverse) proxying GitHub API requests from the Contributary frontend

License

Notifications You must be signed in to change notification settings

ContributaryCommunity/lambda-github

Repository files navigation

lambda-github

GitHub release CircleCI branch GitHub issues GitHub issues GitHub license

Overview

Lambda for (reverse) proxying GitHub API requests from the frontend for getting live repositories and issues data.

Workflow

Changes submitted to src/*.js are uploaded manually to the AWS Lambda function console. Currently there are two Lambdas used

  • issues - Fetches issues from the GitHub API for a given project name and repository name
  • repositories - Fetches repositories from the GitHub API for a given project name and repository type (org or user)

Development

For contributing to this project and testing the output locally, you will need

  1. NodeJS 8.x
  2. Yarn 1.x
  3. Create tmp/ directory in the root of the project
  4. Set envrionment variable for devleopment: export NODE_ENV=development
  5. Export a GitHub personal access token: export ACCESS_TOKEN=XXX
  • yarn lint - Validatse all JS and JSON passes linting
  • yarn function:issues - Run src/issues.js and by default output the file in tmp/
  • yarn function:repositories - Run src/repositories.js and by default output the file in tmp/

Release Procedure

  1. Merge all changes into master
  2. Bump package.json, git tag and push everything to master
  3. Upload the contents of src/index.js to Lambda
  4. Create Release Notes in GitHub

About

Lambda for (reverse) proxying GitHub API requests from the Contributary frontend

Resources

License

Stars

Watchers

Forks

Packages

No packages published