Giter VIP home page Giter VIP logo

cla-bot's Introduction

cla-bot

Source code for the Metabase GitHub CLA bot. Create a GitHub app and Google Sheet with a CLA form and then go crazy.

Env vars

GITHUB_CORE_CONTRIBUTORS_WHITELIST # e.g. camsaul,tlrobinson
GITHUB_INSTALLATION_ID # ID of GitHub app installation in given repo
GITHUB_PRIVATE_KEY # generate private key for app and copy source of PEM file here
GITHUB_REPO # e.g. metabase/metabase
GOOGLE_CLIENT_ID # Create an Google API client and then go thru OAuth steps in browser/REPL
GOOGLE_CLIENT_SECRET
GOOGLE_REFRESH_TOKEN
GOOGLE_SHEET_RANGE # e.g. 'Form Responses 1'!H2:H5000
GOOGLE_SPREADSHEET_ID # look in URL of Google Sheet

Create the bot

Go in AWS and do it via UI or

lein uberjar &&
aws lambda create-function \
    --region us-east-1 \
    --function-name metabase-cla-bot  \
    --handler cla_bot.core::handleRequest \
    --runtime java8  \
    --memory 512 \
    --timeout 10 \
    --role arn:aws:iam::awsaccountid:role/lambda_basic_execution \
    --zip-file fileb://./target/cla-bot-1.0.0-standalone.jar

(Don't forget to add env vars as well!)

See also https://aws.amazon.com/blogs/compute/clojure/ and https://github.com/Charlynux/clojure-aws-lambda

Update the bot

lein uberjar &&
aws lambda update-function-code \
  --region us-east-1 \
  --function-name metabase-cla-bot  \
  --zip-file fileb://./target/cla-bot-1.0.0-standalone.jar

GitHub App debugging

Check out https://github.com/organizations/metabase/settings/apps/YOUR_APP_NAME/advanced

License

Copyright © 2019 Metabase, Inc.

Distributed under the Eclipse Public License, same as Clojure.

cla-bot's People

Contributors

camsaul avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cla-bot's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.