summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix admin user list pagination (#18957) (#18960)Otto Richter (fnetX)2022-03-012-0/+10
|
* Fix lfs management setting (#18947)Lunny Xiao2022-03-011-4/+4
|
* Backport locales from master (#18944)65432022-02-288-153/+264
| | | | | | | | | | | | | | | * update * clean * clean2 * clean2 * clean-next * cleanup * finish cleanup
* Fix login with email panic when email is not exist (#18942)Lunny Xiao2022-02-281-1/+1
| | | Co-authored-by: 6543 <6543@obermui.de>
* Adjust error for already locked db and prevent level db lock on malformed ↵zeripath2022-02-281-6/+42
| | | | | | | | | | | | | connstr (#18923) (#18938) Backport #18923 This PR adjusts the error returned when there is failure to lock the level db, and permits a connections to the same leveldb where there is a different connection string. Reference #18921 Reference #18917 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update go-org to v1.6.1 (#18932) (#18933)Gusted2022-02-272-6/+4
| | | Backport #18932
* Fix `<strong>` html in translation (#18929) (#18931)Gusted2022-02-271-2/+2
| | | Backport #18929
* Fix page and missing return on unadopted repos API (#18848) (#18927)qwerty2872022-02-275-3/+6
| | | | | | | * Fix page and missing return on unadopted repos API Page must be 1 if it's not specified and it should return after sending an internal server error. * Allow ignore pages
* Don't treat BOM escape sequence as hidden character. (#18909) (#18910)Gusted2022-02-262-5/+27
| | | | | * Don't treat BOM escape sequence as hidden character. (#18909) Backport #18909
* Allow adminstrator teams members to see other teams (#18918) (#18919)Gusted2022-02-261-0/+16
| | | Allow adminstrator teams members to see other teams (#18918)
* Correctly link URLs to users/repos with dashes, dots or underscores (#18890) ↵silverwind2022-02-262-1/+10
| | | | | | | | | | | | (#18908) * Add tests for references with dashes This commit adds tests for full URLs referencing repos names and user names containing a dash. * Extend regex to match URLs to repos/users with dashes Co-authored-by: Alexander Neumann <62751754+rtpt-alexanderneumann@users.noreply.github.com>
* Don't update email for organisation (#18905) (#18906)Gusted2022-02-261-1/+1
| | | Backport #18905
* Fix redirect when using lowercase reponame (#18775) (#18902)Otto Richter (fnetX)2022-02-261-1/+1
| | | | | | | | | | * Previously, `GET {username}/{reponame}/raw///file-path` (the middle two slashes are blank to get the default branch) when the repo name has uppercase letters, e.g., https://try.gitea.io/AbdulrhmnGhanem/CH330_Hardware, using a lowercase version of the name redirected to the correct URL * In other words both * `GET https://try.gitea.io/AbdulrhmnGhanem/CH330_Hardware/raw///images/back.png` * `GET https://try.gitea.io/AbdulrhmnGhanem/ch330_hardware/raw///images/back.png` were redirecting to ` GET https://try.gitea.io/AbdulrhmnGhanem/CH330_Hardware/raw/branch/master/images/back.png` This isn't the case after #17551. Specifically because of this [line](https://github.com/zeripath/gitea/blob/cbd5eecd148dfca5fcb1a3da469e491a84f6b32b/modules/context/repo.go#L860). Co-authored-by: Ghanem <37152329+AbdulrhmnGhanem@users.noreply.github.com>
* Fix team management UI (#18887)Lunny Xiao2022-02-252-3/+3
|
* Fix migration v210 (#18893)Lunny Xiao2022-02-251-4/+10
|
* BeforeSourcePath should point to base commit (#18880)Jimmy Praet2022-02-251-2/+2
|
* Add changelog for v1.16.2 (#18840)v1.16.2Lunny Xiao2022-02-241-0/+48
| | | | | Add changelog for v1.16.2 Co-authored-by: 6543 <6543@obermui.de>
* Fix ldap user sync missed email in email_address table (#18786) (#18876)Lunny Xiao2022-02-242-6/+28
| | | * Fix ldap user sync missed email in email_address table (#18786)
* Don't report signal: killed errors in serviceRPC (#18850) (#18865)zeripath2022-02-241-4/+5
| | | | | | | | | Backport #18850 Fix #18849 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Update assignees check to include any writing team and change org sidebar ↵zeripath2022-02-243-33/+88
| | | | | | | | | | | | | (#18680) (#18873) Backport #18680 Following the merging of #17811 teams can now have differing write and readonly permissions, however the assignee list will not include teams which have mixed perms. Further the org sidebar is no longer helpful as it can't describe these mixed permissions situations. Fix #18572 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix login with email for ldap users (#18800) (#18836)Lunny Xiao2022-02-221-1/+1
| | | | | `authenticator.Authenticate` has assume the login name is not an email, but `username` maybe an email. So when we find the user via email address, we should use `user.LoginName` instead of `username` which is an email address. Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix ldap edit bug (#18859)Lunny Xiao2022-02-221-1/+1
|
* Fix ldap loginname (#18789) (#18804)Lunny Xiao2022-02-224-8/+25
| | | | | | | | | | | | | | | | | | | | | | | * Use email_address table to check user's email when login with email adress * Update services/auth/signin.go * Fix test * Fix test * Fix logging in with ldap username != loginname * Fix if user does not exist yet * Make more clear this is loginName * Fix formatting Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Johan Van de Wauw <johan@gisky.be> Co-authored-by: zeripath <art27@cantab.net>
* In disk_channel queues synchronously push to disk on shutdown (#18415) (#18788)zeripath2022-02-224-12/+12
| | | | | | | | | | | | Partial Backport of #18415 Instead of using an asynchronous goroutine to push to disk on shutdown just close the datachan and immediately push to the disk. Prevents messages of incompletely flushed queues. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix bug for get user by email (#18834)Lunny Xiao2022-02-211-12/+2
| | | | | Backport #18833 Fix #18830
* Update go-org to 1.6.0 (#18824) (#18839)zeripath2022-02-212-9/+14
| | | | | | | | | Backport #18824 Fix #14074 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Show fullname on issue edits and gpg/ssh signing info (#18828)Wim2022-02-204-6/+16
| | | Co-authored-by: zeripath <art27@cantab.net>
* Put buttons back in org dashboard (#18817) (#18825)Lunny Xiao2022-02-201-0/+9
| | | | | Backport #18817 Fix #18523
* Immediately Hammer if second kill is sent (#18823) (#18826)zeripath2022-02-202-2/+7
| | | | | | | | Backport #18823 Currently Gitea will wait for HammerTime or nice shutdown if kill -1 or kill -2 is sent. We should just immediately hammer if there is a second kill. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix panic in EscapeReader (#18820) (#18821)zeripath2022-02-192-0/+10
| | | | | | | | Backport #18820 There is a potential panic due to a mistaken resetting of the length parameter when multibyte characters go over a read boundary. Signed-off-by: Andrew Thornton <art27@cantab.net>
* remove redundant call to UpdateRepoStats during migration (#18591) (#18794)singuliere2022-02-172-36/+4
| | | | | | | | | | | | | | | | | | | | | | | There is no need to call UpdateRepoStats in the InsertIssues and InsertPullRequests function. They are only called during migration by the CreateIssues and CreateReviews methods of the gitea uploader. The UpdateRepoStats function will be called by the Finish method of the gitea uploader after all reviews and issues are inserted. Calling it before is therefore redundant and the associated SQL requests are not cheap. The statistics tests done after inserting an issue or a pull request are also removed. They predate the implementation of UpdateRepoStats, back when the calculation of the statistics was an integral part of the migration function. The UpdateRepoStats is now tested independantly and these tests are no longer necessary. Signed-off-by: singuliere <singuliere@autistici.org> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Allow mermaid render error to wrap (#18791)silverwind2022-02-171-1/+1
|
* Attempt to fix the webauthn migration again - part 3 (#18770) (#18771)zeripath2022-02-1610-253/+190
| | | | | | | | | | Backport #18770 v208.go is seriously broken as it misses an ID() check. We need to no-op and remigrate all of the u2f keys. See #18756 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix template bug of LFS lock (#18784) (#18787)Lunny Xiao2022-02-162-1/+2
| | | | | | Backport #18784 Fix #18782
* Various Mermaid improvements (#18776) (#18780)silverwind2022-02-169-50/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Various Mermaid improvments - Render into iframe for improved security - Use built-in dark theme instead of color inversion - Remove flexbox attributes, resulting in more consistent size rendering - Update API usage and update to latest version * restart ci * misc tweaks * remove unneccesary declaration * make it work without allow-same-origin, add loading=lazy * remove loading attribute, does not seem to work * rename variable * skip roundtrip to DOM for rendering * don't guess chart height * update comment to make it clear it's intentional * tweak * replace deprecated 'scrolling' property * remove unused css file Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Ensure git tag tests and others create test repos in tmpdir (#18447) (#18767)zeripath2022-02-158-67/+213
| | | | | | | | | | | | | | | | | | | | | | | | Backport #18447 * Ensure git tag tests and other create test repos in tmpdir There are a few places where tests appear to reuse testing repos which causes random CI failures. This PR simply changes these tests to ensure that cloning always happens into new temporary directories. Fix #18444 * Change log root for integration tests to use the REPO_TEST_DIR There is a potential race in the drone integration tests whereby test-mysql etc will start writing to log files causing make test-check fail. Fix #18077 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Increase the size of the webauthn_credential credential_id field (#18739) ↵zeripath2022-02-149-2/+287
| | | | | | | | | | | | | | | | | | | | | (#18756) * Increase the size of the webauthn_credential credential_id field (#18739) Backport #18739 Unfortunately credentialIDs in u2f are 255 bytes long which with base32 encoding becomes 408 bytes. The default size of a xorm string field is only a VARCHAR(255) This problem is not apparent on SQLite because strings get mapped to TEXT there. Fix #18727 Signed-off-by: Andrew Thornton <art27@cantab.net> * Ignore the migrate if u2f_registration is not exist (#18760) Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Prevent dangling GetAttribute calls (#18754) (#18755)zeripath2022-02-143-17/+25
| | | | | | | | | | | | | | | | * Prevent dangling GetAttribute calls It appears possible that there could be a hang due to unread data from the repo-attribute command pipes. This PR simply closes these during the defer. Signed-off-by: Andrew Thornton <art27@cantab.net> * move close into the defer Signed-off-by: Andrew Thornton <art27@cantab.net> * lets try again Signed-off-by: Andrew Thornton <art27@cantab.net>
* Send mail to issue/pr assignee/reviewer also when OnMention is set (#18707) ↵zeripath2022-02-141-2/+2
| | | | | | | | | | | | | | | | | | | (#18765) Backport #18707 Addresses #17892, where emails notifications are not sent to assignees (issue and PR) and reviewers (PR) when they have the email setting Only email on mention enabled. From the user experience perspective, when a user gets a issue/PR assigned or a PR review request, he/she would expect to be implicitly mentioned since the assignment or request is personal and targeting a single person only. Thus I see #17892 as a bug. Could we therefore mark this ticket as such? The changed code just explicitly checks for the EmailNotificationsOnMention setting beside the existing EmailNotificationsEnabled check. Too rude? @lunny mentioned a mock mail server for tests, is there something ready. How could I make use of it? See #12774 (comment) Fix #17892 Co-authored-by: flozzone <flozzone@gmail.com>
* Fix a broken link in `commits_list_small.tmpl` (#18764)wxiaoguang2022-02-141-1/+1
|
* Fix isempty detection of git repository (#18746) (#18750)Lunny Xiao2022-02-141-6/+5
| | | | | * Fix isempty detection of git repository * Fix IsEmpty check
* Prevent double encoding of branch names in delete branch (#18714) (#18738)zeripath2022-02-123-4/+4
| | | | | | | | | | | | | | | | | | | | | Backport #18714 * Prevent double encoding of branch names in delete branch There is a double encoding issue in branch template whereby the branch name ends up double encoded. Fix #18709 Signed-off-by: Andrew Thornton <art27@cantab.net> * and tag name Signed-off-by: Andrew Thornton <art27@cantab.net> * And fix #18704 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix forked repositories missed tags (#18719) (#18735)Lunny Xiao2022-02-121-1/+11
| | | | | | | | | | * Fix forked repositories missed tags * Add missed close * Use ctx Co-authored-by: 6543 <6543@obermui.de>
* Always set PullRequestWorkInProgressPrefixes in PrepareViewPullInfo (#18713) ↵zeripath2022-02-121-2/+2
| | | | | | | | | | | (#18737) Backport #18713 Move setting PullRequestWorkInProgressPrefixes to the start of PrepareViewPullInfo. Fix #18706 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix source code line highlighting (#18729) (#18740)Jimmy Praet2022-02-121-2/+5
| | | | | | | | | Backport #18729 When the issues repo unit is disabled, or an external issue tracker is used, there is no "a.ref-in-new-issue". Fixes #18721 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Reduce CI go module downloads, add make targets (#18708, #18475, #18443) ↵silverwind2022-02-123-61/+215
| | | | | | | | | | | | | | | | | (#18741) Backport #18708 Backport #18475 Backport #18443 The CI currently downloads all go modules in each pipeline step because go modules reside outside the project directory. Fix this by introducing a volume for the `/go` directory [1] so modules are only downloaded once per pipeline using a new `deps-backend` make target. For completeness, I also included new `deps` and `deps-frontend` targets and the frontend one is also triggered explicitly on CI where needed. [1] https://docs.drone.io/pipeline/kubernetes/examples/language/golang/#dependencies * Also backports #18475 and #18443 so that is was able to merge cleanly. Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Separate the details links of commit-statuses in headers (#18661) (#18730)zeripath2022-02-121-3/+3
| | | Backport #18661
* Fix release typo (#18728) (#18731)Lunny Xiao2022-02-111-1/+1
|
* Update object repo with the migrated repository (#18684) (#18726)wxiaoguang2022-02-111-1/+1
| | | | | | | | | | | When migrating a repository (from GitHub) using the API (**POST** `repos/migrate`), the Code Indexer is not updated. Searching in the user interface will not return any results. When migrating the same repository using **+/New Migration** in the web interface, the search index is updated and searching works as expected. Caused by the fact that object `repo` is never updated with the migrated repo so `setting.Indexer.RepoIndexerEnabled && !repo.IsEmpty` in `modules/notification/indexer/indexer.go:NotifyMigrateRepository` always evaluates to `false`. Tested with gitea:1.16.1, MariaDB:10, Breve in `Run Mode: Dev`. Co-authored-by: Hugo Hoitink <10838836+hoitih@users.noreply.github.com>
* Fix bug for version update hint (#18701) (#18705)Lunny Xiao2022-02-103-4/+6
| | | | | | * Fix bug for version update hint (#18701) * Add translation for zh-CN Co-authored-by: silverwind <me@silverwind.io>