Giter VIP home page Giter VIP logo

action-extract-pull-metadata's Introduction

GitHub Action: action-extract-pull-metadata

Winter Hackathon Project 2019 for @Scacap

  • Backend:
    • @krunogrc
    • @rowi1de
  • Machine Learning / Feature Extraction
    • @huyqd
    • @jennyvytruchenko
    • @nikolasrieble

Motivation & Goal

  • Build an self-updating competence map of devlopers
  • Analyze PR Metadata, Change files
  • Extract Features (language, dependnecies, packages ...)
  • Join Expert + Learners on one PR for Knowledge Sharing

Architecture

  • GitHub Action to Process PR Data
  • Send to AWS / API-G to Lambda
  • Store Data in Mongo DB Atlas
  • ... Python on that

Lambda

"use strict";
const MongoClient = require('mongodb').MongoClient;
const MONGODB_URI = process.env.MONGODB_URI; // or Atlas connection string


module.exports.handler = (event, context, callback) => {
  context.callbackWaitsForEmptyEventLoop = false;

  console.log('event: ', event);
    
const MongoClient = require('mongodb').MongoClient;
const uri = MONGODB_URI
const client = new MongoClient(uri, { useNewUrlParser: true });
client.connect(err => {
  const db = client.db("competence-map");
  createDoc(db, event, callback);
});
  
};

function createDoc (db, json, callback) {
  db.collection('files').insertOne( json, function(err, result) {
      if(err!=null) {
          console.error("an error occurred in createDoc", err);
          callback(null, JSON.stringify(err));
      }
      else {
        console.log("Kudos! You just created an entry into the restaurants collection with id: " + result.insertedId);
        callback(null, "SUCCESS");
      }
    db.close();
  });
};

action-extract-pull-metadata's People

Contributors

rowi1de avatar krunogr avatar dependabot[bot] avatar jennyvytruchenko avatar huyqd avatar

Forkers

benettar

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.