aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [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
|
* Force color-adjust for markdown checkboxes (#17146)sebastian-sauer2021-09-251-0/+4
| | | | | this forces browsers to render background correctly Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [skip ci] Updated translations via CrowdinGiteaBot2021-09-2519-77/+49
|
* Prevent panic in Org mode HighlightCodeBlock (#17140)zeripath2021-09-243-12/+46
| | | | | | | | | | | When rendering source in org mode there is a mistake in the highlight code that causes a panic. This PR fixes this. Fix #17139 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Move login related structs and functions to models/login (#17093)Lunny Xiao2021-09-24142-903/+1046
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move login related structs and functions to models/login * Fix test * Fix lint * Fix lint * Fix lint of windows * Fix lint * Fix test * Fix test * Only load necessary fixtures when preparing unit tests envs * Fix lint * Fix test * Fix test * Fix error log * Fix error log * Fix error log * remove unnecessary change * fix error log * merge main branch
* Unify issue and pr subtitles (#17133)crapStone2021-09-231-5/+5
|
* DBContext is just a Context (#17100)zeripath2021-09-23129-1022/+1112
| | | | | | | | | | | | | | | | | | | | | | | | | * DBContext is just a Context This PR removes some of the specialness from the DBContext and makes it context This allows us to simplify the GetEngine code to wrap around any context in future and means that we can change our loadRepo(e Engine) functions to simply take contexts. Signed-off-by: Andrew Thornton <art27@cantab.net> * fix unit tests Signed-off-by: Andrew Thornton <art27@cantab.net> * another place that needs to set the initial context Signed-off-by: Andrew Thornton <art27@cantab.net> * avoid race Signed-off-by: Andrew Thornton <art27@cantab.net> * change attachment error Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix typo skipping a migration (#17130)delvh2021-09-231-1/+1
|
* Fix commit status index problem (#17061)Lunny Xiao2021-09-237-19/+211
| | | | | | | | | | | | | | | | | | | * Fix commit status index problem * remove unused functions * Add fixture and test for migration * Fix lint * Fix fixture * Fix lint * Fix test * Fix bug * Fix bug
* Fix problem when database id is not increment as expected (#17124)Lunny Xiao2021-09-221-1/+1
|
* refactor: move from io/ioutil to io and os package (#17109)Eng Zer Jun2021-09-22103-314/+261
| | | | | | | | | The io/ioutil package has been deprecated as of Go 1.16, see https://golang.org/doc/go1.16#ioutil. This commit replaces the existing io/ioutil functions with their new definitions in io and os packages. Signed-off-by: Eng Zer Jun <engzerjun@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* update docs to 1.15.3techknowlogick2021-09-211-1/+1
|
* Changelog 1.15.3 (#17091) (#17113)65432021-09-221-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | ## [1.15.3](https://github.com/go-gitea/gitea/releases/tag/v1.15.3) - 2021-09-19 * ENHANCEMENTS * Add fluid to ui container class to remove margin (#16396) (#16976) * Add caller to cat-file batch calls (#17082) (#17089) * BUGFIXES * Render full plain readme. (#17083) (#17090) * Upgrade xorm to v1.2.4 (#17059) * Fix bug of migrate comments which only fetch one page (#17055) (#17058) * Do not show issue context popup on external issues (#17050) (#17054) * Decrement Fork Num when converting from Fork (#17035) (#17046) * Correctly rollback in ForkRepository (#17034) (#17045) * Fix missing close in WalkGitLog (#17008) (#17009) * Add prefix to SVG id/class attributes (#16997) (#17000) * Fix bug of migrated repository not index (#16991) (#16996) * Skip AllowedUserVisibilityModes validation on update user if it is an organisation (#16988) (#16990) * Fix storage Iterate bug and Add storage doctor to delete garbage attachments (#16971) (#16977) * Fix issue with issue default mail template (#16956) (#16975) * Ensure that rebase conflicts are handled in updates (#16952) (#16960) * Prevent panic on diff generation (#16950) (#16951) Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Merge endpoints for pull diff/patch (#17104)qwerty2872021-09-223-82/+23
| | | this merges the two API endpoints for the PR diff/patch in to one
* Add Horizontal scrollbar to inner menu on Chrome (#17086)zeripath2021-09-211-0/+2
| | | | | | | | | | There is a longstanding bug whereby the admin pages, in particular, have not had a horizontal scrollbar on chrome when the page is narrow. This PR simply adds overflow-x and adds a default height to the scrollbar to match that of the vertical bar. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Ignore Sync errors on pipes when doing `CheckAttributeReader.CheckPath`, fix ↵wxiaoguang2021-09-2035-65/+960
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | the hang of `git cat-file` (#17096) * Ignore Sync errors on pipes when doing `CheckAttributeReader.CheckPath` * apply env patch * Drop the Sync and fix a number of issues with the Close function Signed-off-by: Andrew Thornton <art27@cantab.net> * add logs for DBIndexer and CheckPath * Fix some more closing bugs Signed-off-by: Andrew Thornton <art27@cantab.net> * Add test case for language_stats Signed-off-by: Andrew Thornton <art27@cantab.net> * Update modules/indexer/stats/db.go Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: 6543 <6543@obermui.de>
* Add API to get commit diff/patch (#17095)qwerty2872021-09-204-0/+128
| | | | | | * Add API to get commit diff/patch * Add Tests Co-authored-by: 6543 <6543@obermui.de>
* [skip ci] Updated translations via CrowdinGiteaBot2021-09-202-2/+14
|
* Move db related basic functions to models/db (#17075)Lunny Xiao2021-09-19335-3639/+4176
| | | | | | | | | | | | | | | | | | | | | | | | | * Move db related basic functions to models/db * Fix lint * Fix lint * Fix test * Fix lint * Fix lint * revert unnecessary change * Fix test * Fix wrong replace string * Use *Context * Correct committer spelling and fix wrong replaced words Co-authored-by: zeripath <art27@cantab.net>
* [skip ci] Updated licenses and gitignoresGiteaBot2021-09-191-0/+21
|
* Open the DingTalk link in browser (#17084)wxiaoguang2021-09-182-13/+28
| | | | | | | | | https://developers.dingtalk.com/document/app/message-link-description To open the link in browser, we should use this URL: `"dingtalk://dingtalkclient/page/link?pc_slide=false&url=" + url.QueryEscape(singleURL)` Otherwise the page is displayed inside DingTalk client, it makes users very difficult to visit non-public URLs in DingTalk webhook messages.
* Add left padding for chunk header of split diff view (#13397)Bagas Sanjaya2021-09-181-0/+4
| | | | | | | | | This commit adds 10px padding-left on chunk header element (which is `<span>`). Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Switch migration icon to svg (#15954)silverwind2021-09-189-14/+43
| | | | | | | | Followup on https://github.com/go-gitea/gitea/pull/15952, use SVG for migration icon. <img width="541" alt="Screen Shot 2021-05-23 at 00 26 12" src="https://user-images.githubusercontent.com/115237/119242417-c1a37600-bb5d-11eb-9f97-a80aa89741ee.png"> <img width="540" alt="Screen Shot 2021-05-23 at 00 25 39" src="https://user-images.githubusercontent.com/115237/119242419-c2d4a300-bb5d-11eb-9792-1e6e4092c9f9.png">
* Fixed issue where creating a reference of an issue would create a tag with ↵Jelle Hulter2021-09-182-2/+2
| | | | | | | | the full name instead of the username if this is the default in the .ini file (#17074) Adds an extra attribute to every issue comment containing the actual username, such that it can be used to tag the original author when clicking on "Reference in new issue" (#17073) Fix #17073
* Render full plain readme. (#17083)KN4CK3R2021-09-171-0/+4
|