Skip to content

Commit

Permalink
Fix up mismatched names
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbASF committed May 22, 2023
1 parent 0428f73 commit ecef479
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/whimsy/asf/orgchart.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ class OrgChart
@@duties = {}
@@desc = {}

# the file names used to be the same as the role ids, however
# these were changed in order to fix public links using the shorter names
@@aliases = {
'vp-marketing' => 'vp-marketingandpublicity',
'infra-admin' => 'infrastructureadministrator',
}

# parse any changed YAML role files.
def self.load
@@source ||= ASF::SVN['personnel-duties']
Expand All @@ -21,6 +28,7 @@ def self.load
data = Hash[*File.read(file).split(/^\[(.*)\]\n/)[1..-1].map(&:strip)]
next unless data['info']
data['info'] = YAML.safe_load(data['info'])
name = @@aliases[name] || name
# fix up data items available from elsewhere
if name =~ %r{^vp-(.+)$} or name =~ %r{^(security)$}
post = $1
Expand Down

0 comments on commit ecef479

Please sign in to comment.