Bug 35504: Distinguish different RMaint and Topic Expert roles

This patch further splits up release maintanence and topic expert roles
so that they display with further, more accurate, detail in the
development team section.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2ce83fc784)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Martin Renvoize 2024-01-10 13:46:58 +00:00 committed by Fridolin Somers
parent d5e6c33426
commit 6f09a31a15
2 changed files with 32 additions and 8 deletions

View file

@ -767,13 +767,23 @@ my $contributors =
delete $contributors->{_others_};
for my $version ( sort { $a <=> $b } keys %{$teams->{team}} ) {
for my $role ( keys %{ $teams->{team}->{$version} } ) {
my $detail = $teams->{team}->{$version}->{$role};
my $normalized_role = "$role";
$normalized_role =~ s/s$//;
if ( ref( $teams->{team}->{$version}->{$role} ) eq 'ARRAY' ) {
for my $contributor ( @{ $teams->{team}->{$version}->{$role} } ) {
if ( ref( $detail ) eq 'ARRAY' ) {
for my $contributor ( @{ $detail } ) {
my $localized_role = $normalized_role;
if ( my $subversion = $contributor->{version} ) {
$localized_role .= ':' . $subversion;
}
if ( my $area = $contributor->{area} ) {
$localized_role .= ':' . $area;
}
my $name = $contributor->{name};
# Add role to contributors
push @{ $contributors->{$name}->{roles}->{$normalized_role} },
push @{ $contributors->{$name}->{roles}->{$localized_role} },
$version;
# Add openhub to teams
if ( exists( $contributors->{$name}->{openhub} ) ) {
@ -782,22 +792,29 @@ for my $version ( sort { $a <=> $b } keys %{$teams->{team}} ) {
}
}
elsif ( $role eq 'release_date' ) {
$teams->{team}->{$version}->{$role} = DateTime->from_epoch( epoch => $teams->{team}->{$version}->{$role});
$teams->{team}->{$version}->{$role} = DateTime->from_epoch( epoch => $teams->{team}->{$version}->{$role} );
}
elsif ( $role eq 'codename' ) {
if ( $version == $short_version ) {
$codename = $teams->{team}->{$version}->{$role};
$codename = $detail;
}
next;
}
else {
my $name = $teams->{team}->{$version}->{$role}->{name};
if ( my $subversion = $detail->{version} ) {
$normalized_role .= ':' . $subversion;
}
if ( my $area = $detail->{area} ) {
$normalized_role .= ':' . $area;
}
my $name = $detail->{name};
# Add role to contributors
push @{ $contributors->{$name}->{roles}->{$normalized_role} },
$version;
# Add openhub to teams
if ( exists( $contributors->{$name}->{openhub} ) ) {
$teams->{team}->{$version}->{$role}->{openhub} =
$detail->{openhub} =
$contributors->{$name}->{openhub};
}
}

View file

@ -1,5 +1,8 @@
[%- BLOCK role -%]
[%- SWITCH role.key -%]
[% matches = role.key.match('(\w+):?(.*)?') %]
[% ro = matches.0 %]
[% ex = matches.1 %]
[%- SWITCH ro -%]
[%- CASE 'manager' -%]<span>Release manager</span>
[%- CASE 'manager_assistant' -%]<span>Release manager assistant</span>
[%- CASE 'manager_mentor' -%]<span>Release manager mentor</span>
@ -27,7 +30,11 @@
[%- CASE 'live_cd' -%]<span>Live CD maintainer</span>
[%- CASE 'accessibility_advocate'-%]<span>Accessibility advocate</span>
[%- CASE 'meeting_facilitator' -%]<span>Meeting facilitator</span>
[%- CASE 'ktd' -%]<span>Developer tooling</span>
[%- CASE 'website' -%]<span>Website administrator</span>
[%- CASE -%]<span>MISSING MAP FOR ROLE: [% role.key | html %]</span>
[%- END -%]
[%- IF ex %] - [% ex | html %][% END -%]
[%- END -%]
[%- BLOCK person -%]