Coder Social home page Coder Social logo

guyuezhai / github-annual-report Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xiaolonglee/github-annual-report

0.0 1.0 0.0 5.35 MB

:gift:快!你的 2019 年 GitHub 报告还未领取!(推荐移动端观看)

Home Page: https://githubreport.mdnice.com/

License: MIT License

HTML 5.82% CSS 4.29% JavaScript 89.78% Shell 0.11%

github-annual-report's Introduction

简介

GitHub annual report 是利用 OAuth 认证,通过 GitHub API 调用,获取用户 2019 年的仓库和提交情况,进行进一步的分析,得出 GitHub 年度代码报告,无安全风险,欢迎扫码来领取你的 GitHub 2019 年度代码报告。

报告码 关注码

说明

  • 代码开源,只统计公开仓库,不会存在数据安全问题
  • 由于实时分析的瓶颈在于网络请求,默认每个repo只分析master分支
  • 统计用户个人和 watch 的代码仓库
    • 个人的 repo 会默认 watch
    • push 过代码的 repo 会默认 watch
  • 一个请求超过 30 秒将做超时失败处理

主要依赖

词条解释

1.

使用了n种编程语言

特指仓库上显示的主要语言

通过GitHub向n个代码仓库的主分支

有提交的仓库,不限于自己的

提交了n次代码

以各种形式最终形成提交记录的都包括在内

活跃了n天的时间

GitHub下方的热力图

2.

与此同时 在你的敲击下

增加了n行代码
删除了n行代码
总共有n行代码被修改

3.

n月n日
大概是很特别的一天
这一天里
你向n仓库提交了
n次代码

某个仓库某天你的提交次数最多

4.

n月n日
这一天你睡得很晚
n点n分你还在与代码为伴
那一刻
你向n仓库提交了代码

提交代码最晚的一天,晚的范围在23:00——4:00

5.

这一年
你有n天都向
n提交了代码
所有熟悉的项目中
你对它最专一

提交代码天数最多的项目

6.

你喜欢在n提交代码

n包括清晨(6:00-12:00)、午后(12:00-18:00)、傍晚(18:00-24:00)、凌晨(0:00-6:00)

特别是m

n包括繁忙的工作日、安静的周末

365天中
你有x个m提交了代码

工作日或周末的提交天数

7.

作为社区的一员
2019年
你参与了n个问题的讨论
收藏了n个仓库

问题讨论包括被指派,提问,被提及,参与等,收藏特指Star

8.

还记得
世界上最好的语言
n吗
你曾经很喜欢
但最近似乎把它遗忘了

所有你参与提交的项目的主语言之一,它最后一次提交时间最早

9.

你的年度语言是n
一年中
你向m个n仓库
提交了x次代码

参与提交的仓库最多的一个主语言

快速开始

推荐使用yarn

$ npm install -g yarn
$ yarn
$ yarn start // 启动服务
$ yarn build // 打包

整体设计

数据结构

// localStorage
ACCESS_TOKEN = '452df45345dsfg46'
USERNAME = 'test'
AVATAR = 'http://test.com/test.jpg'
// fetchInfo
this.repos = [
  {
    repo: 'test',
    owner: 'Jim',
    language: 'Java',
    commitTime: [
      '2019-03-05T01:29:00Z',
      '2019-03-05T08:50:00Z',
      '2019-03-05T10:50:00Z',
      '2019-03-08T10:30:00Z',
      '2019-03-09T23:30:00Z',
      '2019-03-10T14:30:00Z'
    ],
    commitSha: [
      '6dcb09b5b57875f334f61aebed695e2e4193db5e',
      '7dcb09b5b57875f334f61aebed695e2e4193db5e',
      '8dcb09b5b57875f334f61aebed695e2e4193db5e',
      '9dcb09b5b57875f334f61aebed695e2e4193db5e',
      '0dcb09b5b57875f334f61aebed695e2e4193db5e',
      '1dcb09b5b57875f334f61aebed695e2e4193db5e',
    ],
    // analysisSingle
    commitMostDay: {
      date: '2019-03-05T01:29:00Z',
      count: 3
    },
    latestTime: '2019-03-05T01:29:00Z', //可能为空
    sumDays: 8,
    morningNums: 3,
    afternoonNums: 1,
    eveningNums: 2,
    dawnNums: 2,
    addLines: 2001,
    deleteLines: 2001,
    totalLines: 4002,
  },

  ...

]
// analysisInfo
this.info = {
  eventNums: 244,
  addLines: 20010,
  deleteLines: 20010,
  totalLines: 40020,
  likeWeekType: {
    name: '周末',
    count: 52
  },
  weekendNums: 52,
  weekdayNums: 31,
  issueNums: 234, // 包括创建,指派,提及和订阅的问题
  starNums: 56, // 创建star的数量
  forget: {
    language: 'PHP',
    date: '2019-01-01T11:22:00Z'
  },
  languageLastCommit: {
    'Java': '2019-03-05T01:29:00Z',
    'PHP': '2019-01-01T11:22:00Z',

    ...

  },
  likePeriod: {
    name: 'afternoon',
    count: 30
  },
  period: {
    morningNums: 15,
    afternoonNums: 30,
    eveningNums: 16,
    dawnNums: 5
  },
  mostDay: {
    count: 6,
    repo: 'test'
  },
  latestDay: {
    date: '2019-03-05T01:29',
    repo: 'test'
  },
  specialDay: {
    date: '2019-03-05T01:29:00Z',
    repo: 'test',
    count: 3
  },
  commitNums: 231,
  repoNums: 20,
  languageNums: 8,
  mostLanguage: {
    name: 'JavaScript',
    repoNums: 3,
    commitNums: 65
  },
  language: {
    Java: 2,
    JavaScript: 3,

    ...

  }
}

github-annual-report's People

Contributors

guanpengchn avatar lrischanging avatar simon300000 avatar

Watchers

James Cloos 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.