cli
cli copied to clipboard
Allow API to control messages returned to the user on submission
There are an increasing amount of usecases for the API being able to return custom messages upon submission. Examples include being able to implement https://github.com/exercism/cli/issues/802 without cutting a new release, or being able to provide custom next steps depending on the type of exercise (mentored vs independent, core vs side, etc)
I'd like to return a message from the API, which then gets outputted at https://github.com/exercism/cli/blob/a86f82974270d2da2090a02437560897a216abc3/cmd/submit.go#L275
I think we can then also remove https://github.com/exercism/cli/blob/a86f82974270d2da2090a02437560897a216abc3/cmd/submit.go#L278-L281
Thoughts?
I like this. Maybe if we wanted interactive resolving of issues, the API could return some sort of actions
array detailing actions that could be taken?
I'd like to defer interactive stuff for the time being, since the last time I tried that it made things monumentally complex and hard and unpleasant.
I agree we should display any message that the API returns, though, even if it's not an error. Maybe we can always have a standard message
field that we display if present?
I agree we should display any message that the API returns, though, even if it's not an error. Maybe we can always have a standard
message
field that we display if present?
Sounds good. I'll write up a spec at some point when I have some free time.
hey can i take up this task ?
@clock21am Thanks so much for your interest. We still haven't had time to prioritize the work to define the interaction between the API and the CLI, so this is still blocked.
I realized we hadn't labeled it as such, but I have done so now.