summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix unwanted team review request deletion (#17257)Jimmy Praet2021-10-071-1/+1
| | | | Add missing issue_id = ? to where clause Fixes #17251
* Handle duplicate keys on GPG key ring (#17242)zeripath2021-10-071-0/+40
| | | | | | | | | | It is possible that a keyring can contain duplicate keys on a keyring due to jpegs or other layers. This currently leads to a confusing error for the user - where we report a duplicate key insertion. This PR simply coalesces keys into one key if there are duplicates. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Fix broken Activities link in team dashboard (#17255)Jimmy Praet2021-10-071-1/+1
| | | | | Remove '/' suffix from organization dashboard link Fixes #17250
* Add protection to disable Gitea when run as root (#17168)techknowlogick2021-10-072-3/+33
| | | | Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: 6543 <6543@obermui.de>
* API pull's head/base have correct permission (#17214)pricly-yellow2021-10-074-22/+34
| | | | | | | | | | close #17181 * for all pull requests API return permissions of caller * for all webhook return empty permissions Signed-off-by: Danila Kryukov <pricly_yellow@dismail.de> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: 6543 <6543@obermui.de>
* Fix problem when database ID is not incremented as expected (#17229)finga2021-10-063-3/+3
| | | | | | Although #17124 fixed the same issue for the feed, some other parts with the same issue were found. Co-authored-by: finga <finga@onders.org>
* fix navbar ui (#17235)wxiaoguang2021-10-061-1/+1
|
* CI: migrate from 'plugins/s3:1' to 'woodpeckerci/plugin-s3:latest' (#17234)65432021-10-061-3/+3
| | | | - this fixes the CI release upload issues, as the docker image for this is freshly built (unlike the mostly unmaintained "official" drone plugins), thus containing current CA certs needed for letsencrypt since 2021-09-31. - woodpecker is a drone-ci fork maintained partially by @6543. it's API compatible with current drone plugins afaik
* Avatar refactor, move avatar code from `models` to `models.avatars`, remove ↵wxiaoguang2021-10-0615-300/+274
| | | | | | | | | | | | | | | | duplicated code (#17123) Why this refactor The goal is to move most files from `models` package to `models.xxx` package. Many models depend on avatar model, so just move this first. And the existing logic is not clear, there are too many function like `AvatarLink`, `RelAvatarLink`, `SizedRelAvatarLink`, `SizedAvatarLink`, `MakeFinalAvatarURL`, `HashedAvatarLink`, etc. This refactor make everything clear: * user.AvatarLink() * user.AvatarLinkWithSize(size) * avatars.GenerateEmailAvatarFastLink(email, size) * avatars.GenerateEmailAvatarFinalLink(email, size) And many duplicated code are deleted in route handler, the handler and the model share the same avatar logic now.
* Remove Dashboard/Home button from the navbar (#16844)n2021-10-051-8/+4
| | | | | This removes the Dashboard/Home buttons and adds its text to the title of the logo. Co-authored-by: Alexey 〒erentyev <axifnx@gmail.com>
* Redirect on project after issue created (#17211)Romain2021-10-052-1/+9
| | | | | close #17011 If user create an issue with button in project view, after issue is created the user is redirect to project view.
* Add metrics to get issues by repository (#17225)Romain2021-10-055-35/+73
|
* Add specific event type to header (#17222)John Olheiser2021-10-051-3/+8
| | | | | | | * Add specific event type to header Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change single to type
* Fix stange behavior of DownloadPullDiffOrPatch in incorect index (#17223)pricly-yellow2021-10-053-17/+11
| | | | | | | Fix GetPullRequestByIndex by validate index > 1 Signed-off-by: Danila Kryukov <pricly_yellow@dismail.de> Co-authored-by: a1012112796 <1012112796@qq.com>
* [skip ci] Updated translations via CrowdinGiteaBot2021-10-051-0/+11
|
* [skip ci] Updated translations via CrowdinGiteaBot2021-10-042-0/+8
|
* Add metrics to get issues by label (#17201)Romain2021-10-035-5/+44
| | | | | | | | | | | | | | | | | | | | | * Add metrics to get issues by label * Add comment on IssueByLabelCount * Code review - Unify "AS" in SQL (#17201) * Code review - Remove useless join (#17201) * Code review - Disable issue_by_label by default in settings (#17201) * use e * restore empty line * update docs Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix typo in app.example.ini (#17213)Petr Vaněk2021-10-031-2/+2
|
* API: don't allow merged PRs to be reopened (#17192)Norwin2021-10-022-1/+14
| | | | | | | | | | | | * api: dont open merged PRs * don't change base branch when already merged * don't allow any state change * also validate opening merged PRs in EditIssue Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: 6543 <6543@obermui.de>
* Reference in new issue modal: dont pre-populate issue title (#17208)Norwin2021-10-021-2/+0
| | | | | * dont prepopulate issue title * cleanup
* Add option to copy line permalink (#17145)qwerty2872021-10-023-34/+37
| | | | | | | | | | | * Add option to copy line permalink * Fix lint * Apply review suggestions * Update code and fix lint * Use features/clipboard.js framework
* Add projects and project boards in exposed metrics (#17202)Romain2021-10-022-17/+45
| | | | | | | * Add projects and project boards in exposed metrics * Refactor db.GetEngine Co-authored-by: delvh <dev.lh@web.de>
* [skip ci] Updated translations via CrowdinGiteaBot2021-10-021-0/+3
|
* Always set a unique Message-ID header. (#17206)KN4CK3R2021-10-013-26/+30
|
* [skip ci] Updated translations via CrowdinGiteaBot2021-10-0126-64/+5
|
* Prevent NPE on invalid diff (#17197)zeripath2021-09-303-2/+7
| | | | | | | | | | | | | | * Prevent NPE on invalid diff If ParseCompareInfo returns a nil compare info the defer function needs to ensure that it does not attempt to close the HeadGitRepo. Fix #17193 Signed-off-by: Andrew Thornton <art27@cantab.net> * add TEST Co-authored-by: 6543 <6543@obermui.de>
* API: add html urls to notification subjects (#17178)Norwin2021-09-303-9/+27
| | | | | | | | * API: add html urls to notification subjects * add "Repository" Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2021-09-302-5/+4
|
* Fix missing repo link in issue/pull assigned emails (#17183)zeripath2021-09-303-3/+9
| | | | | | | | | | | | | There was a mistake in the template file: `templates/mail/issue/assigned.tmpl` where the repourl was generated from a non-existent release instead of the issue. This PR changes this to use the issue but also ensure that the issue repo is loaded. It also slightly improves the English locale string. Fix #17160 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: delvh <dev.lh@web.de>
* Kanban colored boards (#16647)Romain2021-09-2914-31/+187
| | | Add a column Color in ProjectBoard and color picker in new / edit project board form.
* upgrade xorm to v1.2.5 (#17177)Lunny Xiao2021-09-296-8/+8
|
* Fix wording in issue template (#17176)silverwind2021-09-291-1/+1
| | | There was a typo `systemm` here. I opted to just remove the superfluos word altogether.
* [skip ci] Updated translations via CrowdinGiteaBot2021-09-293-1/+9
|
* Create pub/priv keypair for federation (#17071)techknowlogick2021-09-282-0/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * add logic for creating pub/priv keypair for federation * Apply suggestions from code review Co-authored-by: delvh <dev.lh@web.de> * make fmt * Update modules/activitypub/keypair.go Co-authored-by: delvh <dev.lh@web.de> * add tests * fix revert * more tests * Apply suggestions from code review Co-authored-by: delvh <dev.lh@web.de> * make fmt Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: 6543 <6543@obermui.de>
* Fix bug of get context user (#17169)Lunny Xiao2021-09-282-10/+12
| | | Co-authored-by: 6543 <6543@obermui.de>
* Add delvh to MAINTAINERS (#17170)delvh2021-09-281-0/+1
|
* [skip ci] Updated translations via CrowdinGiteaBot2021-09-281-1/+1
|
* Add nodeinfo endpoint for federation purposes (#16953)techknowlogick2021-09-2811-0/+324
| | | | | | | | | | | | | | | | Nodeinfo is a way to expose certain metadata about a server for use of discovery regarding functionality of its federation capabilities. Two endpoints are required: 1. `/.well-known/nodeinfo` which informs client where it can find the location of the location of its metadata (including which version of the schema is used) 2. the endpoint which exposes the metadata in json format according to schema. Notes: * `openRegistrations` is a required field, but I propose to set to false as default in case someone writes a crawler to discover "open" gitea instances * to limit data leakage I also propose to not include the `usage` field (note it is required so it should be included, but left as empty). More info: https://github.com/jhass/nodeinfo https://github.com/jhass/nodeinfo/tree/main/schemas/2.1 http://nodeinfo.diaspora.software/protocol.html
* Don't return binary file changes in raw PR diffs by default (#17158)Norwin2021-09-275-11/+32
| | | | | | | | * return diffs without binary file content change * ?binary=true option to restore old behaviour Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: zeripath <art27@cantab.net>
* Nicely handle missing user in collaborations (#17049)zeripath2021-09-274-258/+161
| | | | | | | | | | | | | | | | * Nicely handle missing user in collaborations It is possible to have a collaboration in a repository which refers to a no-longer existing user. This causes the repository transfer to fail with an unusual error. This PR makes `repo.getCollaborators()` nicely handle the missing user by ghosting the collaboration but also adds consistency check. It also adds an Access consistency check. Fix #17044 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Create doctor command to fix repo_units broken by dumps from 1.14.3-1.14.6 ↵zeripath2021-09-274-1/+596
| | | | | | | | | | | | | | | | (#17136) There was a serious issue with the `gitea dump` command in 1.14.3-1.14.6 which led to corruption of the `config` field of the `repo_unit` table. This PR adds a doctor command to attempt to fix the broken repo_units. Users affected by #16961 should run: ``` gitea doctor --fix --run fix-broken-repo-units ``` Fix #16961 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Use light/dark theme based on system preference (#17051)Gwyneth Morgan2021-09-278-9/+19
| | | | | | | | Add a new default theme `auto`, which will automatically switch between `gitea` (light) and `arc-green` (dark) themes depending on the user's operating system settings. Closes: #8183
* docs: explain where are settings for release files (#17161)Forest Johnson2021-09-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just a tiny change to save someone some time while reading the docs. I got lost in the angular code and npm packages trying to reverse engineer it and figure out what setting controlled this file limit: ![image](https://user-images.githubusercontent.com/7119703/134829716-8f587878-21a3-413b-ba1e-c2bbe9391ad2.png) Eventually I tracked it down from https://github.com/go-gitea/gitea/blob/b74a0f9060d5fda341f5554ef529a2006308c6ab/options/locale/locale_en-US.ini#L2776 to https://github.com/go-gitea/gitea/blob/b74a0f9060d5fda341f5554ef529a2006308c6ab/templates/repo/upload.tmpl#L11 to https://github.com/go-gitea/gitea/blob/b74a0f9060d5fda341f5554ef529a2006308c6ab/web_src/js/index.js#L1043 to https://github.com/go-gitea/gitea/blob/b74a0f9060d5fda341f5554ef529a2006308c6ab/web_src/js/features/dropzone.js#L3 to https://www.npmjs.com/package/dropzone and then I realized I can't read :sweat_smile:, back to https://github.com/go-gitea/gitea/blob/b74a0f9060d5fda341f5554ef529a2006308c6ab/templates/repo/upload.tmpl#L8 and quickly solved it from there!! https://github.com/go-gitea/gitea/blob/b74a0f9060d5fda341f5554ef529a2006308c6ab/modules/upload/upload.go#L81 Yes I know this long path was 90% me failing to read code properly and going on a red herring journey... but point is we should not have to do this in the first place to know how to configure this file upload form :pleading_face: :point_right: :point_left:
* Support direct comparison (git diff a..b) as well merge comparison (a...b) ↵zeripath2021-09-2710-148/+198
| | | | | | | | | | | | (#16635) This PR changes the compare page to make the "..." in the between branches a clickable link. This changes the comparison type from "..." to "..". Similarly it makes the initial compare icon clickable to switch the head and base branches. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Allow LDAP Sources to provide Avatars (#16851)zeripath2021-09-2613-6/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Allow LDAP Sources to provide Avatars Add setting to LDAP source to allow it to provide an Avatar. Currently this is required to point to the image bytes. Fix #4144 Signed-off-by: Andrew Thornton <art27@cantab.net> * Rename as Avatar Attribute (drop JPEG) Signed-off-by: Andrew Thornton <art27@cantab.net> * Always synchronize avatar if there is change Signed-off-by: Andrew Thornton <art27@cantab.net> * Actually get the avatar from the ldap Signed-off-by: Andrew Thornton <art27@cantab.net> * clean-up Signed-off-by: Andrew Thornton <art27@cantab.net> * use len()>0 rather than != "" Signed-off-by: Andrew Thornton <art27@cantab.net> * slight shortcut in IsUploadAvatarChanged Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add SkipLocal2FA option to pam and smtp sources (#17078)zeripath2021-09-2610-6/+48
| | | | | | | | | | | | | * Add SkipLocal2FA option to other pam and smtp sources Extend #16954 to allow setting skip local 2fa on pam and SMTP authentication sources Signed-off-by: Andrew Thornton <art27@cantab.net> * make SkipLocal2FA omitempty Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* [skip ci] Updated translations via CrowdinGiteaBot2021-09-261-3/+3
|
* Fix bundle creation (#17079)Alexey 〒erentyev2021-09-262-9/+21
| | | | | | | Signed-off-by: Alexey Terentyev <axifnx@gmail.com> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Gwyneth Morgan <87623694+gwymor@users.noreply.github.com> Co-authored-by: Gwyneth Morgan <gwymor@tilde.club>
* Fix wrong i18n keys (#17150)Lunny Xiao2021-09-252-5/+5
| | | Co-authored-by: 6543 <6543@obermui.de>
* Move twofactor to models/login (#17143)Lunny Xiao2021-09-2517-121/+131
|