File tree Expand file tree Collapse file tree 3 files changed +15
-12
lines changed Expand file tree Collapse file tree 3 files changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,6 @@ const buildContributorInfo = async (contributors: WeightedContributor[]): Promis
49
49
fragment UserFragment on User {
50
50
login
51
51
name
52
- websiteUrl
53
52
avatarUrl
54
53
}`
55
54
@@ -70,21 +69,21 @@ const buildContributorInfo = async (contributors: WeightedContributor[]): Promis
70
69
}
71
70
}
72
71
73
- const buildCoreTeamInfo = async ( ) : Promise < ContributorInfo [ ] > => {
72
+ const getTeamInfo = async ( teamName : string ) : Promise < ContributorInfo [ ] > => {
74
73
const query = `{
75
74
organization(login:"golangci"){
76
- team(slug:"core-team "){
75
+ team(slug:"${ teamName } "){
77
76
members {
78
77
nodes {
79
78
login
80
79
name
81
- websiteUrl
82
80
avatarUrl
83
81
}
84
82
}
85
83
}
86
84
}
87
85
}`
86
+
88
87
const resp = await graphql . graphql ( query , {
89
88
headers : {
90
89
authorization : `token ${ process . env . GITHUB_TOKEN } ` ,
@@ -115,8 +114,10 @@ const main = async () => {
115
114
loginToWeight . forEach ( ( weight , login ) => weightedContributors . push ( { login, weight } ) )
116
115
117
116
weightedContributors . sort ( ( a , b ) => b . weight - a . weight )
118
- const coreTeamInfo = await buildCoreTeamInfo ( )
117
+ const coreTeamInfo = await getTeamInfo ( "core-team" )
118
+ const teamInfo = await getTeamInfo ( "team" )
119
119
const contributorsInfo = await buildContributorInfo ( weightedContributors )
120
+ contributorsInfo . map ( ( c ) => ( c . isTeamMember = teamInfo . some ( ( ti ) => ti . login == c . login ) ) )
120
121
const exclude : any = {
121
122
golangcidev : true ,
122
123
CLAassistant : true ,
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ export type ContributorInfo = {
3
3
name : string
4
4
avatarUrl : string
5
5
websiteUrl : string
6
+ isTeamMember : boolean
6
7
}
7
8
8
9
export type DataJSON = {
Original file line number Diff line number Diff line change @@ -40,11 +40,10 @@ ${rows
40
40
`<tr>\n${ row
41
41
. map (
42
42
( c ) =>
43
- ` <td align="center"><a href="${
44
- c . websiteUrl ? ( c . websiteUrl . startsWith ( "http" ) ? c . websiteUrl : `https://${ c . websiteUrl } ` ) : `https://github.com/${ c . login } `
45
- } ?utm_source=golangci-lint-contributors"><img src="${ c . avatarUrl } " width="100px;" alt=""/><br /><sub><b>${
46
- c . name ? c . name : `@${ c . login } `
47
- } </b></sub></a></td>`
43
+ ` <td align="center" valign="top"${
44
+ contributors . length >= colPerRow ? ` width="14.28%"` : ``
45
+ } ><a href="${ `https://github.com/${ c . login } ` } "><img src="${ c . avatarUrl } " width="100px;" alt=""/>` +
46
+ `<br /><sub><b>${ c . name ? c . name : `@${ c . login } ` } </b>${ c . isTeamMember ? "🔹" : "" } </sub></a></td>`
48
47
)
49
48
. join ( `\n` ) } \n</tr>`
50
49
)
@@ -82,12 +81,14 @@ The Core Team has the following responsibilities:
82
81
83
82
${ buildContributorsTable ( data . coreTeam ) }
84
83
85
- ### Team
84
+ ### Contributors
85
+
86
+ These contributors have helped shape \`golangci-lint\` into what it is today. Team members are marked with a '🔹' next to their names.
86
87
87
88
${ buildContributorsTable ( data . contributors . slice ( 0 , visibleCount ) ) }
88
89
89
90
<details>
90
- <summary>And ${ hiddenCount } more our team members </summary>
91
+ <summary>And ${ hiddenCount } more contributors </summary>
91
92
92
93
${ buildContributorsTable ( data . contributors . slice ( visibleCount ) ) }
93
94
You can’t perform that action at this time.
0 commit comments