Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Refactor] Change 2020 to analysis report for any period #81

Merged
merged 1 commit into from
Sep 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# GitHub Analysis Report 2020
# GitHub Analysis Report

[![apache2](https://img.shields.io/badge/license-Apache%202-blue)](LICENSE) [![ccby4](https://img.shields.io/badge/license-CC%20BY%204.0-blue)](LICENSE-CC-BY) [![slack](https://img.shields.io/badge/slack-join%20chat-green)](https://join.slack.com/t/x-github-analysis/shared_invite/zt-gz8ykv3l-qP53IpajsZIGsx6dFo_8Lg)

GitHub analysis report 2020 is an open source analysis report project initiated by [X-lab](https://x-lab.info), this project aims to combine the wisdom of global developers to jointly analyze and insight into GitHub's developer behavior data during 2020 to help everyone better understand and participate in open source.
GitHub analysis report is an open source analysis report project for GitHub initiated by [X-lab](https://x-lab.info), this project aims to combine the wisdom of global developers to jointly analyze and insight into GitHub's developer behavior data to help everyone better understand and participate in open source.

## Data

We use [GHArchive](https://www.gharchive.org/) as our data source for GitHub logs and the data service is provided by self host [clickhouse](https://clickhouse.tech/) cluster by X-lab. For data details, please check the [data](https://www.x-lab.info/github-analysis-report-2020/) docs.
We use [GHArchive](https://www.gharchive.org/) as our data source for GitHub logs and the data service is provided by self host [clickhouse](https://clickhouse.tech/) cluster in X-lab. For data details, please check the [data](https://www.x-lab.info/github-analysis-report/#/data) docs.

## Contributing guide

Please check the [contributing guide](https://www.x-lab.info/github-analysis-report-2020/) first if you want to be part of the report.
Please check the [contributing guide](https://www.x-lab.info/github-analysis-report/#/CONTRIBUTING) first if you want to be part of the report.

## Architect & workflow

Please check the [architect](https://www.x-lab.info/github-analysis-report-2020/) and [workflow](https://www.x-lab.info/github-analysis-report-2020/) if you want to better understand the project.
Please check the [architect](https://www.x-lab.info/github-analysis-report/#/architecture) and [workflow](https://www.x-lab.info/github-analysis-report/#/workflow) if you want to better understand the project.

## Communication

Expand Down
2 changes: 1 addition & 1 deletion REPORT_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# GitHub Analysis Report 2020
# GitHub Analysis Report

We anaylsis {{sqls.total-record-count.text}} records of GitHub logs, there are {{sqls.total-repo-count.text}} active repositories and {{sqls.total-developer-count.text}} active developers on GitHub during year {{year}}.
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# GitHub Analysis Report 2020
# GitHub Analysis Report
2 changes: 1 addition & 1 deletion docs/_coverpage.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# GitHub Analysis Report 2020
# GitHub Analysis Report

> An open source collaborate report for GitHub

Expand Down
6 changes: 3 additions & 3 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

This project consists of several independent components, the architecture of the system is as follows:

![architect-img](http://gar2020.opensource-service.cn/umlrenderer/github/X-lab2017/github-analysis-report-2020?path=docs/diagrams/architect.uml)
![architect-img](http://gar2020.opensource-service.cn/umlrenderer/github/X-lab2017/github-analysis-report?path=docs/diagrams/architect.uml)

Developers only collaborate in this project on GitHub platform, the technical details of the backend are hidden from developers. The backend consists of several services includes:

## Analysis-report-bot

This account is a robot account which is a GitHub App, the backend is powered by [Hypertrons](https://www.github.com/hypertrons/hypertrons), the robot will load configs from [`.github/hypertrons.json`](https://github.com/X-lab2017/github-analysis-report-2020/blob/master/.github/hypertrons.json) and load custom workflows for this project from [`.github/hypretrons-components`](https://github.com/X-lab2017/github-analysis-report-2020/tree/master/.github/hypertrons-components).
This account is a robot account which is a GitHub App, the backend is powered by [Hypertrons](https://www.github.com/hypertrons/hypertrons), the robot will load configs from [`.github/hypertrons.json`](https://github.com/X-lab2017/github-analysis-report/blob/master/.github/hypertrons.json) and load custom workflows for this project from [`.github/hypretrons-components`](https://github.com/X-lab2017/github-analysis-report/tree/master/.github/hypertrons-components).

Refer to [workflow](./workflow.md) docs to learn more about the workflow of this project.

Expand All @@ -21,6 +21,6 @@ Data service is a set of data continuous integration and query services hosted b

## Database

The database for GitHub logs is a [Clickhouse](https://clickhouse.tech/) cluster hosted by X-lab. Currently, the cluster contains more than 2.5 billion records of GitHub logs from 2015.01.01 till now and supports full access to all logs and real time calculation. For this project, only data during 2020 is used for analysis.
The database for GitHub logs is a [Clickhouse](https://clickhouse.tech/) cluster hosted by X-lab. Currently, the cluster contains more than 2.5 billion records of GitHub logs from 2015.01.01 till now and supports full access to all logs and real time calculation.

Refer [data description](./data.md) doc to learn more about schema of the database.
4 changes: 2 additions & 2 deletions docs/diagrams/architect.uml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@startuml

footer Architect of GitHub Analysis Report 2020
footer Architect of GitHub Analysis Report

actor Developer as dev

node GitHub as github {
node "github-analysis-report-2020" as repo {
node "github-analysis-report" as repo {
folder ".github/hypertrons-components" as cwf {
file "Custom workflows"
}
Expand Down
6 changes: 3 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

<head>
<meta charset="UTF-8">
<title>GitHub Analysis Report 2020</title>
<title>GitHub Analysis Report</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="GitHub Analysis Report 2020">
<meta name="description" content="GitHub Analysis Report">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
Expand All @@ -16,7 +16,7 @@
<script>
window.$docsify = {
name: 'X-GitHub-Analysis',
repo: 'https://github.com/X-lab2017/github-analysis-report-2020',
repo: 'https://github.com/X-lab2017/github-analysis-report',
coverpage: ['/', '/zh-cn/'],
loadSidebar: true,
loadNavbar: true,
Expand Down
32 changes: 16 additions & 16 deletions docs/workflow.md
Original file line number Diff line number Diff line change
@@ -1,79 +1,79 @@
# Workflow

This project uses [Hypertrons](https://www.github.com/hypertrons/hypertrons) for workflow management, it uses several default components of Hypertrons and some customized components to manage the project, read [`.github/hypertrons.json`](https://github.com/X-lab2017/github-analysis-report-2020/blob/master/.github/hypertrons.json) to find out all the components enabled for now and the customized components are under folder [`.github/hypretrons-components`](https://github.com/X-lab2017/github-analysis-report-2020/tree/master/.github/hypertrons-components).
This project uses [Hypertrons](https://www.github.com/hypertrons/hypertrons) for workflow management, it uses several default components of Hypertrons and some customized components to manage the project, read [`.github/hypertrons.json`](https://github.com/X-lab2017/github-analysis-report/blob/master/.github/hypertrons.json) to find out all the components enabled for now and the customized components are under folder [`.github/hypretrons-components`](https://github.com/X-lab2017/github-analysis-report/tree/master/.github/hypertrons-components).

The automatic procedure of this project is executed by `analysis-report-bot`(bot) and this document will go through the workflow by introducing the components.

## Community governance

### role

Component [role](https://github.com/X-lab2017/github-analysis-report-2020/blob/master/.github/hypertrons.json#L82) is used to define the roles and their authorities in the community. We have `committer`, `replier`, `sql-reviewer` in this project and details about their authorities will be introduced in each component.
Component [role](https://github.com/X-lab2017/github-analysis-report/blob/master/.github/hypertrons.json#L82) is used to define the roles and their authorities in the community. We have `committer`, `replier`, `sql-reviewer` in this project and details about their authorities will be introduced in each component.

### label_setup

Component [lable setup](https://github.com/X-lab2017/github-analysis-report-2020/blob/master/.github/hypertrons.json#L2) is used to manage the labels of this project and change the config will add new label to the project along with its description and color(deletion not supported in case false operation, can delete label from GitHub web interface). Besides the customized labels, the component also includes all the [default labels](https://github.com/hypertrons/hypertrons/blob/master/app/component/label_setup/defaultConfig.ts#L21) from Hypertrons.
Component [lable setup](https://github.com/X-lab2017/github-analysis-report/blob/master/.github/hypertrons.json#L2) is used to manage the labels of this project and change the config will add new label to the project along with its description and color(deletion not supported in case false operation, can delete label from GitHub web interface). Besides the customized labels, the component also includes all the [default labels](https://github.com/hypertrons/hypertrons/blob/master/app/component/label_setup/defaultConfig.ts#L21) from Hypertrons.

### weekly_report

Component [weekly report](https://github.com/X-lab2017/github-analysis-report-2020/blob/master/.github/hypertrons.json#L78) is used to send digital report by issue and the time is every Monday 12:00 UTC+8.
Component [weekly report](https://github.com/X-lab2017/github-analysis-report/blob/master/.github/hypertrons.json#L78) is used to send digital report by issue and the time is every Monday 12:00 UTC+8.

### auto_update_contribution(customize component)

Component [auto update contribution]() will give a statistics of all developers in the project and create a pull request with a new branch to update [CONTRIBUTORS](https://github.com/X-lab2017/github-analysis-report-2020/blob/master/CONTRIBUTORS) file. This file contains all the roles in the community and `contributor`(developers with commit), `participant`(developers participate in discussion) and `follower`(developers who star or fork the project), if an account appears in a prior role then it will not included in other roles.
Component [auto update contribution]() will give a statistics of all developers in the project and create a pull request with a new branch to update [CONTRIBUTORS](https://github.com/X-lab2017/github-analysis-report/blob/master/CONTRIBUTORS) file. This file contains all the roles in the community and `contributor`(developers with commit), `participant`(developers participate in discussion) and `follower`(developers who star or fork the project), if an account appears in a prior role then it will not included in other roles.

The sequence of the roles is `committer`, `sql-reviewer`, `replier`, `contributor`, `participant` and `follower`, we use activity score to sort within a role and the score is appended to the account. For activity calculation, please refer to [GitHub Analysis Report 2019](https://github.com/X-lab2017/github-analysis-report-2019).

### auto_update_report(customize component)

Component [auto update report](https://github.com/X-lab2017/github-analysis-report-2020/blob/master/.github/hypertrons.json#L148) will update [REPORT.md](https://github.com/X-lab2017/github-analysis-report-2020/blob/master/REPORT.md) file every day 23pm UTC+8 due to the SQL files under [SQL folder](https://github.com/X-lab2017/github-analysis-report-2020/tree/master/sqls), [Report template](https://github.com/X-lab2017/github-analysis-report-2020/blob/master/REPORT_TEMPLATE.md) and newest data.
Component [auto update report](https://github.com/X-lab2017/github-analysis-report/blob/master/.github/hypertrons.json#L148) will update [REPORT.md](https://github.com/X-lab2017/github-analysis-report/blob/master/REPORT.md) file every day 23pm UTC+8 due to the SQL files under [SQL folder](https://github.com/X-lab2017/github-analysis-report/tree/master/sqls), [Report template](https://github.com/X-lab2017/github-analysis-report/blob/master/REPORT_TEMPLATE.md) and newest data.

## Issues

### difficulty

Component [difficulty](https://github.com/X-lab2017/github-analysis-report-2020/blob/master/.github/hypertrons.json#L133) allows `committer` to use `/difficulty n` comment to add `difficulty/n` label to issue or PR to identify its difficulty, the supported `n` now are 1, 2, 3, 5, 8, which is a Fibonacci sequence.
Component [difficulty](https://github.com/X-lab2017/github-analysis-report/blob/master/.github/hypertrons.json#L133) allows `committer` to use `/difficulty n` comment to add `difficulty/n` label to issue or PR to identify its difficulty, the supported `n` now are 1, 2, 3, 5, 8, which is a Fibonacci sequence.

### auto_label

Component [auto label](https://github.com/X-lab2017/github-analysis-report-2020/blob/master/.github/hypertrons.json#L139) allows the bot to add label to issue or PR automatically, the config details are under `label_setup` component in the `keywords` field of each label which supports multiple keyword to match.
Component [auto label](https://github.com/X-lab2017/github-analysis-report/blob/master/.github/hypertrons.json#L139) allows the bot to add label to issue or PR automatically, the config details are under `label_setup` component in the `keywords` field of each label which supports multiple keyword to match.

### issue_remainder

Component [issue reminder](https://github.com/X-lab2017/github-analysis-report-2020/blob/master/.github/hypertrons.json#L136) are used to remind `replier` to reply issues. For now, if an issue is not replied in 24 hours and the author is not a `replier`, the bot will @ all accounts in `replier` roles to remind them.
Component [issue reminder](https://github.com/X-lab2017/github-analysis-report/blob/master/.github/hypertrons.json#L136) are used to remind `replier` to reply issues. For now, if an issue is not replied in 24 hours and the author is not a `replier`, the bot will @ all accounts in `replier` roles to remind them.

### self_assign

Component [self assign](https://github.com/X-lab2017/github-analysis-report-2020/blob/master/.github/hypertrons.json#L142) allows anyone to clain an issue task. Any developer can use `/self-assign` command to claim the issue and the bot will assign the issue to him or her.
Component [self assign](https://github.com/X-lab2017/github-analysis-report/blob/master/.github/hypertrons.json#L142) allows anyone to clain an issue task. Any developer can use `/self-assign` command to claim the issue and the bot will assign the issue to him or her.

## PRs

### approve

Component [approve](https://github.com/X-lab2017/github-analysis-report-2020/blob/master/.github/hypertrons.json#L126) allows `committer` to use `/approve` command to add `pull/approved` label to PR for later use.
Component [approve](https://github.com/X-lab2017/github-analysis-report/blob/master/.github/hypertrons.json#L126) allows `committer` to use `/approve` command to add `pull/approved` label to PR for later use.

### auto_merge

Component [auto merge](https://github.com/X-lab2017/github-analysis-report-2020/blob/master/.github/hypertrons.json#L129) will check all open PR with `pull/approved` label and merge them automatically, the check interval is 5 minutes for now.
Component [auto merge](https://github.com/X-lab2017/github-analysis-report/blob/master/.github/hypertrons.json#L129) will check all open PR with `pull/approved` label and merge them automatically, the check interval is 5 minutes for now.

### pr_uml_renderer

Component [PR UML renderer]() is used to render UML files in a PR. This project uses PlantUML to draw the diagrams and use Hypertrons to render the files. But it is really hard for `committer` to review the PR if only text version is provided, so this component will render the UML files in the PR and comment back for check.

### sql_label(customize component)

Component [SQL run](https://github.com/X-lab2017/github-analysis-report-2020/blob/master/.github/hypertrons.json#L154) is used to add `pull/sql` label to pull request automatically if the PR contains change of SQL related files(sql, manifest.json, post-processor.js) which will help `sql-reviewer` to identify these PRs.
Component [SQL run](https://github.com/X-lab2017/github-analysis-report/blob/master/.github/hypertrons.json#L154) is used to add `pull/sql` label to pull request automatically if the PR contains change of SQL related files(sql, manifest.json, post-processor.js) which will help `sql-reviewer` to identify these PRs.

### sql_run(customize component)

Component [SQL run](https://github.com/X-lab2017/github-analysis-report-2020/blob/master/.github/hypertrons.json#L151) allows `sql-reviewer` run the SQL files(sql, manifest.json, post-processor.js) in a PR by command `/sql-run`. The bot will load original SQL component files if they are not changed and will comment the SQL run result and text rendered by post-processor.js for check.
Component [SQL run](https://github.com/X-lab2017/github-analysis-report/blob/master/.github/hypertrons.json#L151) allows `sql-reviewer` run the SQL files(sql, manifest.json, post-processor.js) in a PR by command `/sql-run`. The bot will load original SQL component files if they are not changed and will comment the SQL run result and text rendered by post-processor.js for check.

### sql_verified(customize component)

Component [SQL verified](https://github.com/X-lab2017/github-analysis-report-2020/blob/master/.github/hypertrons.json#L145) allows `sql-reviewer` to add `pull/sql-verified` label to PR by command `/sql-verified`, so `committer` will know this PR is ready for reviewing.
Component [SQL verified](https://github.com/X-lab2017/github-analysis-report/blob/master/.github/hypertrons.json#L145) allows `sql-reviewer` to add `pull/sql-verified` label to PR by command `/sql-verified`, so `committer` will know this PR is ready for reviewing.

## Appendix

The core workflow of this project is the PR workflow especially with SQL files invovled and the diagram below shows a whole PR workflow:

![pull-flow](http://gar2020.opensource-service.cn/umlrenderer/github/X-lab2017/github-analysis-report-2020?path=docs/diagrams/pull-flow.uml)
![pull-flow](http://gar2020.opensource-service.cn/umlrenderer/github/X-lab2017/github-analysis-report?path=docs/diagrams/pull-flow.uml)
2 changes: 1 addition & 1 deletion docs/zh-cn/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# GitHub 2020 数字年报
# GitHub 全域数字报告
2 changes: 1 addition & 1 deletion docs/zh-cn/_coverpage.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# GitHub 2020 数字年报
# GitHub 全域数字报告

> GitHub 开源协作数字报告
- GitHub 全域数据访问能力
Expand Down
Loading