exercism / exercism/cli

Link to community solutions after submitting when in Independent Mode

未关闭
#672 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Go
星标
1.4k
派生
363
平均合并
6 天 13 小时
30 天内合并 PR
2

描述

We should print the link for people to browse the community solutions if they're not in mentored mode.

At the bottom of the submit command, we can add something like this:

```diff
fmt.Fprintf(Out, " %s\n\n", solution.URL)
+
+ siteURL := config.InferSiteURL(usrCfg.GetString("apibaseurl"))
+ msg = `
+ View other solutions to this exercise at:
+ %s/tracks/%s/exercises/%s/solutions
+
+`
+ fmt.Fprintf(Err, msg, siteURL, solution.Track, solution.Exercise)
```

However, we will need to get the API to tell us which mode a solution is being solved in so that we can check for that before printing it, either as part of the solution metadata when downloading, or as part of the response when submitting. See also https://github.com/exercism/cli/issues/673

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。