summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Unify and simplify TrN for i18n (#18141)wxiaoguang2022-01-0219-136/+148
| | | | | Refer: https://github.com/go-gitea/gitea/pull/18135#issuecomment-1003246099 Now we have a unique and simple `TrN`, and make the fix of PR #18135 also use the better `TrN` logic.
* Use correct user when determining max repo limits for error messages (#18153)Gusted2022-01-023-3/+3
| | | - Use the correct user(`owner` instead of `ctx.User`) to get the maxCreationLimit.
* Add singuliere to MAINTAINERS (#18148)singuliere2022-01-021-0/+1
| | | Signed-off-by: singuliere <singuliere@autistici.org>
* [skip ci] Updated licenses and gitignoresGiteaBot2022-01-026-1/+105
|
* Add API to get issue/pull comments and events (timeline) (#17403)qwerty2872022-01-019-0/+577
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add API to get issue/pull comments and events (timeline) Adds an API to get both comments and events in one endpoint with all required data. Closes go-gitea/gitea#13250 * Fix swagger * Don't show code comments (use review api instead) * fmt * Fix comment * Time -> TrackedTime * Use var directly * Add logger * Fix lint * Fix test * Add comments * fmt * [test] get issue directly by ID * Update test * Add description for changed refs * Fix build issues + lint * Fix build * Use string enums * Update swagger * Support `page` and `limit` params * fmt + swagger * Use global slices Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Upgrade certmagic from v0.14.1 to v0.15.2 (#18138)Lunny Xiao2022-01-010-0/+0
|
* Upgrade certmagic from v0.14.1 to v0.15.2 (#18138)Lunny Xiao2022-01-0120-142/+294
|
* Allow admin to associate missing LFS objects for repositories (#18143)wxiaoguang2022-01-013-26/+57
| | | | | | | This PR reworked the Find pointer files feature in Settings -> LFS page. When a LFS object is missing from database but exists in LFS content store, admin can associate it to the repository by clicking the Associate button. This PR is not perfect (because the LFS module itself should be improved too), it's just a nice-to-have feature to help users recover their LFS repositories (eg: database was lost / table was truncated)
* Upgrade bleve from v2.0.6 to v2.3.0 (#18132)Lunny Xiao2022-01-0170-639/+1262
|
* tests: s/GITEA_UNIT_TESTS_VERBOSE/GITEA_UNIT_TESTS_LOG_SQL/ (#18142)singuliere2022-01-012-2/+2
| | | | | | | | | | | The GITEA_UNIT_TESTS_VERBOSE variable is an undocumented variable introduced in 2017 (see 1028ef2defd94a64f2433b07fe5d93681864cebb) whose sole purpose has been to log SQL statements when running unit tests. It is renamed for clarity and a warning is displayed for backward compatibility for people and scripts that know about it. The documentation is updated to reflect this change.
* services/repository: fix ListUnadoptedRepositories incorrect total count ↵singuliere2022-01-012-110/+156
| | | | | | | | | | | | | | | | (#17865) The total count returned by ListUnadoptedRepositories is incorrectly calculated. The code snippet within ListUnadoptedRepositories used to verify unadopted repositories is repeated three times in the function. It is moved in the checkUnadoptedRepositories function and a unit test is added to verify it works as expected. A unit test is added to verify the total count returned by ListUnadoptedRepositories is as expected. Signed-off-by: singuliere <singuliere@autistici.org>
* Improve document for developers: Windows CGO, unit test option (#18140)wxiaoguang2021-12-311-2/+12
|
* Reset the conflicted files list in testpatch (#18139)zeripath2021-12-311-0/+1
| | | | | | | | Although #18004 will seriously reduce the likelihood of finding conflicts in the first place - one bug was introduced whereby the conflicted files status was not being reset properly. This leads to conflicted PRs remaining conflicted when the conflict has been resolved. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Use correct translation key (#18135)Gusted2021-12-313-3/+22
| | | | | - Resolves #18122 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2021-12-311-0/+15
|
* [Frontport] Changelog v1.15.9 (#18136)65432021-12-302-1/+19
| | | | | * Changelog ## [1.15.9](https://github.com/go-gitea/gitea/releases/tag/v1.15.9) - 2021-12-30 * docs: bump version
* Fix wrong redirect on org labels (#18128)KN4CK3R2021-12-301-1/+1
|
* Fix performance regression when user has many organization (#18125)Lunny Xiao2021-12-301-12/+18
|
* docs: add various ways to install from package (#18120)Tony2021-12-301-7/+78
| | | | | | zh-cn Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Removed unused method. (#18129)KN4CK3R2021-12-301-36/+0
| | | Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2021-12-3022-53/+8
|
* Removed unused endpoint. (#18127)KN4CK3R2021-12-292-15/+0
|
* Use conditions but not repo ids as query condition (#16839)Lunny Xiao2021-12-2911-423/+397
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use conditions but not repo ids as query condition * Improve the performance of pulls/issue * Remove duplicated code * fix lint * Fix bug * Fix stats * More fixes * Fix build * Fix lint * Fix test * Fix build * Adjust the logic * Merge * Fix conflicts * improve the performance * Add comments for the query conditions functions * Some improvements
* Set HeadCommit when creating tags. (#18116)KN4CK3R2021-12-292-2/+15
| | | Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix: unstable sort skips/duplicates issues across pages (#18094)DuckDuckWhale2021-12-291-11/+19
| | | | | When viewing issues in sorted order, some issues are duplicated across pages and some are missing. This is caused by the lack of tie-breakers in database queries, making pagination inconsistent.
* Handle invalid issues (#18111)Gusted2021-12-286-23/+45
| | | | | | | | | | | | | | | | | | | | | | | * Handle invalid issues - When you hover over a issue reference, and the issue doesn't exist, it will just hang on the loading animation. - This patch fixes that by showing them the pop-up with a "Error occured" message. * Add I18N * refactor * fix comment for lint * fix unit test for i18n * fix unit test for i18n * add comments Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2021-12-272-1/+26
|
* Fix documents for Windows development (#18109)wxiaoguang2021-12-261-4/+6
| | | * Fix documents for Windows development
* Enable linter [rule.modifies-value-receiver] and refactor RoleDescriptor ↵Gusted2021-12-262-2/+2
| | | | (#18093)
* doc: clarify INSTALL_LOCK behavior (#17945)Rolf Kaiser2021-12-261-1/+1
|
* [skip ci] Updated translations via CrowdinGiteaBot2021-12-2620-132/+50
|
* Add issue hyperlinks in the webhook of wechatwork (#18102)zjjhot2021-12-251-2/+2
| | | Co-authored-by: zjj <2031381130@qq.com>
* Fix a navbar UI bug in Safari (#18092)wxiaoguang2021-12-242-1/+3
|
* Instead of using routerCtx just escape the url before routing (#18086)zeripath2021-12-254-18/+4
| | | | | | | | | | | | | | | | A consequence of forcibly setting the RoutePath to the escaped url is that the auto routing to endpoints without terminal slashes fails (Causing #18060.) This failure raises the possibility that forcibly setting the RoutePath causes other unexpected behaviors too. Therefore, instead we should simply pre-escape the URL in the process registering handler. Then the request URL will be properly escaped for all the following calls. Fix #17938 Fix #18060 Replace #18062 Replace #17997 Signed-off-by: Andrew Thornton <art27@cantab.net>
* When the git repository on storage is changed, the repository modal should ↵wxiaoguang2021-12-241-2/+24
| | | | | | | | | | also be updated (#18088) User would keep seeing an empty repo if: * An error occurs during the first git pushing/receiving * A user replaces the Gitea's empty repository manually Fix: when a user is viewing the repository web page, if the repoModal.IsEmpty is true, we check the git repository again to detect whether it is really empty. However: the IsEmpty flag is deeply broken and should be removed. For example it's possible for a repository to be non-empty by that flag but still 500 because there are no branches - only tags -or the default branch is non-extant as it has been 0-pushed.
* - name: new parameter in CreateForkOption to give the forked repository (#18066)Aravinth Manivannan2021-12-243-2/+25
| | | | | | | | | | | a custom name, intended to be used when there's a name conflict - When a fork request results in a name conflict, HTTP 409: Conflict is returned instead of 500 - API documentation for the above mentioned changes Signed-off-by: realaravinth <realaravinth@batsense.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* When attempting to subscribe other user to issue report why access denied ↵zeripath2021-12-241-1/+2
| | | | | | | | | (#18091) Fix #18090 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Improve interface when comparing a branch which has created a pull request ↵Lunny Xiao2021-12-244-2/+30
| | | | | | | | (#17911) * Improve interface when comparing a branch which has created a pull request * Take the note back
* Add API to manage repo tranfers (#17963)qwerty2872021-12-236-0/+322
|
* Fix various typos of software names (#18083)qwerty2872021-12-2428-92/+92
| | | | | | | | | | | | | | | | * `git` -> `Git` * `Github` and `github` -> `GitHub` * `crowdin` -> `Crowdin` * `git-lfs` -> `Git LFS` * `githooks`, `git hooks`, `git-hooks` -> `Git Hooks` * `discord` -> `Discord` * `2fa` -> `2FA` * `gitlab` and `Gitlab` -> `GitLab` * `web hook` -> `webhook` * `linux` -> `Linux` * `sqlite` -> `SQLite` * `MYSQL` and `mysql` -> `MySQL` * rename refs to `master` branch -> `main` * Fix English grammar
* Prevent NPE if gitea uploader fails to open url (#18080)zeripath2021-12-231-1/+4
| | | | | | | | | If http.Get() returns an error return nil and err before attempting to use the broken file. Thanks to walker xiong for spotting this bug. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Do not read or write git reference files directly (#18079)zeripath2021-12-236-45/+32
| | | | | | | | | | Git will and can pack references into packfiles and therefore if you write/read the files directly you will get false results. Instead you should use update-ref and show-ref. To that end I have created three new functions in git/repo_commit.go that will do this correctly. Related #17191 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Migrated Repository will show modifications when possible (#17191)99rgosse2021-12-235-3/+188
| | | | * Read patches to get history
* Quote references to the user table in consistency checks (#18072)zeripath2021-12-221-2/+2
| | | | | | | | Although #17487 ensured that the table was quoted in the join it missed that the query part of the check also needed to be quoted. Fix #17485 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Only create pprof files for gitea serv if explicitly asked for (#18068)zeripath2021-12-221-1/+1
|
* Add NotFound handler (#18062)zeripath2021-12-223-1/+21
| | | | | | | | | | | | | PR #17997 means that urls with terminal '/' are no longer immediately mapped to the url without a terminal slash. However, it has revealed that the NotFound handler appears to have been lost. This PR adds back in a NotFound handler that simply redirects to a path without the terminal slash or runs the NotFound handler. Fix #18060 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add API to get file commit history (#17652)qwerty2872021-12-223-25/+80
| | | | | | Adds an API endpoint `api/v1/repos/{owner}/{repo}/git/history/{filepath}` to get the commits affecting the given file or directory. Closes https://github.com/go-gitea/gitea/issues/16206 and closes https://github.com/go-gitea/gitea/issues/16703
* [skip ci] Updated translations via CrowdinGiteaBot2021-12-226-3/+42
|
* Add List-Unsubscribe header (#17804)mscherer2021-12-212-1/+2
| | | | | | Fixes #13283 Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Avoid running go vet twice (#18059)Gusted2021-12-211-1/+0
|