Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Save drafts of comments #1994
Save drafts of inline comments, PR reviews and PRs.
As described in #1905, it is easy to lose a comment that you're working on if you close the diff view accidentally. This PR saves drafts of comments as they are being written to an SQLite database.
In addition to saving drafts of inline comments, it also saves comments to PR reviews and PRs themselves.
The comments are written to an SQLite database directly instead of going through Akavache because in the case of inline reviews, there can be many drafts in progress on a separate file. When a diff is opened we need to look for any comments present on that file and show the most recent. That use-case didn't fit well with Akavache (being a pure key/value store).
All of the inline comment stuff seems to be working great! I cloned and opened solutions and my comments are still there.
With the pull request saving functionality, I tried the following:
The details from the previously created pull request are restored.
Are you missing a clear when a pull request is created?
This is looking great!
Just a few comments on the tests. Is
WithScheduler still necessary? There are a bunch of tests that still use it. I few other minor commands inline on the tests.