-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Fix git hooks prompt #26258
Fix git hooks prompt #26258
Conversation
There is another bug here that can lead to the generation of dirty data: since Git operations rely on the creation of database PRs, when a Git operation fails, it's unable to roll back the changes in the database, resulting in the generation of dirty data. Anyone have a good idea how to fix this bug?
|
The bug will be fixed #26259 |
The prompt message is from a user-set hook, which isn't very pretty, but giving a prompt is a little friendlier than the previous 500. |
But there are full of HTML tags. Are these tags from the git hook? |
HTML tags are not from a git hook, now I get what you're saying. |
Fix #26129 Replace #26258 This PR will introduce a transaction on creating pull request so that if some step failed, it will rollback totally. And there will be no dirty pull request exist. --------- Co-authored-by: Giteabot <[email protected]>
I haven't figured out how this Flash works.,why I only get network errors with the following function?@zeripath
|
I think we can not use Flash error here, we should use gitea/web_src/js/features/common-global.js Line 122 in a370efc
|
The toast module may be more suitable, but it currently also escapes HTML for security reason. If we are sure there is nothing user-supplied in these messages, we could add an option to disable HTML escaping. Same is also possible for Tippy, but generally I'm wary because the screenshot above does show it contains user data. https://github.com/go-gitea/gitea/blob/main/web_src/js/modules/toast.js |
…ea#26259) Fix go-gitea#26129 Replace go-gitea#26258 This PR will introduce a transaction on creating pull request so that if some step failed, it will rollback totally. And there will be no dirty pull request exist. --------- Co-authored-by: Giteabot <[email protected]>
close #26129
Before:
After: