* Fix 'add code comment' button being invisible all the time
* Fix off-center icon
* Remove old JS hover hack
* Show on full-line hover
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
(cherry picked from commit 7f7e7f3ca4)
* Fix minio bug
* Add tests for storage configuration
* Change the Seek flag to keep compitable minio?
* Fix test when first-byte-pos of all ranges is greater than the resource length
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Backport #13357
* When creating line diffs do not split within an html entity
Fix#13342
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add test case
Signed-off-by: Andrew Thornton <art27@cantab.net>
* improve test
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix scrolling to resolved comment anchors
As described on discord, when the window.location.hash refers to a
resolved comment then the scroll to functionality does not work.
This PR fixes this.
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Apply suggestions from code review
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix links to repositories in /user/setting/repos
somehow the links gained a spurious $ in the links.
Signed-off-by: Andrew Thornton <art27@cantab.net>
* And fix#13359
Signed-off-by: Andrew Thornton <art27@cantab.net>
An extension to #13444 - where we now ensure that comment reaction failures do not cause migrations failure
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Remove obsolete change of email on profile page
The change email on the account profile page is out-of-date
and unnecessary.
Changing email should be done using the account page.
Fix#13336
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
* Migrating reactions is just not that important
A failure during migrating reactions should not cause failure of
migration.
Signed-off-by: Andrew Thornton <art27@cantab.net>
* When checking issue reactions check the correct permission
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: zeripath <art27@cantab.net>
* Fix Storage mapping (#13297)
Backport #13297
This PR fixes several bugs in setting storage
* The default STORAGE_TYPE should be the provided type.
* The Storage config should be passed in to NewStorage as a pointer - otherwise the Mappable interface function MapTo will not be found
* There was a bug in the MapTo function.
Fix#13286
Signed-off-by: Andrew Thornton <art27@cantab.net>
* add missing changes from backport #13164
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Store task errors following migrations and display them
When migrate tasks fail store the error in the task table
and ensure that they show on the status page.
Fix#13242
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update web_src/js/index.js
* Hide the failed first
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: zeripath <art27@cantab.net>
- Fix various white borders
- Tweak basic button style to have more contrast
- Add more contrast to hover styles
- Invert Matrix webhook icon
May backport to 1.13.
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
Backport #13249
* Fix initial commit page
Unfortunately as a result of properly fixing ParsePatch the hack that
used git show <initial_commit_id> to get the diff for this failed.
This PR fixes this using the "super-secret" empty tree ref to make the
diff against.
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Also fix#13248
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update services/gitdiff/gitdiff.go
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: 6543 <6543@obermui.de>
* Fix error in diff html rendering (#13191)
* Fix error in diff html rendering
Was missing an optional whitespace check in regex. Also noticed a rare case where diff.Type == Equal would be empty and thus get a newline attached. Fixed that too.
Fixes#13177
* Update services/gitdiff/gitdiff.go
Co-authored-by: zeripath <art27@cantab.net>
* Update gitdiff_test.go
* fmt
Co-authored-by: zeripath <art27@cantab.net>
* Add better error checking for inline html diff code (#13239)
* Add better error checking for inline html diff code
A better fix for #13191 which cleans up this code a bit and adds basic checking which should avoid writing broken HTML in future situations.
* Update gitdiff_test.go
* better regex
Co-authored-by: zeripath <art27@cantab.net>
* Return the full rejection message and errors in flash errors (#13221)
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update routers/repo/pull.go
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
- Style search dropdown
- Fix radio buttons and tweak checkboxes
- Add styling for error form elements
- Make borders brighter and focus more apparent
- Adjust comment box border color to match
Fixes: https://github.com/go-gitea/gitea/pull/12491
Co-authored-by: silverwind <me@silverwind.io>
Unfortunately there was a mistake in #13164 which fails to handle
os.PathError wrapping an os.ErrNotExist
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: zeripath <art27@cantab.net>
* Fix diff skipping lines
Backport #13154
ParsePatch previously just skipped all lines that start with "+++ " or "--- "
and makes no attempt to see these lines in context.
This PR rewrites ParsePatch to pay attention to context and position
within a patch, ensuring that --- and +++ are only skipped if
appropriate.
This PR also fixes several issues with incomplete files.
Fix https://codeberg.org/Codeberg/Community/issues/308Fix#13153
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add testcase
Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix comment
* simplify error handling
Signed-off-by: Andrew Thornton <art27@cantab.net>
* never return io.EOF
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Afaik, adding these lines does nothing unless the file(s) are present. Having them in let's admins supply certs instead of relying on TOFU.
Co-authored-by: zeripath <art27@cantab.net>
* Avatar support minio
* Support repo avatar minio storage
* Add missing migration
* Fix bug
* Fix test
* Add test for minio store type on avatars and repo avatars; Add documents
* Fix bug
* Fix bug
* Add back missed avatar link method
* refactor codes
* Simplify the codes
* Code improvements
* Fix lint
* Fix test mysql
* Fix test mysql
* Fix test mysql
* Fix settings
* Fix test
* fix test
* Fix bug