summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Whitespace in commits (#14650)vnkmpf2021-02-136-32/+41
| | | | | | | | | * Add whitespace to commit view * Add whitespace to /compare/a...b * Move repeated whitespaceFlags to gitdiff * Add whitespace for wiki pages
* Show Gitea version in swagger (#14654)techknowlogick2021-02-122-2/+2
| | | | | Show Gitea version in swagger Co-authored-by: 6543 <6543@obermui.de>
* Add v171 (addSortingColToProjectBoard) migration for #14634 (#14652)65432021-02-123-1/+25
| | | | | | | * add v171 Migration for #14634 * NOT NULL Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix truncated organization names (#14655)vnkmpf2021-02-1212-65/+71
| | | | | | | * Fix truncated organization names Previous ellipsis implementation hid vertical overflow - image + descent line of letters. Organization visibility in select on dashboard was not always visible. This commit extracts classes which don't make collisions with other items on page.
* Fix PATCH /repos/{owner}/{repo} panic (#14637)Anton Khimich2021-02-111-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix a runtime error when modifying a repository through API call Using the `PATCH /repos/{owner}/{repo}` endpoint and attempting to modify `default_branch` on an empty repository will cause a panic. This commit adds a check for a nil pointer before attempting to dereference it. * Apply suggestions from code review * Apply suggestions from code review * Ensure that the git repository is loaded If you change the default branch for a repository you must change it in git too. Therefore you must open the repository before changing the default branch. Signed-off-by: Andrew Thornton <art27@cantab.net> * Allow empty repos to have their default branches changed Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Anton Khimich <anton.khimicha@mail.utoronto.ca> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Andrew Thornton <art27@cantab.net>
* Make fileheader sticky in diffs (#14616)vnkmpf2021-02-114-2/+56
| | | | | | | | | | | | | | | | | | | | | * Make fileheader sticky #12552 * Remove sticky filenames when width is 480px or less On mobile phone sticky filename is hidden due to the combination of many possible widths and lengths. * Fix text color for .markdown-info * Fix visual of sticky diff box on 480px or less - Hide arrow for select buttons. - Fix changes, additions and deletions. With flexbox they look very broken. This commit hides some words to, so the result is: "123 changed files 987 additions 456 deletions" - center text in buttons Co-authored-by: zeripath <art27@cantab.net>
* Added option to disable webhooks (#13176)Paweł Bogusławski2021-02-1112-25/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Added option to disable web hooks This mod introduces DISABLE_WEB_HOOKS parameter in [security] section of app.ini (by default set to false). If set to true it disables web hooks feature. Any existing undelivered web hook tasks will be cancelled. Any existing web hook definitions will be left untouched in db but its delivery tasks will be ignored. Author-Change-Id: IB#1105130 * Webhook spelling fixed Webhook spelling fixed. Fixes: 07df6614dc84cdd2e9f39c57577fa1062bd70012 Related: https://github.com/go-gitea/gitea/pull/13176#pullrequestreview-510868421 Author-Change-Id: IB#1105174 * Parameter description fixed Parameter description fixed. Fixes: 07df6614dc84cdd2e9f39c57577fa1062bd70012 Related: https://github.com/go-gitea/gitea/pull/13176#pullrequestreview-514086107 Author-Change-Id: IB#1105174
* Add dismiss review feature (#12674)a10121127962021-02-1136-39/+593
| | | | | | | | | | | | | | | * Add dismiss review feature refs: https://github.blog/2016-10-12-dismissing-reviews-on-pull-requests/ https://developer.github.com/v3/pulls/reviews/#dismiss-a-review-for-a-pull-request * change modal ui and error message * Add unDismissReview api Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Sort / Move project boards (#14634)Romain2021-02-116-16/+73
| | | Sort Project board (#14533)
* [Vendor] Update go-redis to v8.5.0 (#13749)65432021-02-10139-4958/+16110
| | | | | | | | | | | | | | | | | | | | | * Update go-redis to v8.4.0 * github.com/go-redis/redis/v8 v8.4.0 -> v8.5.0 * Apply suggestions from code review Co-authored-by: zeripath <art27@cantab.net> * TODO * Use the Queue termination channel as the default context for pushes Signed-off-by: Andrew Thornton <art27@cantab.net> * missed one Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
* Allow org labels to be set with issue templates (#14593)zeripath2021-02-101-1/+8
| | | | | | Fix #13688 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Do not assume all 40 char strings are SHA1s (#14624)zeripath2021-02-101-11/+15
| | | | | | | | | | GetCommit() assumes that all 40 char strings are SHA1s. This leads to an error if you try to do a PR on a branch which is 40 characters long. This PR attempts the SHA first - and if it fails will switch to using rev-parse. Fix #14470 Signed-off-by: Andrew Thornton <art27@cantab.net>
* HasPreviousCommit causes recursive load of commits unnecessarily (#14598)zeripath2021-02-102-13/+50
| | | | | | | | This PR improves HasPreviousCommit to prevent the automatic and recursive loading of previous commits using git merge-base --is-ancestor and git rev-list Fix #13684 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Improve the comment on comment type (#14609)Lunny Xiao2021-02-101-32/+32
|
* Prevent adding nil label to .AddedLabels or .RemovedLabels (#14623)zeripath2021-02-104-5/+39
| | | | | | | | | | | | | | | | | | * Prevent adding nil label to .AddedLabels or .RemovedLabels There are possibly a few old databases out there with malmigrated data that can cause panics with empty labels being migrated. This PR adds a few tests to prevent nil labels being added. Fix #14466 Signed-off-by: Andrew Thornton <art27@cantab.net> * Add doctor command to remove the broken label comments Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Ensure memcache TTL cannot be over 30 days (#14592)zeripath2021-02-097-10/+29
| | | | | | | | | | Memcached TTL cannot be > 30 days and if it is attempted the TTL is interpreted as a unix timestamp. This PR ensures that the TTL is switched to a unix timestamp in those cases. Fix #14571 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Truncated organisations name #14583 (#14615)vnkmpf2021-02-0911-28/+39
| | | | | - truncate to max length 40 - add CSS ellipsis
* Add support for ref parameter to get raw file API (#14602)zeripath2021-02-092-1/+27
| | | | | | | | Fix #14597 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fixed irritating error message related to go version (#14611)uli-heller2021-02-081-1/+1
| | | | | | | | | I do have go-1.13.8 installed and get the error message ``` Gitea requires Go 1.13 or greater to build. You can get it at https://golang.org/dl/ ``` I do thing that Go 1.14 or greater is actually required
* Use OldRef instead of CommitSHA for DeleteBranch comments (#14604)zeripath2021-02-084-6/+22
| | | | | | | | Fix #14545 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add information on how to build statically (#14594)zeripath2021-02-081-0/+8
| | | | | | | Fix #14576 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2021-02-081-0/+14
|
* Exclude the current dump file from the dump (#14606)zeripath2021-02-082-42/+25
| | | | | | | | | | | | | | | | | | | * Exclude the current dump file from the dump Always prevent the current file from being added to the dump. Fix #13618 Signed-off-by: Andrew Thornton <art27@cantab.net> * Add skip custom directory option Signed-off-by: Andrew Thornton <art27@cantab.net> * placate lint Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Remove spurious DataAsync Error logging (#14599)zeripath2021-02-071-3/+0
| | | | | | | Breaking the pipe is a valid way of killing a piped command and any error from a broken cat-file batch command should be passed back up to the writer any way therefore specifically logging it is unnecessary. Signed-off-by: Andrew Thornton <art27@cantab.net>
* [API] Add delete release by tag & fix unreleased inconsistency (#14563)65432021-02-076-36/+157
| | | | | | | | | * DeleteReleaseByTag delete release not git tags * Add api to delete tag (without release) * fix & extend tests * fix swagger doc
* Fix rate limit bug when downloading assets on migrating from github (#14564)Lunny Xiao2021-02-071-0/+5
|
* [API] Add affected files of commits to commit struct (#14579)65432021-02-074-11/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | * Add files affected by a commit to gitea API -- similar to github * Add files affected by a commit to gitea API * Fix stupid error * Fix other stupid typo * Generate swagger tmpl * Comply with convert to git commit refacto * update swagger docs * extend test * format code * Update integrations/api_repo_git_commits_test.go * Update modules/convert/git_commit.go Co-authored-by: Laurent Cahour <laurent.cahour@dont-nod.com> Co-authored-by: zeripath <art27@cantab.net>
* [skip ci] Updated licenses and gitignoresGiteaBot2021-02-071-0/+50
|
* Fix locale init (#14582)John Olheiser2021-02-051-2/+9
| | | | | | | just log if lang is already loaded since we can not reload it Co-authored-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
* Add Content-Length header to HEAD requests (#14542)Farid AYOUJIL2021-02-052-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add Content-Length header to HEAD requests This change adds the header Content-Length to HEAD HTTP requests. The previous behaviour was blocking some Windows executables (i.e bitsadmin.exe) from downloading files hosted in Gitea. This along with PR #14541, makes the web server compliant with HTTP RFC 2616 which states "The methods GET and HEAD MUST be supported by all general-purpose servers" and "The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response." This should also respond to issues #8030 and #14532. * This change adds the header Content-Length to HEAD HTTP requests Pass the Size of the content as a parameter to ServeData() instead of calculating it using ioutil.ReadAll(reader) --> this call is dangerous and can result in a denial of service. * Add Content-Length header to HEAD requests Quick fix for imported dependency not used. * Check if size is positiv int ... Co-authored-by: zeripath <art27@cantab.net>
* Honor REGISTER_MANUAL_CONFIRM when doing openid registration (#14548)Michel Ganguin2021-02-051-1/+1
| | | | | REGISTER_MANUAL_CONFIRM is not honored when doing performing an openid registration. The new account is directly accessible. With this patch, the manual confirm flag gets honored in the same way as a "normal" registration.
* Fix lfs file viewer (#14568)Lunny Xiao2021-02-051-21/+16
|
* Fix typo in generate-emoji.go (#14570)Ikko Ashimine2021-02-041-1/+1
| | | | | modifer -> modifier Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix bug about ListOptions and stars/watchers pagnation (#14556)Lunny Xiao2021-02-043-7/+11
| | | | | | | * Fix bug about ListOptions and stars/watchers pagnation * fix unit test Co-authored-by: 6543 <6543@obermui.de>
* Fix gpg key deletion (#14561)Anton Khimich2021-02-042-1/+15
| | | | | | | | | | | | | | | | | | | * Fix GPG key deletion when user is deleted Per #14531, deleting a user account will delete the user's GPG keys from the `gpg_key` table but not from `gpg_key_import`, which causes an error when creating an account with the same email and attempting to re-add the same key. This commit deletes all entries from `gpg_key_import` that match any GPG key IDs belonging to the user. * Format added code in models/user.go * Create a new function for listing GPG keys and apply it Create a new function `listGPGKeys` and replace a previous use of `ListGPGKeys`. Thanks to @6543 for the patch. Co-authored-by: Anton Khimich <anton.khimicha@mail.utoronto.ca> Co-authored-by: 6543 <6543@obermui.de>
* [API] GetRelease by tag only return release (#14397)Cameron Braid2021-02-042-4/+8
| | | | | get release by tag should filter out tag releases to be consistent with list releases and get by id Co-authored-by: 6543 <6543@obermui.de>
* Reduce data races (#14549)65432021-02-033-6/+18
| | | | | | | | | | | * Add race conditions into test * Fix Race in GetManager() * DataAsync() use error chan * just log no chan * finish
* [API] Add pagination to ListBranches (#14524)65432021-02-0320-87/+239
| | | | | | | | | | | | | | | | | | * make PaginateUserSlice generic -> PaginateSlice * Add pagination to ListBranches * add skip, limit to Repository.GetBranches() * Move routers/api/v1/utils/utils PaginateSlice -> modules/util/paginate.go * repo_module.GetBranches paginate * fix & rename & more logging * better description Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: a1012112796 <1012112796@qq.com>
* docs: update installation with-docker zh-cn (#14554)Howie Zhao2021-02-031-14/+313
|
* [Docs] Clone filters (#14555)Bagas Sanjaya2021-02-031-0/+65
| | | | | In summary: set uploadpack.allowfilter Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
* update docs to show latest stable version (1.13.2) (#14550)techknowlogick2021-02-031-1/+1
|
* Adding Chi's GetHead middleware (#14541)Farid AYOUJIL2021-02-021-1/+2
| | | | | | | | Before moving to Chi, HEAD requests were automatically answered by GET handlers (SetAutoHead(true) from macaron was used). This Change will restore the previous behaviour. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Changelog v1.13.2 (#14535) (#14543)65432021-02-021-0/+32
|
* [skip ci] Updated translations via CrowdinGiteaBot2021-02-012-0/+11
|
* [API] List, Check, Add & delete endpoints for repository teams (#13630)65432021-02-014-0/+483
| | | | | | | * List, Check, Add & delete endpoints for repository teams * return units on single team responce too * Add Tests
* [skip ci] Updated translations via CrowdinGiteaBot2021-02-012-1/+13
|
* rm redirect (#14534)65432021-02-013-7/+4
|
* Upgrade 'css-minimizer-webpack-plugin' to the latest version (#14527)Atilla Lonny2021-01-301-1/+1
| | | This patch resolves #14520
* Set the name Mapper in migrations (#14526)zeripath2021-01-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | Migrations currently uses the default Xorm mapper which is not the same as the mapper Gitea actually uses. This means that there is a difference between the struct parsing and mapping to database tables in migrations as compared to normal Sync2. This was the cause for the catastrophic problem in v168 - untagged fields are not mapped in the same way in migrations as compared to outside of migrations. This is also likely the cause of some weird subtle failures in other migrations as any untagged field may not be being mapped exactly the same way. This PR suggests that we ensure that the mapper is set at the start of the migrations code - but also enforces a strict clean mapper between each migration. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Internal ssh server respect Ciphers, MACs and KeyExchanges settings (#14523)Stefan2021-01-301-3/+7
|