Do you have some thoughts, ideas about the API for workflow permissions?
current implemented solution:
some repetition
workflow(
name = "test",
permissions = listOf(
Permission.actions.read,
Permission.checks.read,
Permission.contents.write,
)
on = listOf(),
) {
job(id = "job", runsOn = UbuntuLatest) { run(command = "ls") }
}
other ideas:
everybody understands a map, a lot of repetition
permissions = mapOf(
Permission.Actions to Mode.WRITE,
Permission.Checks to Mode.WRITE,
Permission.Contents to Mode.WRITE,
),
no repetition, maybe unusual
permissions = {
actions(write)
checks(write)
checks(none)
actions(read)
},
current style of API, but no autocompletion in IDE.
permissions = listOf(
Actions(write),
Checks(read),
Contents(none),
),