Open lostintangent opened 4 years ago
My first thought is what level of coded tour is needed? I’m not sure an entire video is needed but I’d through out other ideas:
Just a few ideas.
@MSAdministrator CodeTour is already based on a config file that is used to record/play back tours. But for the purposes of enabling PRs, it feels a little heavyweight to have to write that file to the repo. Additionally, I don’t believe GitHub supports git notes. So the more I think about this, the more it seems like a decent idea to use gists for this.
The main downsides to that solution are: gists aren’t private, and therefore, this solution wouldn’t accommodate private repos on public GitHub (GitHub Enterprise includes support for “tenant-private” gists). We could use secret gists, that wouldn’t be easily discoverable, but for some companies, this probably wouldn’t be acceptable.
This is a great idea, but I just want to note: please don't engineer this in such a way that github is placed above other git hosts (even with MS having an obvious interest in that).
Currently, CodeTour allows you to record tours that are persisted to a repository (as files within a “.tours” directory), and are meant to be long-lived/versioned assets, that help explain the codebase.
However, it would also be valuable to record tours for pull requests (tweet, tweet), so that authors could provide a guided walkthrough of their changes, in order to make it easier for reviewers to understand them, and as a result, potentially provide more meaningful feedback!
Tours can already be associated with a specific Git ref (branch/commit/tag), however, we’ll need to add support for recording/playing back steps on diffs, not just files. Additionally, the following are some open questions we’d need to investigate:
Where would the tour be persisted to? Since the tour would be documenting a PR (which is a short-lived asset), it seems potentially strange to write is as a file in the repo. Maybe it makes sense to write them as a gist on behalf of the PR author? We already have basic support for that that we could potentially re-use. However, maybe it makes more sense persisting the tour as comments on the PR itself. That way, they’re viewable from both GitHub.com, as well as in VS Code.
How could the tour actually be associated with the PR? I’m not sure if GitHub PRs support arbitrary metadata, but their might be “hacks” for enabling this relationship. That said, if we wrote the tour as a gist file, maybe we could simply add the gist ID to the PR’s description somehow? (possible solution?)
How could CodeTour hook into the GitHub Pull Request extension, so that tours can be easily recorded/played back, as part of the existing flow for creating/reviewing PRs? Depending on the answer to the above, CodeTour would potentially need to detect that the user is creating/reviewing a PR, and then read/write to the PR’s description (CC @rebornix)