Console app for creating data file for https://thanks.dot.net
Перейти к файлу
Dan Zhu 499f65ac97
Update azure-pipelines.yml (#66)
Update agent pool
2024-07-09 20:31:33 -07:00
.github Create dependabot.yml (#7) 2021-08-23 17:59:25 -07:00
.vscode add PR capabilities 2021-03-03 13:33:36 -05:00
.dockerignore add PR capabilities 2021-03-03 13:33:36 -05:00
.gitignore WIP 2021-02-26 11:30:17 -05:00
CODE-OF-CONDUCT.md Create CODE-OF-CONDUCT.md 2021-08-23 09:51:20 -07:00
Dockerfile add dockerfile 2021-02-26 11:31:34 -05:00
LICENSE Create LICENSE (#6) 2021-08-23 17:58:23 -07:00
MajorRelease.cs Add new class for major release and update logic (#42) 2023-03-03 08:50:49 -08:00
Program.cs Remove debugger breakpoint (#65) 2024-06-10 15:00:29 -07:00
README.md Fix repository urls (#51) 2023-08-14 11:51:18 -07:00
RateLimit.cs Update diff logic (#22) 2022-03-30 10:07:19 -07:00
Release.cs Add new class for major release and update logic (#42) 2023-03-03 08:50:49 -08:00
ReleaseCommits.cs Update diff logic (#22) 2022-03-30 10:07:19 -07:00
azure-pipelines.yml Update azure-pipelines.yml (#66) 2024-07-09 20:31:33 -07:00
dotnetthanks-loader.csproj Bump octokit from 10.0.0 to 11.0.0 (#64) 2024-04-15 16:39:26 -07:00
dotnetthanks-loader.sln Rework the calculation logic 2020-12-10 00:01:22 +11:00
startup.sh add startup file 2021-02-26 11:32:16 -05:00

README.md

thanks.dot.net - Data Loader

This is the loader application that creates the data file "core.json" for http://thanks.dot.net

Process

Each release of .NET is a collection of repositories. The list for each release is managed through the dotnet/core repository and for each see the /releases section.

  1. The loader application first loads all of the releases for dotnet/core ordered by newest -> oldest.
  2. For each release the tag of the current release and the tag of the previous release are used to retrieve the commits using the GitHub API : https://api.github.com/repos/{owner}/{repo}/compare/{fromRelease}...{toRelease}
  3. Each commit is inspected to create the data model using the TallyCommits method.
    1. A Contributor object is created if needed
    2. The commits for the given repo are added

Each child repo, other repositories in the release, are processed in the same manner.

Local Development

  1. Create a GitHub ClientID and Secret in your settings under the OAuth Apps section.
  2. Create a GitHub Personal Access Token
  3. Fork the dotnetthanks-loader repo and cd into it.
  4. Create user-secrets using the following commands
    1. dotnet user-secrets init
    2. dotnet user-secrets set GITHUB_CLIENTID <your-value>
    3. dotnet user-secrets set GITHUB_CLIENTSECRET <your-value>
    4. dotnet user-secrets set GITHUB_TOKEN <your Personal Access Token>