Using patches as multi-file suggestions
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem to solve
We want to make patch files a first-class citizen within our merge requests / code reviews. Specifically, we want to allow authors to be able to view and apply patch files in the same way they can currently apply suggestions.
These patches can be created:
- using the
git diff > suggestions.patch
command - using GitLab Workflow extension in VS Code gitlab-vscode-extension#393 (closed)
- in the future using WebIDE #31978 (moved)
Intended users
What does success look like, and how can we measure that?
We would somehow recognize that a comment contains patch (it could be a snippet patch or text attachment), in the comment we would show a component similar to <details>
HTML tag that would allow users to inspect the whole patch before applying.
e.g.
`increase tests to 2000ms.patch`
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2c4c11e..26a9d6c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,7 +2,7 @@ image: node:12-slim
test:
script:
- - sleep 20
+ - sleep 2000
- echo hello
deploy:
diff --git a/README.md b/README.md
index ae85919..a0519ba 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,3 @@
-# Initial readme
\ No newline at end of file
+# Initial readme
+
+- The tests take 2000ms
Or we would embed a snippet similar to: viktomas/test-project$2146307
We could also explore showing a modal if the component doesn't have enough space.
After inspecting the patch, users could apply it with a button and specify the commit message (defaulting to the patch file name).
Links / references
Original suggestion
Problem to solve
We want to make patch files a first class citizen within our merge requests / code reviews. Specifically we want to allow authors to be able to apply patch files in the same they can current apply suggestions.
Intended users
What does success look like, and how can we measure that?
A author should be able to access a button called: "Apply Patch" which would let them apply a suggested patch file inside the GitLab UI.