Skip to content

Commit

Permalink
Fix special security level retrieval
Browse files Browse the repository at this point in the history
Apparently the config converts every key to lowercase, so let's adjust for that.
Might have been caused by some update to the konf library that we missed.
  • Loading branch information
violine1101 committed Aug 3, 2023
1 parent 85103e7 commit 06b858d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ arisa:
privateSecurityLevel:
default: '10318'
special:
MCL: '10502'
mcl: '10502'

modules:
affectedVersionMessage:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ fun getCreationDate(issue: JiraIssue, id: String, default: Instant) = issue.chan
?.toInstant() ?: default

fun JiraProject.getSecurityLevelId(config: Config) =
config[Arisa.PrivateSecurityLevel.special][key] ?: config[Arisa.PrivateSecurityLevel.default]
config[Arisa.PrivateSecurityLevel.special][key.lowercase()] ?: config[Arisa.PrivateSecurityLevel.default]

fun JiraVersion.toDomain() = Version(
id,
Expand Down

0 comments on commit 06b858d

Please sign in to comment.