aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Tune UI alignment for nav bar notification icon, avatar image, issue label ↵wxiaoguang2021-10-262-0/+3
| | | | (#17438)
* Upgrade go-github to v39 (#17437)Lunny Xiao2021-10-26126-169/+2563
|
* Prevent panic in serv.go with Deploy Keys (#17434)zeripath2021-10-261-1/+1
| | | | | | | | Unfortunately there was a regression in #17373 which missed that the user is not for deploy keys. This leads to a panic when pushing with deploy keys. Fix #17412 Signed-off-by: Andrew Thornton <art27@cantab.net>
* chmod executables when copying to the docker (#17423)zeripath2021-10-252-1/+4
| | | | | | | | | Run chmod on the executables and the entrypoint when copying them to the docker in dockerfile. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Norwin <noerw@users.noreply.github.com> Co-authored-by: delvh <dev.lh@web.de>
* Upgrade webpack to 5.59.1 to resolve the `waitFor` bug with `watch-frontend` ↵wxiaoguang2021-10-252-8/+8
| | | | | (#17428) Webpack < 5.59 has a bug, which makes watch-frontend fail when editing .less files.
* fix markdown checkbox rendering (#17425)wxiaoguang2021-10-251-0/+6
|
* In many cases user avatar link should be an absolute URL with http host (#17420)wxiaoguang2021-10-253-3/+9
|
* Add API to get/edit wiki (#17278)qwerty2872021-10-258-1/+1336
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add API to get/edit wiki * Add swagger docs, various improvements * fmt * Fix lint and rm comment * Add page parameter * Add pagination to pages * Add tests * fmt * Update func names * Update error handling * Update type name * Fix lint * Don't delete Home * Update func name * Update routers/api/v1/repo/wiki.go Co-authored-by: delvh <dev.lh@web.de> * Remove unnecessary check * Fix lint * Use English strings * Update integrations/api_wiki_test.go Co-authored-by: delvh <dev.lh@web.de> * Update func and test names * Remove unsed check and avoid duplicated error reports * Improve error handling * Return after error * Document 404 error * Update swagger * Fix lint * Apply suggestions from code review Co-authored-by: delvh <dev.lh@web.de> * Document file encoding * fmt * Apply suggestions * Use convert * Fix integration test * simplify permissions * unify duplicate key Title/Name * improve types & return UTC timestamps * improve types pt.2 - add WikiPageMetaData.LastCommit - add WikiPageMetaData.HTMLURL - replace WikiPageMetaData.Updated with .LastCommit.Committer.Created also delete convert.ToWikiPage(), as it received too many arguments and only had one callsite anyway. sorry for bad advice earlier 🙃 * WikiPage.Content is base64 encoded * simplify error handling in wikiContentsByName() * update swagger * fix & DRY findWikiRepoCommit() error handling ListWikiPages() previously wrote error twice when repo wiki didn't exist * rename Content -> ContentBase64 * Fix test * Fix tests * Update var name * suburl -> sub_url Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Norwin <git@nroo.de> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2021-10-251-0/+6
|
* Fix CSV render error (#17406)KN4CK3R2021-10-252-22/+21
| | | | | | | | | | | closed #17378 Both errors from #17378 were caused by #15175. Problem 1 (error with added file): `ToUTF8WithFallbackReader` creates a `MultiReader` from a `byte[2048]` and the remaining reader. `CreateReaderAndGuessDelimiter` tries to read 10000 bytes from this reader but only gets 2048 because that's the first reader in the `MultiReader`. Then the `if size < 1e4` thinks the input is at EOF and just returns that. Problem 2 (error with changed file): The blob reader gets defer closed. That was fine because the old version reads the whole file into memory. Now with the streaming version the close needs to defer after the method.
* Read expected buffer size (#17409)KN4CK3R2021-10-2411-29/+51
| | | | | | * Read expected buffer size. * Changed name.
* Add HAProxy Config to reverse-proxies.en-us.md (#17407)Kane2021-10-241-0/+47
| | | | | | | * Update reverse-proxies.en-us.md Addition of HAProxy * Update reverse-proxies.en-us.md
* [skip ci] Updated translations via CrowdinGiteaBot2021-10-241-1/+7
|
* Fix issue content history problems, improve UI (#17404)wxiaoguang2021-10-230-0/+0
| | | | | * Improve: make diff result better, make the HTML element fit the full height in the content history diff dialog * Bug fix: when edit the main issue, the poster is wrongly set to the issue poster
* Fix issue content history problems, improve UI (#17404)wxiaoguang2021-10-234-8/+11
| | | | | * Improve: make diff result better, make the HTML element fit the full height in the content history diff dialog * Bug fix: when edit the main issue, the poster is wrongly set to the issue poster
* Fix issue markdown bugs (#17411)wxiaoguang2021-10-233-2/+9
| | | | * Bug fix: render Markdown http://AppURL/org/repo/issues/4?a=1&b=2#comment-123 test to HTML correctly, close #17394 * Bug fix: fix the positions of checkboxes in rendered HTML, close #17395
* [skip ci] Updated translations via CrowdinGiteaBot2021-10-238-6/+14
|
* Remove deprecated `extendDefaultPlugins` method of svgo (#17399)Mashiro2021-10-221-3/+4
|
* Frontport Changelog 1.15.5 (#17392) (#17401)zeripath2021-10-222-1/+18
|
* Fix context popup error (#17398)wxiaoguang2021-10-223-2/+29
| | | * Fix context popup error
* Add groups scope/claim to OIDC/OAuth2 Provider (#17367)Nico Schieder2021-10-223-7/+57
| | | | | | | | | | | * Add groups scope/claim to OICD/OAuth2 Add support for groups claim as part of the OIDC/OAuth2 flow. Groups is a list of "org" and "org:team" strings to allow clients to authorize based on the groups a user is part of. Signed-off-by: Nico Schieder <code@nico-schieder.de> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Stop sanitizing full name in API (#17396)zeripath2021-10-221-2/+1
| | | | | | | | | | The API convert.toUser function makes the incorrect assumption that full names could be rendered as is without being escaped. It therefore runs the names through markup.Sanitize which leads to a double escape of user full names. This pr stops this. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2021-10-222-0/+38
|
* Re-separate the color translation strings (#17390)zeripath2021-10-214-5/+7
| | | | | Fix #17384 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix the click behavior for <tr> and <td> with [data-href] (#17388)wxiaoguang2021-10-211-8/+13
|
* Refactor update checker to use AppState (#17387)wxiaoguang2021-10-216-61/+48
| | | | | | | | We have the `AppState` module now, it can store app related data easily. We do not need to create separate tables for each feature. So the update checker can use `AppState` instead of a one-row dedicate table. And the code of update checker is moved from `models` to `modules`.
* Fix SVG side by side comparison link (#17375)Mario Lubenka2021-10-212-7/+6
| | | | | | | | | | | | | | | | | * Remove swipe-bar z-index Fixes position of swipe-bar so it does not overlay other UI components when scrolling. Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Unique names for image tabs in pull request Define unique names for image tabs in pull requests, in order to toggle tabs correctly when multiple are displayed on one page. Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix history count failure (#17351)Lunny Xiao2021-10-211-1/+1
| | | Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Sync gitea app path for git hooks and authorized keys when starting (#17335)wxiaoguang2021-10-2111-55/+338
| | | | | | | | | | | Gitea writes its own AppPath into git hook scripts. If Gitea's AppPath changes, then the git push will fail. This PR: * Introduce an AppState module, it can persist app states into database * During GlobalInit, Gitea will check if the current AppPath is the same as last one. If they don't match, Gitea will sync git hooks. * Refactor some code to make them more clear. * Also, "Detect if gitea binary's name changed" #11341 is related, we call models.RewriteAllPublicKeys to update ssh authorized_keys file
* Handle broken references in mirror sync (#17013)zeripath2021-10-211-13/+105
| | | | | | | | | | | * Handle broken references in mirror sync If there are broken references during a mirror attempt to fix using `git remote prune`. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Frontend refactor, PascalCase to camelCase, remove unused code (#17365)wxiaoguang2021-10-2142-182/+162
| | | | | * Frontend refactor, PascalCase to camelCase, remove unused code * fix
* Fix heatmap test (#17381)Lunny Xiao2021-10-211-0/+6
|
* [skip ci] Updated translations via CrowdinGiteaBot2021-10-213-0/+33
|
* Ensure correct SSH permissions check for private and restricted users (#17370)zeripath2021-10-201-2/+7
| | | | | | | | | | | | Repositories owned by private users and organisations and pulls by restricted users need to have permissions checked. Previously Serv would simply assumed that if the user could log in and the repository was not private then it would be visible. Fix #17364 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Upgrade Bluemonday to v1.0.16 (#17372)zeripath2021-10-2014-24/+103
| | | | | | | Upgrade Bluemonday to latest version Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Offer rsa-sha2-512 and rsa-sha2-256 algorithms in internal SSH (#17281)zeripath2021-10-201-0/+56
| | | | | | | | | | | | | | | | | | * Offer rsa-sha2-512 and rsa-sha2-256 algorithms in internal SSH There is a subtle bug in the SSH library x/crypto/ssh which makes the incorrect assumption that the public key type is the same as the signature algorithm type. This means that only ssh-rsa signatures are offered by default. This PR adds a workaround around this problem. Fix #17175 Signed-off-by: Andrew Thornton <art27@cantab.net> * as per review Signed-off-by: Andrew Thornton <art27@cantab.net>
* Prevent NPE in CSV diff rendering when column removed (#17018)Richard Mahn2021-10-207-136/+351
| | | | | | | | | | | | | | | | Fixes #16837 if a column is deleted. We were clobbering the columns that were added by looping through the aline (base) and then when bline (head) was looped through, it clobbered what was in the "cells" array that is show in the diff, and then left a nil cell because nothing was shifted. This fix properly shifts the cells, and properly puts the b cell either at its location or after, according to what the aline placed in the cells. This includes test, adding a new test function since adding/removing cells works best with three columns, not two, which results in 4 columns of the resulting cells because it has a deleted column and an added column. If you try this locally, you can try those cases and others, such as adding a column. There was no need to do anything special for the rows when `aline == 0 || bline == 0` so that was removed. This allows the same code to be used for removed or added lines, with the bcell text always being the RightCell, acell text being the LeftCell. I still added the patch zeripath gave at https://github.com/go-gitea/gitea/issues/16837#issuecomment-913007382 so that just in case for some reason a cell is nil (which shouldn't happen now) it doesn't throw a 500 error, so the user can at least view the raw diff. Also fixes in the [view.go](https://github.com/go-gitea/gitea/pull/17018/files#diff-43a7f4747c7ba8bff888c9be11affaafd595fd55d27f3333840eb19df9fad393L521) file how if a CSV file is empty (either created empty or if you edit it and remove all contents) it throws a huge 500 error when you then save it (when you view the file). Since we allow creating, saving and pushing empty files, we shouldn't throw an error on an empty CSV file, but just show its empty contents. This doesn't happen if it is a Markdown file or other type of file that is empty. EDIT: Now handled in the markup/csv renderer code
* Use a variable but a function for IsProd because of a slight performance ↵Lunny Xiao2021-10-2012-22/+19
| | | | increment (#17368)
* "Copy branch name" button in pull request (#17323)Mario Lubenka2021-10-195-9/+24
| | | | | | | | | | | | | | | | | | | | | | | | * Drop data-original from clipboard data-original attribute was removed. Instead, the original value from data-content is set after success/fail message was displayed. Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * "Copy branch name" button in pull request Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Update templates/repo/issue/view_title.tmpl Co-authored-by: silverwind <me@silverwind.io> * Apply suggestions from code review Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: zeripath <art27@cantab.net>
* Rename .air.conf to .air.toml (#17360)silverwind2021-10-202-1/+1
| | | | As of https://github.com/cosmtrek/air/pull/90, the preferred file extension is .toml. The file format was always toml itself.
* Re-allow clipboard copy on non-https sites (#17118)Netduma Luke M2021-10-191-1/+32
| | | | * Re-allow clipboard copy on non-https sites * fallback clipboard functions
* Update JS dependencies (#17357)silverwind2021-10-1913-11482/+4391
| | | | | | | | | | | | | * Update JS dependencies - Upgrade to eslint 8 and add new plugin rules - Adapt to various API changes - Rebuild SVGs * fix webpack warning on license * order options alphabetically Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix dashboard repolist alignment and repolisting (#17355)zeripath2021-10-194-1/+16
| | | | | | | | | | | | | | Unfortunately #17301 broke the restriction of the dashboard repolist to the user's repos because it stopped passing in the uid for the current user. This PR restores this. There is also a weird alignment problem - not caused by that PR - where the menu items in the repolist spread over multiple lines. This PR simply reduces the padding on these items and switches the justification of the flex elements to space-evenly. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [skip ci] Updated translations via CrowdinGiteaBot2021-10-192-0/+8
|
* Disable form autofill (#17291)wxiaoguang2021-10-1913-15/+51
| | | | | | | ]* fix aria-hidden and tabindex * use {{template "base/disable_form_autofill"}} instead of {{DisableFormAutofill}} Co-authored-by: zeripath <art27@cantab.net>
* Allow mocking timeutil (#17354)John Olheiser2021-10-182-0/+22
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* docs: add permission notes to `SSH Container Passthrough` (#17347)Mashiro2021-10-181-0/+7
| | | | | | | * Update with-docker.en-us.md * Update with-docker.en-us.md Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* api: integration test for nodeinfo (#17346)techknowlogick2021-10-181-0/+31
|
* [skip ci] Updated translations via CrowdinGiteaBot2021-10-182-0/+7
|
* Use go1.16+ way of installing binaries (#17342)techknowlogick2021-10-171-6/+6
|