dbaty / pull_requests_stats Goto Github PK
View Code? Open in Web Editor NEW[work in progress] Fetch pull requests data from GitHub and build reports
License: BSD 3-Clause "New" or "Revised" License
[work in progress] Fetch pull requests data from GitHub and build reports
License: BSD 3-Clause "New" or "Revised" License
**WORK IN PROGRESS** This tool fetches pull requests from GitHub. Goals include: - calculate the number of pull requests that have been commented or reviewed by a person; - aggregate result by teams; - show the proportion of pull requests that are reviewed by only one person; - show the proportion of pull requests that are reviewed by members from a single team; - etc. **This is prototype. There is no user interface for now. It has hard-coded filtering, see ``main.py`` and adjust as needed.** Configuration file ================== See `demo.config.toml`. Some options are not used (yet). Usage ===== 0. Create a personal access token in GitHub, store it in a file, and reference that file in the configuration file. 1. Fetch pull requests from GitHub and store a JSON representation of each pull request in a ``dump/`` directory: $ pull_requests_stats -c config.toml fetch-from-github --outdir dump Obviously, this can take a while. If you need an update, you can regularly run the command with the ``--updated-after YYYY-MM-DD`` option. Status: this part works. There is no error handling, though. 2. Load local data and calculate things: $ pull_requests_stats -c config.toml load-json --dir dump Status: this part is very much draft... If you want to try it out, add ``import pdb; pdb.set_trace()`` somewhere in ``load_json()`` and play with the data. See ``models.py`` for the data structures. Example: >>> len([p for p in pull_requests if "dbaty" in {reviews_and_comments.author for reviews_and_comments in (p.reviews + p.comments)}]) 3. Populate database. The idea here would be to replace step 2 above by a step that would load JSON data and update an SQL database. Then a (web?) user interface could perform predefined or custom SQL queries and show aggregated data, generate charts, etc. Status: not implemented.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.