22 lines
1.1 KiB
Kotlin
22 lines
1.1 KiB
Kotlin
package solutions.tretter.githugandroid
|
|
|
|
/**
|
|
* Port of the upstream ruby-githug `contribute` level.
|
|
*
|
|
* Setup documents the repository shape the learner explores. Evaluation is kept
|
|
* state-based whenever the exercise changes repository objects; answer-only
|
|
* levels intentionally validate the answer entered at the prompt.
|
|
*/
|
|
internal fun contributeLevel(): Level = level(
|
|
id = "contribute",
|
|
title = "Contribute",
|
|
description = "This is the final level, the goal is to contribute to this repository by making a pull request on GitHub. Please note that this level is designed to encourage you to add a valid contribution to Githug, not testing your ability to create a pull request. Contributions that are likely to be accepted are levels, bug fixes and improved documentation.",
|
|
hints = listOf("Forking the repository would be a good start!"),
|
|
commandSuggestions = listOf("Open a pull request"),
|
|
setup = { RepoState() },
|
|
validator = { _, command -> command.isNotBlank() },
|
|
testCases = listOf(
|
|
levelTestCase("acknowledge contribution goal", "Open a pull request"),
|
|
),
|
|
)
|