cli icon indicating copy to clipboard operation
cli copied to clipboard

Allow API to control messages returned to the user on submission

Open iHiD opened this issue 6 years ago • 5 comments

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?

iHiD avatar Feb 12 '19 04:02 iHiD

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?

Smarticles101 avatar Feb 12 '19 13:02 Smarticles101

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?

kytrinyx avatar Feb 20 '19 00:02 kytrinyx

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.

iHiD avatar Feb 20 '19 01:02 iHiD

hey can i take up this task ?

clock21am avatar Aug 04 '19 18:08 clock21am

@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.

kytrinyx avatar Aug 05 '19 01:08 kytrinyx