GithubHelp home page GithubHelp logo

etcr-infrastructure's Introduction

Github PR Scraper

Get useful information about pull requests of a repository. Forked from Tienisto/pr-scraper.

Getting Started

Using JAR:

  1. Add application.properties file next to the jar:
# scraping config
scraping.repository=elastic/elasticsearch
scraping.auth=token e8c931efc42c74c2e4e027a2a82cc2cf2a58246b

# database config
spring.datasource.url=jdbc:postgresql://localhost:5432/pr
spring.datasource.username=myuser
spring.datasource.password=123456
  1. Run JAR:

java -jar prscraper-1.0.0.jar

With custom path to properties file:

java -jar prscraper-1.0.0.jar --spring.config.location=<path to application.properties>

Database Schema

The schema will be generated automatically for you.

pull_request

column type nullable description
id BIGINT NO postgres id
gh_number BIGINT NO github id uniquely accross issues and pull requests
title TEXT NO pull request title
state VARCHAR NO can be open or closed
author TEXT NO author's github nickname
created_at TIMESTAMPZ NO pull request creation timestamp

commit

column type nullable description
id BIGINT NO postgres id
message TEXT NO commit message
pull_request_id BIGINT NO foreign key referencing a pull request
hash VARCHAR NO git hash (sha)
hash_parent VARCHAR YES git hash of parent commit (sha)
tree VARCHAR NO hash of git tree of commit
author TEXT NO author's github nickname
created_at TIMESTAMPZ NO commit creation timestamp

comment

column type nullable description
id BIGINT NO postgres id
message TEXT NO comment body message
gh_id BIGINT NO github id of comment
gh_reply_id BIGINT YES github id of parent comment
pull_request_id BIGINT NO foreign key referencing a pull request
commit_id BIGINT YES foreign key referencing the corresponding commit
commit_fallback_id BIGINT YES foreign key referencing the last commit of PR
hunk_diff TEXT YES referenced hunk diff
hunk_file TEXT YES file path of hunk diff
author TEXT NO author's github nickname
created_at TIMESTAMPZ NO comment creation timestamp

git_file

column type nullable description
id BIGINT NO postgres id
file_path TEXT NO file path
file_content TEXT NO file content
commit_id BIGINT NO foreign key referencing the corresponding commit

scraping_status

column type nullable description
key VARCHAR NO status key
value VARCHAR NO status value

Possible entries for scraping_status:

key value description
STAGE PULL_REQUESTS, COMMITS, COMMENTS, FILES, DONE the server will pickup the stage value and start at that stage

etcr-infrastructure's People

Contributors

tienisto avatar rheum avatar

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.