Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Button to apply diff comments to PRs #9388

Open
6543 opened this issue Dec 17, 2019 · 9 comments
Open

Add Button to apply diff comments to PRs #9388

6543 opened this issue Dec 17, 2019 · 9 comments
Labels
topic/pr Issues related to pull requests topic/ui Change the appearance of the Gitea UI type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@6543
Copy link
Member

6543 commented Dec 17, 2019

if you leaf a code-block commit with: ```diff ...

show a button to commit the diff to the PR
like suggestions in PR review comments but more powerful

for those who are interesting to implement it:

@zeripath
Copy link
Contributor

It would have to either be a git formatted diff or even better patch, or else be attached to a file somehow.

@lunny lunny added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Dec 18, 2019
@6543
Copy link
Member Author

6543 commented Jan 16, 2020

@guillep2k you could link this issue to #8659 (just noticed ...)

@6543
Copy link
Member Author

6543 commented Apr 28, 2022

update: #17902 did add support in terms of api 🎉

@6543 6543 added type/feature Completely new functionality. Can only be merged if feature freeze is not active. topic/ui Change the appearance of the Gitea UI labels Apr 28, 2022
@6543 6543 added this to the 1.17.0 milestone Apr 28, 2022
@6543 6543 changed the title [Feature Request] apply diff comments to PRs Add Button to apply diff comments to PRs Apr 28, 2022
@lunny
Copy link
Member

lunny commented Apr 28, 2022

Did you mean to support suggestion as a diff and with buttons to apply the patches?

@6543
Copy link
Member Author

6543 commented Apr 29, 2022

suggestion support as per github, would be nice but is likely harder to implement.

Screenshot at 2022-04-29 02-59-15
Screenshot at 2022-04-29 02-59-34

a diff is easier to implement for the start as you can use the described api

example:

diff --git a/templates/admin/auth/list.tmpl b/templates/admin/auth/list.tmpl
index b4a703e41..64db93a3e 100644
--- a/templates/admin/auth/list.tmpl
+++ b/templates/admin/auth/list.tmpl
@@ -10,7 +10,7 @@
                        </div>
                </h4>
                <div class="ui attached table segment">
-                       <table class="ui very basic striped table unstackable">
+                       <table class="ui two basic striped table unstackable">
                                <thead>
                                        <tr>
                                                <th>ID</th>

@6543
Copy link
Member Author

6543 commented Apr 29, 2022

☝️ suggestion support would be also nice, but you have to create a diff/patch form the infos first ... (what was original there ...

@lunny
Copy link
Member

lunny commented Apr 29, 2022

☝️ suggestion support would be also nice, but you have to create a diff/patch form the infos first ... (what was original there ...

For apply a patch, isn't it implemented in #17902? We just add a form in UI but not upload a file to do that?

@qwerty287
Copy link
Contributor

@6543 for suggestions, there is #14765 - this seems to be only about raw diffs.

@lunny lunny modified the milestones: 1.17.0, 1.18.0 May 16, 2022
@tecosaur
Copy link

tecosaur commented Aug 8, 2022

It would be nice if this also applied to .patch attachments.

@lunny lunny modified the milestones: 1.18.0, 1.19.0 Oct 17, 2022
@lunny lunny removed this from the 1.19.0 milestone Jan 31, 2023
@silverwind silverwind added theme/review topic/pr Issues related to pull requests and removed theme/review labels May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/pr Issues related to pull requests topic/ui Change the appearance of the Gitea UI type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

6 participants