Skip to content

Commit

Permalink
Make MCL use the same security level as the rest of the projects (#830)
Browse files Browse the repository at this point in the history
* Make MCL use the same security level as the rest of the projects

* Update ArisaConfig.kt

* Update Mappers.kt
  • Loading branch information
urielsalis authored Oct 2, 2024
1 parent 90b4165 commit b18d772
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
2 changes: 0 additions & 2 deletions config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ arisa:

privateSecurityLevel:
default: '10318'
special:
mcl: '10502'

modules:
affectedVersionMessage:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ object Arisa : ConfigSpec() {
val default by required<String>(
description = "The default security id used by projects not defined in special."
)
val special by required<Map<String, String>>(
description = "Some projects define their own security level. These projects need to be defined here with" +
" their own ID.. Default is all projects use the default ID"
)
}

object Debug : ConfigSpec() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ fun getCreationDate(issue: JiraIssue, id: String, default: Instant) = issue.chan
?.created
?.toInstant() ?: default

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

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

0 comments on commit b18d772

Please sign in to comment.