Files
Githug-Android/app/src/main/java/solutions/tretter/githugandroid/levels/ContributeLevel.kt
Joe Tretter e1b2d7f7a1 Misc Changes
2026-05-06 21:28:44 -05:00

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"),
),
)