From 57e42036615cb5fcf7d15312eb06ee02fc5f2e2b Mon Sep 17 00:00:00 2001 From: Denis Isaev Date: Sat, 23 May 2020 13:05:36 +0300 Subject: [PATCH] dev: update contributors list Take into account contributions in golancgi-lint-action. Run `cd .github/contributors && npm run all` --- .github/contributors/generate.ts | 48 ++++++++++++--------- README.md | 72 +++++++++++++++++--------------- 2 files changed, 66 insertions(+), 54 deletions(-) diff --git a/.github/contributors/generate.ts b/.github/contributors/generate.ts index dbabc0bb1b7d..1f68dc532caf 100644 --- a/.github/contributors/generate.ts +++ b/.github/contributors/generate.ts @@ -13,8 +13,7 @@ type Contribution = { count: number } -const buildWeights = (contributors: any): Map => { - console.info(contributors) +const buildWeights = (contributorStats: any[]): Map => { const loginToTotalWeight: Map = new Map() const addContributions = (weight: number, contributions: Contribution[], onlyExisting: boolean) => { @@ -26,15 +25,19 @@ const buildWeights = (contributors: any): Map => { } } - // totally every pull or commit should account as 10 - addContributions(5, contributors.prCreators, false) - addContributions(5, contributors.commitAuthors, false) // some commits are out pull requests + for (const stat of contributorStats) { + // totally every pull or commit should account as 10 + addContributions(5, stat.prCreators, false) + addContributions(5, stat.commitAuthors, false) // some commits are out pull requests + } - addContributions(2, contributors.prCommentators, true) - addContributions(2, contributors.issueCreators, true) - addContributions(2, contributors.issueCommentators, true) - addContributions(2, contributors.reviewers, true) - addContributions(0.3, contributors.reactors, true) + for (const stat of contributorStats) { + addContributions(2, stat.prCommentators, true) + addContributions(2, stat.issueCreators, true) + addContributions(2, stat.issueCommentators, true) + addContributions(2, stat.reviewers, true) + addContributions(0.3, stat.reactors, true) + } return loginToTotalWeight } @@ -93,16 +96,21 @@ const buildCoreTeamInfo = async (): Promise => { const main = async () => { try { - const contributors = await nyc.repoContributors({ - token: process.env.GITHUB_TOKEN, - user: "golangci", - repo: "golangci-lint", - before: new Date(), - after: new Date(0), - commits: true, - reactions: true, - }) - const loginToWeight = buildWeights(contributors) + const repos = [`golangci-lint`, `golangci-lint-action`] + const promises = repos.map((repo) => + nyc.repoContributors({ + token: process.env.GITHUB_TOKEN, + user: `golangci`, + repo, + before: new Date(), + after: new Date(0), + commits: true, + reactions: true, + }) + ) + const contributorStats = await Promise.all(promises) + console.info(`Got stat for repos ${repos}`) + const loginToWeight = buildWeights(contributorStats) const weightedContributors: WeightedContributor[] = [] loginToWeight.forEach((weight, login) => weightedContributors.push({ login, weight })) diff --git a/README.md b/README.md index 0eaef75ad3c0..7a5a1e93bd06 100644 --- a/README.md +++ b/README.md @@ -69,25 +69,25 @@ The Core Team has the following responsibilities:
Will Dixon

David Lobe

Ryan Currah
-
Matouš Dzivjak
+
Duco van Amstel
-
Duco van Amstel
+
Matouš Dzivjak

@iwankgb

Alec Thomas
+
Tam Mach

Denis Krivak

Alexey Palazhchenko
-
Tam Mach

Nuruddin Ashr

Tim Heckman
-
Ryan Boehning

Soichiro Kashima
+
Ryan Boehning

Xiang Dai

Luke Shumaker
-
Andrew Shannon Brown

Aneesh Agrawal
+
Andrew Shannon Brown

NiseVoid
@@ -100,22 +100,22 @@ The Core Team has the following responsibilities:
Bart
+
Dan Kortschak

Agniva De Sarker

Ludovic Fernandez

Romanos

David Braley

Stephan Renatus
-
Diego Pontoriero
-And 132 more our team members +And 134 more our team members + - @@ -137,150 +137,154 @@ The Core Team has the following responsibilities: + - + - + - + - + - + - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + + +

Diego Pontoriero

Alex Collins

Dan Kortschak

Ryo Nakao

Iskander (Alex) Sharipov

Sascha Grunert

☃ Elliot Shepherd

Koichi Shiraishi

gaojingyu

Stephanie Wilde-Hobbs

Vitaly Isaev

Shulhan

Shulhan

Vladimir Evgrafov

Ben Wells

Viacheslav Poturaev

Marat Reymers

Christoph Blecker

tdakkota

Eric Wohltman

Eric Wohltman

Gianguido Sora'

Sonia Hamilton

Berezhnoy Pavel

Tom Payne

Aofei Sheng

Maksym Pavlenko

Jonathan Chappelow

Jonathan Chappelow

Ivan

Dale Hui

Ondrej Fabry

proton

Markus

Andrew Lavery

Tariq Ibrahim

Tariq Ibrahim

Peter Štibraný

kaixiang zhong

@ced42

Eldar Rakhimberdin

Toon Schoenmakers

Cezar Sá Espinola

Ben Paxton

Ben Paxton

Andrey Kuchin

Connor Adams

Martins Irbe

Joshua Rubin

Kishan B

Rodrigo Brito

Linus Arver

Linus Arver

Glen Mailer

Ian Howell

Chris K

Craig Silverstein

Marko

Chris Lewis

Jakub Chábek

David Gleich

Jakub Chábek

David Gleich

Denis Titusov

Terdunov Vyacheslav

Sean Chittenden

Hui Zhu

@Harsimran1

@nvartolomei

Martin Etmajer

@nvartolomei

Martin Etmajer

@techknowlogick

Fei Xu

Matthew Poer

Cody Ley-Han

Marc Tudurí

Patrick Zhang

Kyoichiro Yamada

Patrick Zhang

Kyoichiro Yamada

darklore

@to6ka

Daniel Helfand

Wilkins

Collin Kreklow

David Hill

Troy Ronda

David Hill

Troy Ronda

Osamu TONOMORI

Bo Liu

Steven Allen

Colin Arnott

Michael

Evgeniy Kulikov

Chris Nesbitt-Smith

Evgeniy Kulikov

Chris Nesbitt-Smith

Daniel Caballero

Carlton Henderson

@xuri

Charl Matthee

Sriram Venkatesh

Peter Schuller

David Golub

Peter Schuller

David Golub

Alexander Morozov

Hernan Bandura

Liam White

Alex Dupre

Juan Carlos

Jinming Yue

Igor Zibarev

Jinming Yue

Igor Zibarev

@wxdao

Kévin Dunglas

Sijie Yang

Stephen

Thang Minh Vu

Julia Ogris

Dima

Julia Ogris

Dima

Renato Suero

Alessio Treglia

Alay Patel

Martin Hutchinson

Emanuel Bennici

Christian Clauss

Korjavin Ivan

Christian Clauss

Korjavin Ivan

Francois Parquet

Robert Kopaczewski

@opennota

Cyrille Meichel

neglect-yp

@jumpeiMano

Wei Jian Gan

@jumpeiMano

Wei Jian Gan

Tamás Gulácsi

Jack Wilsdon

Michał Suchwałko

Alexander Apalikov

Derek Perkins

Domas Tamašauskas