Skip to content

Commit

Permalink
feat: file framework
Browse files Browse the repository at this point in the history
  • Loading branch information
frank-zsy committed Aug 19, 2020
1 parent 3ae5c24 commit e2ebfc1
Show file tree
Hide file tree
Showing 21 changed files with 85 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.vscode
.idea
.DS_Store
*.swp
*.lock
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Contributing Guide

If you want to contribute to this report, you may need to read our [Contributing guide](./docs/CONTRIBUTING.md) first.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# github-analysis-report-2020
GitHub digital report 2020
# GitHub Analysis Report 2020
Empty file added REPORT.md
Empty file.
3 changes: 3 additions & 0 deletions REPORT_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# GitHub Analysis Report 2020

We anaylsis {{slqs['total-record-count'].text}} records of GitHub logs, there are {{sqls['total-repo-count']}} active repositories and {{sqls['total-developer-count']}} active developers on GitHub during year {{year}}.
Empty file added docs/.nojekyll
Empty file.
1 change: 1 addition & 0 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Contributing Guide
7 changes: 7 additions & 0 deletions docs/_coverpage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# GitHub Analysis Report 2020

> An open source collaborate report for GitHub
- Full access to all records on GitHub
- Global collaborate
- Case study supported
2 changes: 2 additions & 0 deletions docs/_navbar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* [En](/)
* [中文](/zh-cn/)
Empty file added docs/_sidebar.md
Empty file.
29 changes: 29 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<title>GitHub Analysis Report 2020</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="GitHub Analysis Report 2020">
<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">
</head>

<body>
<div id="app"></div>
<script>
window.$docsify = {
name: 'Hypertrons',
repo: 'https://github.com/X-lab2017/github-analysis-report-2020',
coverpage: ['/', '/zh-cn/'],
loadSidebar: true,
loadNavbar: true,
mergeNavbar: true,
}
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
</body>

</html>
1 change: 1 addition & 0 deletions docs/zh-cn/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# 贡献指南
4 changes: 4 additions & 0 deletions sqls/total-developer-count/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"config": {},
"description": "Return the total active developer count of year {{year}}"
}
6 changes: 6 additions & 0 deletions sqls/total-developer-count/post-processor.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default async function(data) {
if (!Number.isInteger(data[0].count)) {
throw new Error('Invalid data');
}
return data[0].count;
}
1 change: 1 addition & 0 deletions sqls/total-developer-count/sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SELECT COUNTDistinct(actor_id) as count FROM {{table}}
4 changes: 4 additions & 0 deletions sqls/total-record-count/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"config": {},
"description": "Return the total record count of year {{year}}"
}
6 changes: 6 additions & 0 deletions sqls/total-record-count/post-processor.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default async function(data) {
if (!Number.isInteger(data[0].count)) {
throw new Error('Invalid data');
}
return data[0].count;
}
1 change: 1 addition & 0 deletions sqls/total-record-count/sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SELECT COUNT(*) as count FROM {{table}}
4 changes: 4 additions & 0 deletions sqls/total-repo-count/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"config": {},
"description": "Return the total active repo count of year {{year}}"
}
6 changes: 6 additions & 0 deletions sqls/total-repo-count/post-processor.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default async function(data) {
if (!Number.isInteger(data[0].count)) {
throw new Error('Invalid data');
}
return data[0].count;
}
1 change: 1 addition & 0 deletions sqls/total-repo-count/sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SELECT COUNTDistinct(repo_id) as count FROM {{table}}

0 comments on commit e2ebfc1

Please sign in to comment.