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

Better visual presentation of an error message coming from a git hook #10778

Open
1 of 3 tasks
mshgh opened this issue Mar 20, 2020 · 2 comments
Open
1 of 3 tasks

Better visual presentation of an error message coming from a git hook #10778

mshgh opened this issue Mar 20, 2020 · 2 comments
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@mshgh
Copy link

mshgh commented Mar 20, 2020

  • Gitea version (or commit ref): 1.11.3 docker image
  • Git version: not relevant
  • Operating system: not relevant
  • Database (use [x]): not relevant
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist: not relevant

Description

Creating separate issue based on request in #10322 (comment)

I would like to have better visual presentation of an error message coming from a git hook. See screenshot below.

I can see two possible solutions
a) we allow HTML to be used in the message. Very flexible, possibly dangerous, but as only site admin can create git hooks this should be ok, I think.
or
b) the message is displayed in pre-formatted block which itself is centered however its content is left-aligned. So, in the example below, commits are nicely aligned one under another.

Screenshots

MergeFailMessage

@lunny lunny added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Mar 20, 2020
@zeripath
Copy link
Contributor

My suspicion is that a user could almost always get round this and end up causing unescaped strings

@mshgh
Copy link
Author

mshgh commented Mar 23, 2020

Did I get it right you suggest there is a way how to prepare error message so the markup is processed?
If so can you tell me how to make this work? I am not a golang-man...

echo "Foo <b>bar</b>" >&2
exit 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

3 participants