From 82b064640dd84ce322ae777c900b9c3a66191e0e Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Mon, 6 Aug 2018 07:43:22 +0300 Subject: [PATCH] Pull request review/approval and comment on code (#3748) * Initial ui components for pull request review * Add Review Add IssueComment types Signed-off-by: Jonas Franz (cherry picked from commit 2b4daab) Signed-off-by: Jonas Franz * Replace ReviewComment with Content Signed-off-by: Jonas Franz * Add load functions Add ReviewID to findComments Signed-off-by: Jonas Franz * Add create review comment implementation Add migration for review Other small changes Signed-off-by: Jonas Franz * Simplified create and find functions for review Signed-off-by: Jonas Franz * Moved "Pending" to first position Signed-off-by: Jonas Franz * Add GetCurrentReview to simplify fetching current review Signed-off-by: Jonas Franz * Preview for listing comments Signed-off-by: Jonas Franz * Move new comment form to its own file Signed-off-by: Jonas Franz * Implement Review form Show Review comments on comment stream Signed-off-by: Jonas Franz * Add support for single comments Showing buttons in context Signed-off-by: Jonas Franz * Add pending tag to pending review comments Signed-off-by: Jonas Franz * Add unit tests for Review Signed-off-by: Jonas Franz * Fetch all review ids at once Add unit tests Signed-off-by: Jonas Franz * gofmt Signed-off-by: Jonas Franz * Improved comment rendering in "Files" view by adding Comments to DiffLine Signed-off-by: Jonas Franz * Add support for invalidating comments Signed-off-by: Jonas Franz * Switched back to code.gitea.io/git Signed-off-by: Jonas Franz * Moved review migration from v64 to v65 Signed-off-by: Jonas Franz * Rebuild css Signed-off-by: Jonas Franz * gofmt Signed-off-by: Jonas Franz * Improve translations Signed-off-by: Jonas Franz * Fix unit tests by updating fixtures and updating outdated test Signed-off-by: Jonas Franz * Comments will be shown at the right place now Signed-off-by: Jonas Franz * Add support for deleting CodeComments Signed-off-by: Jonas Franz * Fix problems caused by files in subdirectories Signed-off-by: Jonas Franz * Add support for showing code comments of reviews in conversation Signed-off-by: Jonas Franz * Add support for "Show/Hide outdated" Signed-off-by: Jonas Franz * Update code.gitea.io/git Signed-off-by: Jonas Franz * Add support for new webhooks Signed-off-by: Jonas Franz * Update comparison Signed-off-by: Jonas Franz * Resolve conflicts Signed-off-by: Jonas Franz * Minor UI improvements * update code.gitea.io/git * Fix ui bug reported by @lunny causing wrong position of add button Add functionality to "Cancel" button Add scale effects to add button Hide "Cancel" button for existing comments Signed-off-by: Jonas Franz * Prepare solving conflicts Signed-off-by: Jonas Franz * Show add button only if no comments already exist for the line Signed-off-by: Jonas Franz * Add missing vendor files Signed-off-by: Jonas Franz * Check if reviewer is nil Signed-off-by: Jonas Franz * Show forms only to users who are logged in Signed-off-by: Jonas Franz * Revert "Show forms only to users who are logged in" This reverts commit c083682 Signed-off-by: Jonas Franz * Save patch in comment Render patch for code comments Signed-off-by: Jonas Franz * Add link to comment in code Signed-off-by: Jonas Franz * Add reply form to comment list Show forms only to signed in users Signed-off-by: Jonas Franz * Add 'Reply' as translatable Add CODE_COMMENT_LINES setting Signed-off-by: Jonas Franz * gofmt Signed-off-by: Jonas Franz * Fix problems introduced by checking for singed in user Signed-off-by: Jonas Franz * Add v70 Signed-off-by: Jonas Franz * Update generated stylesheet Signed-off-by: Jonas Franz * Fix preview Beginn with new review comment patch system Signed-off-by: Jonas Franz * Add new algo to generate diff for line range Remove old algo used for cutting big diffs (it was very buggy) * Add documentation and example for CutDiffAroundLine * Fix example of CutDiffAroundLine * Fix some comment UI rendering bugs * Add code comment edit mode * Send notifications / actions to users until review gets published Fix diff generation bug Fix wrong hashtag * Fix vet errors * Send notifications also for single comments * Fix some notification bugs, fix link * Fix: add comment icon is only shown on code lines * Add lint comment * Add unit tests for git diff * Add more error messages * Regenerated css Signed-off-by: Jonas Franz * fmt Signed-off-by: Jonas Franz * Regenerated CSS with latest less version Signed-off-by: Jonas Franz * Fix test by updating comment type to new ID Signed-off-by: Jonas Franz * Introducing CodeComments as type for map[string]map[int64][]*Comment Other minor code improvements Signed-off-by: Jonas Franz * Fix data-tab issues Signed-off-by: Jonas Franz * Remove unnecessary change Signed-off-by: Jonas Franz * refactored checkForInvalidation Signed-off-by: Jonas Franz * Append comments instead of setting Signed-off-by: Jonas Franz * Use HeadRepo instead of BaseRepo Signed-off-by: Jonas Franz * Update migration Signed-off-by: Jonas Franz * Regenerated CSS Signed-off-by: Jonas Franz * Add copyright Signed-off-by: Jonas Franz * Update index.css Signed-off-by: Jonas Franz --- doc/features/comparison.en-us.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/features/comparison.en-us.md b/doc/features/comparison.en-us.md index 698de4f4..792d5833 100644 --- a/doc/features/comparison.en-us.md +++ b/doc/features/comparison.en-us.md @@ -92,8 +92,8 @@ _Symbols used in table:_ | Pull/Merge requests | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | Squash merging | ✓ | ✘ | ✓ | ✘ | ✓ | ✓ | ✓ | | Rebase merging | ✓ | ✓ | ✓ | ✘ | ⁄ | ✘ | ✓ | -| Pull/Merge request inline comments | ✘ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ | -| Pull/Merge request approval | ✘ | ✘ | ⁄ | ✓ | ✓ | ✓ | ✓ | +| Pull/Merge request inline comments | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ | +| Pull/Merge request approval | ✓ | ✘ | ⁄ | ✓ | ✓ | ✓ | ✓ | | Merge conflict resolution | ✘ | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ | | Restrict push and merge access to certain users | ✓ | ✘ | ✓ | ⁄ | ✓ | ✓ | ✓ | | Revert specific commits or a merge request | ✘ | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ |