This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new 3eb79075 Display asf-githubStringID
3eb79075 is described below
commit 3eb7907515edd1d89b72d20e975c747029fd6306
Author: Sebb <[email protected]>
AuthorDate: Mon Feb 23 23:37:56 2026 +0000
Display asf-githubStringID
---
lib/whimsy/asf/ldap.rb | 2 ++
www/roster/main.rb | 12 ++++++++----
www/roster/models/committee.rb | 5 ++++-
www/roster/models/committer.rb | 1 +
www/roster/models/nonpmc.rb | 3 ++-
www/roster/models/ppmc.rb | 9 ++++++---
www/roster/views/committerSearch.js.rb | 3 +++
www/roster/views/nonpmc/committers.js.rb | 4 ++++
www/roster/views/nonpmc/members.js.rb | 4 ++++
www/roster/views/person/github.js.rb | 21 ++++++++++++++++-----
www/roster/views/pmc/committers.js.rb | 4 ++++
www/roster/views/pmc/members.js.rb | 4 ++++
www/roster/views/ppmc/committers.js.rb | 4 ++++
www/roster/views/ppmc/members.js.rb | 4 ++++
www/roster/views/ppmc/mentors.js.rb | 5 +++++
15 files changed, 71 insertions(+), 14 deletions(-)
diff --git a/lib/whimsy/asf/ldap.rb b/lib/whimsy/asf/ldap.rb
index a43014c2..af4fa79b 100644
--- a/lib/whimsy/asf/ldap.rb
+++ b/lib/whimsy/asf/ldap.rb
@@ -944,6 +944,8 @@ module ASF
VALID_ATTRS = %w[
asf-altEmail
asf-committer-email
+ asf-githubNumericID
+ asf-githubStringID
asf-member-activeprojects
asf-member-status
asf-pgpKeyFingerprint
diff --git a/www/roster/main.rb b/www/roster/main.rb
index 9c87df55..75fcaa25 100755
--- a/www/roster/main.rb
+++ b/www/roster/main.rb
@@ -137,11 +137,13 @@ get '/committer/index.json' do
mail = Hash[ASF::Mail.list.group_by(&:last).
map {|person, list| [person, list.map(&:first)]}]
- ASF::Person.preload(['id','name','mail','githubUsername'])
+
ASF::Person.preload(['id','name','mail','githubUsername','asf-githubStringID'])
member_statuses = ASF::Member.member_statuses
# build a list of people, their public-names, and email addresses
index = ASF::Person.list.sort_by(&:id).map {|person|
- result = {id: person.id, name: person.public_name, mail: mail[person],
githubUsername: person.attrs['githubUsername'] || []}
+ result = {id: person.id, name: person.public_name, mail: mail[person],
+ githubUsername: person.attrs['githubUsername'] || [],
+ asf_githubStringID: person.attrs['asf-githubStringID']&.first || ''}
result[:asf_member_status] = member_statuses[person.id]
result
}.to_json
@@ -185,10 +187,12 @@ get '/committer2/index.json' do
mail = Hash[ASF::Mail.list.group_by(&:last).
map {|person, list| [person, list.map(&:first)]}]
- ASF::Person.preload(['id','name','mail','githubUsername'])
+ ASF::Person.preload(['id','name','mail','githubUsername',
'asf-githubStringID'])
# build a list of people, their public-names, and email addresses
tmp = ASF::Person.list.sort_by(&:id).map {|person|
- result = {id: person.id, name: person.public_name, mail: mail[person],
githubUsername: person.attrs['githubUsername'] || []}
+ result = {id: person.id, name: person.public_name, mail: mail[person],
+ githubUsername: person.attrs['githubUsername'] || [],
+ asf_githubStringID: person.attrs['asf-githubStringID']&.first || ''}
result[:member] = true if person.asf_member?
result
}
diff --git a/www/roster/models/committee.rb b/www/roster/models/committee.rb
index b78c17a6..2a4e9076 100644
--- a/www/roster/models/committee.rb
+++ b/www/roster/models/committee.rb
@@ -10,7 +10,7 @@ class Committee
# These may be empty if there is no matching LDAP group, e.g. during
initial setup
ASF::Committee.load_committee_info
# We'll be needing the mail data later
- ASF::Person.preload(['cn', 'mail', 'asf-altEmail', 'githubUsername'],
(owners + committers).uniq)
+ ASF::Person.preload(['cn', 'mail', 'asf-altEmail', 'githubUsername',
'asf-githubStringID'], (owners + committers).uniq)
comdev = ASF::SVN['comdev-foundation']
info = JSON.parse(File.read(File.join(comdev, 'projects.json')))[id]
@@ -84,6 +84,7 @@ class Committee
unMatchedSecSubs.delete_if {|k| allMail.include?
ASF::Mail.to_canonical(k.downcase)}
end
roster[key]['githubUsername'] = (person.attrs['githubUsername'] ||
[]).join(', ')
+ roster[key]['asf_githubStringID'] =
person.attrs['asf-githubStringID']&.first || ''
end
owners.each do |person| # process the owners
@@ -104,6 +105,7 @@ class Committee
end
roster[person.id]['ldap'] = true
roster[person.id]['githubUsername'] = (person.attrs['githubUsername'] ||
[]).join(', ')
+ roster[person.id]['asf_githubStringID'] =
person.attrs['asf-githubStringID']&.first || ''
end
committers.each do |person|
@@ -112,6 +114,7 @@ class Committee
role: 'Committer'
}
roster[person.id]['githubUsername'] = (person.attrs['githubUsername'] ||
[]).join(', ')
+ roster[person.id]['asf_githubStringID'] =
person.attrs['asf-githubStringID']&.first || ''
end
roster.each {|k, v| v[:member] = ASF::Person.find(k).asf_member?}
diff --git a/www/roster/models/committer.rb b/www/roster/models/committer.rb
index d7fdc664..424f248c 100644
--- a/www/roster/models/committer.rb
+++ b/www/roster/models/committer.rb
@@ -69,6 +69,7 @@ class Committer
response[:sascore] = person.attrs['asf-sascore'].first # should only be
one, but is returned as array
end
+ response[:asf_githubStringID] = person.attrs['asf-githubStringID']&.first
|| ''
if person.attrs['githubUsername']
response[:githubUsername] = person.attrs['githubUsername'] # always
return array
end
diff --git a/www/roster/models/nonpmc.rb b/www/roster/models/nonpmc.rb
index d68db295..e30cd2b6 100644
--- a/www/roster/models/nonpmc.rb
+++ b/www/roster/models/nonpmc.rb
@@ -14,7 +14,7 @@ class NonPMC
ASF::Committee.load_committee_info
# We'll be needing the mail data later
- ASF::Person.preload(['cn', 'mail', 'asf-altEmail', 'githubUsername'],
(members + committers).uniq)
+ ASF::Person.preload(['cn', 'mail', 'asf-altEmail', 'githubUsername',
'asf-githubStringID'], (members + committers).uniq)
image = ASF::SiteImage.find(id)
@@ -96,6 +96,7 @@ class NonPMC
person = ASF::Person.find(k)
v[:member] = person.asf_member?
v['githubUsername'] = (person.attrs['githubUsername'] || []).join(', ')
+ v['asf_githubStringID'] = person.attrs['asf-githubStringID']&.first || ''
end
if cttee.chair and roster[cttee.chair.id]
diff --git a/www/roster/models/ppmc.rb b/www/roster/models/ppmc.rb
index b0334edc..b4d0d6c1 100644
--- a/www/roster/models/ppmc.rb
+++ b/www/roster/models/ppmc.rb
@@ -73,7 +73,8 @@ class PPMC
member: person.asf_member?,
icommit: incubator_committers.include?(person),
role: 'Committer',
- githubUsername: (person.attrs['githubUsername'] || []).join(', ')
+ githubUsername: (person.attrs['githubUsername'] || []).join(', '),
+ asf_githubStringID: person.attrs['asf-githubStringID']&.first || ''
}]
}.to_h
@@ -84,7 +85,8 @@ class PPMC
member: person.asf_member?,
icommit: incubator_committers.include?(person),
role: 'PPMC Member',
- githubUsername: (person.attrs['githubUsername'] || []).join(', ')
+ githubUsername: (person.attrs['githubUsername'] || []).join(', '),
+ asf_githubStringID: person.attrs['asf-githubStringID']&.first || ''
}
if analysePrivateSubs or isOwner
allMail = person.all_mail.map{|m| ASF::Mail.to_canonical(m.downcase)}
@@ -104,7 +106,8 @@ class PPMC
ipmc: ipmc.include?(person),
icommit: incubator_committers.include?(person),
role: 'Mentor',
- githubUsername: (person.attrs['githubUsername'] || []).join(', ')
+ githubUsername: (person.attrs['githubUsername'] || []).join(', '),
+ asf_githubStringID: person.attrs['asf-githubStringID']&.first || ''
}
if analysePrivateSubs or isOwner
allMail = person.all_mail.map{|m| ASF::Mail.to_canonical(m.downcase)}
diff --git a/www/roster/views/committerSearch.js.rb
b/www/roster/views/committerSearch.js.rb
index 72b64996..92a18bff 100644
--- a/www/roster/views/committerSearch.js.rb
+++ b/www/roster/views/committerSearch.js.rb
@@ -51,6 +51,7 @@ class CommitterSearch < Vue
person.id.include? part or
person.name.downcase().include? part or
person.mail.any? {|mail| mail.include? part} or
+ person.asf_githubStringID.downcase().include? part or
person.githubUsername.any? {|ghun| ghun.downcase().include? part}
else
person.name.downcase().include? part or
@@ -101,6 +102,7 @@ class CommitterSearch < Vue
_th 'id'
_th 'public name'
_th 'email'
+ _th 'asf-githubStringID'
_th 'githubUsername'
if @@notinavail
_th 'ICLA'
@@ -133,6 +135,7 @@ class CommitterSearch < Vue
_td person.mail
end
+ _td person.asf_githubStringID
if person.githubUsername
_td person.githubUsername.join(', ')
else
diff --git a/www/roster/views/nonpmc/committers.js.rb
b/www/roster/views/nonpmc/committers.js.rb
index 7d16bc2d..a6017388 100644
--- a/www/roster/views/nonpmc/committers.js.rb
+++ b/www/roster/views/nonpmc/committers.js.rb
@@ -22,6 +22,7 @@ class NonPMCCommitters < Vue
_tr do
_th if @@auth
_th 'id', data_sort: 'string'
+ _th 'asf-githubStringID', data_sort: 'string'
_th 'githubUsername', data_sort: 'string'
_th.sorting_asc 'public name', data_sort: 'string-ins'
end
@@ -72,10 +73,12 @@ class NonPMCCommitter < Vue
if @@person.member == true # full member
_td { _b { _a @@person.id, href: "committer/#{@@person.id}"} }
+ _td @@person.asf_githubStringID
_td @@person.githubUsername
_td { _b @@person.name }
elsif @@person.member
_td { _i { _a @@person.id, href: "committer/#{@@person.id}"} }
+ _td @@person.asf_githubStringID
_td @@person.githubUsername
_td { _i @@person.name
_ ' ('
@@ -84,6 +87,7 @@ class NonPMCCommitter < Vue
}
else
_td { _a @@person.id, href: "committer/#{@@person.id}" }
+ _td @@person.asf_githubStringID
_td @@person.githubUsername
_td @@person.name
end
diff --git a/www/roster/views/nonpmc/members.js.rb
b/www/roster/views/nonpmc/members.js.rb
index 7467639f..6916b092 100644
--- a/www/roster/views/nonpmc/members.js.rb
+++ b/www/roster/views/nonpmc/members.js.rb
@@ -19,6 +19,7 @@ class NonPMCMembers < Vue
_tr do
_th if @@auth
_th 'id', data_sort: 'string'
+ _th 'asf-githubStringID', data_sort: 'string'
_th 'githubUsername', data_sort: 'string'
_th.sorting_asc 'public name', data_sort: 'string-ins'
_th 'starting date', data_sort: 'string'
@@ -73,10 +74,12 @@ class NonPMCMember < Vue
if @@person.member == true # full member
_td { _b { _a @@person.id, href: "committer/#{@@person.id}"} }
+ _td @@person.asf_githubStringID
_td @@person.githubUsername
_td { _b @@person.name }
elsif @@person.member
_td { _i { _a @@person.id, href: "committer/#{@@person.id}"} }
+ _td @@person.asf_githubStringID
_td @@person.githubUsername
_td { _i @@person.name
_ ' ('
@@ -85,6 +88,7 @@ class NonPMCMember < Vue
}
else
_td { _a @@person.id, href: "committer/#{@@person.id}" }
+ _td @@person.asf_githubStringID
_td @@person.githubUsername
_td @@person.name
end
diff --git a/www/roster/views/person/github.js.rb
b/www/roster/views/person/github.js.rb
index ce752561..5225a80b 100644
--- a/www/roster/views/person/github.js.rb
+++ b/www/roster/views/person/github.js.rb
@@ -6,13 +6,24 @@ class PersonGitHub < Vue
def render
committer = @@person.state.committer
+ _div.row do
+ _div.name do
+ _ 'ASF-linked GitHub username'
+ end
+ _div.value do
+ if committer.asf_githubStringID.empty?
+ _ '(not defined)'
+ _br
+ _a 'Link a GitHub username to your ASF id', href:
'https://gitbox.apache.org/boxer/'
+ else
+ _a committer.asf_githubStringID, href:
"https://github.com/#{committer.asf_githubStringID}"
+ end
+ end
+ end
+
_div.row data_edit: 'github' do
_div.name do
- _ 'GitHub username(s)'
- _br
- _b 'N.B. not synched with the ASF-linked id'
- _br
- _a 'Link GitHub username to ASF id', href:
'https://gitbox.apache.org/boxer/'
+ _ 'User-provided GitHub username(s)'
end
_div.value do
diff --git a/www/roster/views/pmc/committers.js.rb
b/www/roster/views/pmc/committers.js.rb
index 74a1135e..85aaaa0f 100644
--- a/www/roster/views/pmc/committers.js.rb
+++ b/www/roster/views/pmc/committers.js.rb
@@ -22,6 +22,7 @@ class PMCCommitters < Vue
_tr do
_th if @@auth
_th 'id', data_sort: 'string'
+ _th 'asf-githubStringID', data_sort: 'string'
_th 'githubUsername', data_sort: 'string'
_th.sorting_asc 'public name', data_sort: 'string-ins'
end
@@ -72,10 +73,12 @@ class PMCCommitter < Vue
if @@person.member == true # full member
_td { _b { _a @@person.id, href: "committer/#{@@person.id}"} }
+ _td @@person.asf_githubStringID
_td @@person.githubUsername
_td { _b @@person.name }
elsif @@person.member
_td { _i { _a @@person.id, href: "committer/#{@@person.id}"} }
+ _td @@person.asf_githubStringID
_td @@person.githubUsername
_td { _i @@person.name
_ ' ('
@@ -84,6 +87,7 @@ class PMCCommitter < Vue
}
else
_td { _a @@person.id, href: "committer/#{@@person.id}" }
+ _td @@person.asf_githubStringID
_td @@person.githubUsername
_td @@person.name
end
diff --git a/www/roster/views/pmc/members.js.rb
b/www/roster/views/pmc/members.js.rb
index 56222881..1a8eae39 100644
--- a/www/roster/views/pmc/members.js.rb
+++ b/www/roster/views/pmc/members.js.rb
@@ -16,6 +16,7 @@ class PMCMembers < Vue
_tr do
_th if @@auth
_th 'id', data_sort: 'string'
+ _th 'asf-githubStringID', data_sort: 'string'
_th 'githubUsername', data_sort: 'string'
_th.sorting_asc 'public name', data_sort: 'string-ins'
_th 'starting date', data_sort: 'string'
@@ -182,12 +183,14 @@ class PMCMember < Vue
_td { _b { _a @@person.id, href: "committer/#{@@person.id}", style:
style }
_a ' (*)', href: "committee/#{@@committee.id}#crosscheck",
style: style if @@person.notSubbed
}
+ _td @@person.asf_githubStringID, style: style
_td @@person.githubUsername, style: style
_td { _b @@person.name, style: style }
elsif @@person.member
_td { _i { _a @@person.id, href: "committer/#{@@person.id}", style:
style }
_a ' (*)', href: "committee/#{@@committee.id}#crosscheck",
style: style if @@person.notSubbed
}
+ _td @@person.asf_githubStringID, style: style
_td @@person.githubUsername, style: style
_td { _i @@person.name, style: style
_ ' ('
@@ -198,6 +201,7 @@ class PMCMember < Vue
_td { _a @@person.id, href: "committer/#{@@person.id}", style: style
_a ' (*)', href: "committee/#{@@committee.id}#crosscheck",
style: style if @@person.notSubbed
}
+ _td @@person.asf_githubStringID, style: style
_td @@person.githubUsername, style: style
_td @@person.name, style: style
end
diff --git a/www/roster/views/ppmc/committers.js.rb
b/www/roster/views/ppmc/committers.js.rb
index 5c4c48b9..18e06fa9 100644
--- a/www/roster/views/ppmc/committers.js.rb
+++ b/www/roster/views/ppmc/committers.js.rb
@@ -26,6 +26,7 @@ class PPMCCommitters < Vue
_tr do
_th if @@auth.ppmc
_th 'id', data_sort: 'string'
+ _th 'asf-githubStringID', data_sort: 'string'
_th 'githubUsername', data_sort: 'string'
_th.sorting_asc 'public name', data_sort: 'string-ins'
_th 'notes'
@@ -99,10 +100,12 @@ class PPMCCommitter < Vue
if @@person.member == true # full member
_td { _b { _a @@person.id, href: "committer/#{@@person.id}"} }
+ _td @@person.asf_githubStringID
_td @@person.githubUsername
_td { _b @@person.name }
elsif @@person.member
_td { _i { _a @@person.id, href: "committer/#{@@person.id}"} }
+ _td @@person.asf_githubStringID
_td @@person.githubUsername
_td { _i @@person.name
_ ' ('
@@ -111,6 +114,7 @@ class PPMCCommitter < Vue
}
else
_td { _a @@person.id, href: "committer/#{@@person.id}" }
+ _td @@person.asf_githubStringID
_td @@person.githubUsername
_td @@person.name
end
diff --git a/www/roster/views/ppmc/members.js.rb
b/www/roster/views/ppmc/members.js.rb
index e7fcb53e..bd4d7289 100644
--- a/www/roster/views/ppmc/members.js.rb
+++ b/www/roster/views/ppmc/members.js.rb
@@ -11,6 +11,7 @@ class PPMCMembers < Vue
_tr do
_th if @@auth.ppmc
_th 'id', data_sort: 'string'
+ _th 'asf-githubStringID', data_sort: 'string'
_th 'githubUsername', data_sort: 'string'
_th.sorting_asc 'public name', data_sort: 'string-ins'
_th 'notes'
@@ -137,12 +138,14 @@ class PPMCMember < Vue
_td { _b { _a @@person.id, href: "committer/#{@@person.id}" }
_a ' (*)', href: "ppmc/#{@@ppmc.id}#crosscheck" if
@@person.notSubbed
}
+ _td @@person.asf_githubStringID
_td @@person.githubUsername
_td { _b @@person.name }
elsif @@person.member
_td { _i { _a @@person.id, href: "committer/#{@@person.id}" }
_a ' (*)', href: "ppmc/#{@@ppmc.id}#crosscheck" if
@@person.notSubbed
}
+ _td @@person.asf_githubStringID
_td @@person.githubUsername
_td { _i @@person.name
_ ' ('
@@ -153,6 +156,7 @@ class PPMCMember < Vue
_td { _a @@person.id, href: "committer/#{@@person.id}"
_a ' (*)', href: "ppmc/#{@@ppmc.id}#crosscheck" if
@@person.notSubbed
}
+ _td @@person.asf_githubStringID
_td @@person.githubUsername
_td @@person.name
end
diff --git a/www/roster/views/ppmc/mentors.js.rb
b/www/roster/views/ppmc/mentors.js.rb
index 26520f68..a9225172 100644
--- a/www/roster/views/ppmc/mentors.js.rb
+++ b/www/roster/views/ppmc/mentors.js.rb
@@ -14,6 +14,7 @@ class PPMCMentors < Vue
_tr do
_th if @@auth.ipmc
_th 'id'
+ _th 'asf-githubStringID'
_th 'githubUsername'
_th 'public name'
_th 'notes'
@@ -61,12 +62,14 @@ class PPMCMentor < Vue
_td { _b { _a @@person.id, href: "committer/#{@@person.id}" }
_a ' (*)', href: "ppmc/#{@@ppmc.id}#crosscheck" if
@@person.notSubbed
}
+ _td @@person.asf_githubStringID
_td @@person.githubUsername
_td { _b @@person.name }
elsif @@person.member
_td { _i { _a @@person.id, href: "committer/#{@@person.id}" }
_a ' (*)', href: "ppmc/#{@@ppmc.id}#crosscheck" if
@@person.notSubbed
}
+ _td @@person.asf_githubStringID
_td @@person.githubUsername
_td { _i @@person.name
_ ' ('
@@ -77,10 +80,12 @@ class PPMCMentor < Vue
_td { _a @@person.id, href: "committer/#{@@person.id}"
_a ' (*)', href: "ppmc/#{@@ppmc.id}#crosscheck" if
@@person.notSubbed
}
+ _td @@person.asf_githubStringID
_td @@person.githubUsername
_td @@person.name
else
_td @@person.id
+ _td @@person.asf_githubStringID
_td @@person.githubUsername
_td @@person.name
end