aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Make external issue tracker regexp configurable via API (#21338)Andrew Imeson2022-10-075-11/+32
| | | | | Fixes #21336 Signed-off-by: Andrew Imeson <andrew@andrewimeson.com>
* Add new CSS variables --color-accent and --color-small-accent (#21305)delvh2022-10-074-11/+17
| | | | | | | | At the moment, this is only used to replace the color of the `viewed` checkbox and of the `has changed` label. Previously, the used variable accentuated always either darker or lighter, which meant that one theme looked good while the other didn't. Co-authored-by: silverwind <me@silverwind.io>
* Set SemverCompatible to false for Conan packages (#21275)KN4CK3R2022-10-074-3/+19
| | | | | | | | Fixes #21250 Related #20414 Conan packages don't have to follow SemVer. The migration fixes the setting for all existing Conan and Generic (#20414) packages.
* Parse OAuth Authorization header when request omits client secret (#21351)M Hickford2022-10-071-2/+21
| | | | | | | | | | | | | This fixes error "unauthorized_client: invalid client secret" when client includes secret in Authorization header rather than request body. OAuth spec permits both. Sanity validation that client id and client secret in request are consistent with Authorization header. Improve error descriptions. Error codes remain the same. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Disable Firefox E2E tests (#21363)silverwind2022-10-061-6/+7
| | | | | Make CI green again, until we figure out https://github.com/go-gitea/gitea/issues/21355.
* Add redirect of /upgrade/ to /upgrade-from-gitea/ on docs site (#21330)Joe Constant2022-10-062-0/+6
| | | | | | | | Since adding an aliases block doesn't seem to work locally for me (I suspect because a page actually exists and Hugo is granting preference to existing pages over aliases), I also added entries to static/_redirects file so Netlify will handle the redirects Fixes #7208
* Update to go-enry v2.8.3 (#21360)Clark Boylan2022-10-062-3/+3
| | | | | | | | | | | | This fixes an issue with enry's isVendor() method being too greedy. This lead to gitea classifying unvendored code as vendored. The impact of this is fairly minimal, but our Gitea users did notice which led me to fixing this in go-enry. Some files will be tagged with a vendored flag in the UI. I think it also impacts the calculation of language statistics in the repo as vendored files are not incorporated into the stats. For more information on the issue see the go-enry bug: https://github.com/go-enry/go-enry/issues/135
* Update go to 1.19 (#21361)zeripath2022-10-061-1/+1
| | | | | | | It appears that updating go to 1.19 for playwright was missed when we updated to go 1.19 elsewhere. Signed-off-by: Andrew Thornton <art27@cantab.net>
* SessionUser protection against nil pointer dereference (#21358)Paweł Bogusławski2022-10-061-0/+4
| | | | | | | | | | | | | | | | | | | `SessionUser` should be protected against passing `sess` = `nil` to avoid ``` PANIC: runtime error: invalid memory address or nil pointer dereference ``` in https://github.com/go-gitea/gitea/pull/18452/files#diff-a215b82aadeb8b4c4632fcf31215dd421f804eb1c0137ec6721b980136e4442aR69 after upgrade from gitea v1.16 to v1.17. Related: https://github.com/go-gitea/gitea/pull/18452 Author-Change-Id: IB#1126459
* Fix and improve incorrect error messages (#21342)delvh2022-10-061-5/+4
| | | L
* Fix default theme-auto selector when nologin (#21346)rock2dust2022-10-061-1/+1
| | | | | | | | | | the bug is theme selector is `theme-` when not login to Gitea ![theme-auto](https://user-images.githubusercontent.com/76462613/194099390-0ff6854a-1eb9-4dba-bb28-fd238f2225f8.png) Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add `stat` to `ToCommit` function for speed (#21337)Gennady Kovshenin2022-10-065-31/+49
| | | | | | | | | Calls to ToCommit are very slow due to fetching diffs, analyzing files. This patch lets us supply `stat` as false to speed fetching a commit when we don't need the diff. /v1/repo/commits has a default `stat` set as true now. Set to false to experience fetching thousands of commits per second instead of 2-5 per second.
* Fix typo in API comment document (#21347)wxiaoguang2022-10-052-6/+33
| | | | | | | Close #21307 After the fix: ![image](https://user-images.githubusercontent.com/2114189/194120843-52566b84-6e29-4f91-859a-eb5839c68c54.png)
* Update comment about repository.DISABLED_REPO_UNITS in app.example.ini (#21343)rock2dust2022-10-051-1/+1
| | | | Add allowed values: `repo.projects`
* Remove extra space from title element (#21345)rock2dust2022-10-051-1/+1
| | | | | Removes a spurious additional space in the head template. ![](https://user-images.githubusercontent.com/76462613/194077336-1e757242-6f92-4238-8856-746b2e9a1a2c.png)
* Fix slight bug in katex (#21171)zeripath2022-10-057-69/+153
| | | | | | | | | | There is a small bug in #20571 whereby `$a a$b b$` will not be correctly detected as a math inline block of `a a$b b`. This PR fixes this. Also reenable test cases as per #21340 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix linked account translation (#21331)John Olheiser2022-10-041-1/+1
| | | fix key used for translation
* [skip ci] Updated translations via CrowdinJason Song2022-10-041-16/+19
|
* Tag list should include draft releases with existing tags (#21263)Jason Song2022-10-034-8/+24
| | | | | Before, a tag for a draft release disappeared in the tag list, fix #21262. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* [skip ci] Updated translations via Crowdintechknowlogick2022-10-031-0/+3
|
* Foreign ID conflicts if ID is 0 for each item (#21271)techknowlogick2022-10-021-0/+4
| | | | | The default is 0 if not defined, and that causes dupe index errors Co-authored-by: 6543 <6543@obermui.de>
* Make app.ini read-only message more prominent (#21315)John Olheiser2022-10-021-6/+6
|
* Fix doc and heatmap for the Vue3 refactoring (#21312)wxiaoguang2022-10-026-24/+20
|
* Allow specifying SECRET_KEY_URI, similar to INTERNAL_TOKEN_URI (#19663)Clar Fon2022-10-027-50/+51
| | | | | | Only load SECRET_KEY and INTERNAL_TOKEN if they exist. Never write the config file if the keys do not exist, which was only a fallback for Gitea upgraded from < 1.5 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor from Vue2 to Vue3 (#20044)André Jaenisch2022-10-0118-601/+379
| | | Close #19902
* Update Golang deps (#21304)techknowlogick2022-10-012-104/+116
|
* Fix issue that `sync_on_commit` is not set (#21309)Chongyi Zheng2022-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | <!-- Please check the following: 1. Make sure you are targeting the `main` branch, pull requests on release branches are only allowed for bug fixes. 2. Read contributing guidelines: https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md 3. Describe what your pull request does and which issue you're targeting (if any) --> Fixes #21308. With the original frontend template `templates/repo/settings/options.tmpl`, the field `push_mirror_sync_on_commit` is always empty even when checkbox is checked. Removing `value` from the input tag seems to solve the issue, and will set `push_mirror_sync_on_commit: on` when the checkbox is checked. (I'm not familiar with the frontend logics Gitea is using, so I don't really understand the cause of it)
* [skip ci] Updated translations via Crowdinqwerty2872022-10-012-0/+7
|
* Add pages to view watched repos and subscribed issues/PRs (#17156)qwerty2872022-09-296-2/+334
| | | | | | | | | | | | | | | | | Adds GitHub-like pages to view watched repos and subscribed issues/PRs This is my second try to fix this, but it is better than the first since it doesn't uses a filter option which could be slow when accessing `/issues` or `/pulls` and it shows both pulls and issues (the first try is #17053). Closes #16111 Replaces and closes #17053 ![Screenshot](https://user-images.githubusercontent.com/80460567/134782937-3112f7da-425a-45b6-9511-5c9695aee896.png) Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix the hook related FAQ contents (#21297)wxiaoguang2022-09-291-5/+5
| | | | | | | | | Follows https://github.com/go-gitea/gitea/issues/21129#issuecomment-1260802986 * https://github.com/go-gitea/gitea/issues/21129#issuecomment-1260802986 A lot of users are asking similar questions. The old content in FAQ doesn't seem to be related to the problem.
* Check if email is used when updating user (#21289)Alexander Shimchik2022-09-292-6/+27
| | | | Fix #21075 When updating user data should check if email is used by other users
* Add name field for org api (#21270)KN4CK3R2022-09-296-5/+17
| | | | | | | | related #21205 The field `UserName` is not really usefull for an organization. This adds a second `Name` field. The [GitHub API](https://docs.github.com/en/rest/orgs/orgs#get-an-organization) uses `name` too. `UserName` should be deprecated then.
* Add API endpoint to get changed files of a PR (#21177)qwerty2872022-09-298-6/+407
| | | | | | | | | | This adds an api endpoint `/files` to PRs that allows to get a list of changed files. built upon #18228, reviews there are included closes https://github.com/go-gitea/gitea/issues/654 Co-authored-by: Anton Bracke <anton@ju60.de> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* [skip ci] Updated translations via CrowdinM Hickford2022-09-293-0/+3
|
* Ignore port for loopback redirect URIs (#21293)M Hickford2022-09-292-0/+33
| | | | | Following https://datatracker.ietf.org/doc/html/rfc8252#section-7.3 Fixes #21285
* Improve error descriptions for unauthorized_client (#21292)M Hickford2022-09-281-4/+4
| | | | | | | | | | | | | | | Fixes #21282 As suggested by the [OAuth RFC](https://www.rfc-editor.org/rfc/rfc6749) (quoted below), it's helpful to give more detail in the description > error_description OPTIONAL. Human-readable ASCII [[USASCII](https://www.rfc-editor.org/rfc/rfc6749#ref-USASCII)] text providing **additional information, used to assist the client developer in understanding the error that occurred.** Values for the "error_description" parameter MUST NOT include characters outside the set %x20-21 / %x23-5B / %x5D-7E.
* Consolidate more CSS rules, fix inline code on arc-green (#21260)silverwind2022-09-282-47/+38
| | | | | | | | | - Consolidate various CSS rules into base rules - Fix inline code in Markdown not having enough contrast on arc-green Adds one new color variable, `--color-label-active-bg` for the background of active labels. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Update bluemonday (#21281)65432022-09-272-5/+6
| | | | | https://github.com/microcosm-cc/bluemonday/releases/tag/v1.0.20 Co-authored-by: Lauris BH <lauris@nix.lv>
* Add support for authentication based on reverse proxy email (#19949)Hasnain Lakhani2022-09-281-8/+52
| | | | | | | | | | | | | | | | | | | | | | | | This is useful in scenarios where the reverse proxy may have knowledge of user emails, but does not know about usernames set on gitea, as in the feature request in #19948. I tested this by setting up a fresh gitea install with one user `mhl` and email `m.hasnain.lakhani@gmail.com`. I then created a private repo, and configured gitea to allow reverse proxy authentication. Via curl I confirmed that these two requests now work and return 200s: curl http://localhost:3000/mhl/private -I --header "X-Webauth-User: mhl" curl http://localhost:3000/mhl/private -I --header "X-Webauth-Email: m.hasnain.lakhani@gmail.com" Before this commit, the second request did not work. I also verified that if I provide an invalid email or user, a 404 is correctly returned as before Closes #19948 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: 6543 <6543@obermui.de>
* Do not allow organisation owners add themselves as collaborator (#20043)Wim2022-09-282-0/+14
| | | | | | We're already checking for repo owners, but we also need to check for organisation owners that try to add themselves as collaborator Closes #17966
* Feature: Case-insensitive "find files in repo" (#21269)HeySora2022-09-282-13/+14
| | | | | | | | | | | | | This (short) PR builds upon #15028 and makes the file search case-insensitive. Previously, having a file named `TestFile.cs` would not be shown if `test` was typed in the search box. This now changes the matching function to be case-insensitive (without affecting the UI). The matching function, `strSubMatch`, is only used for this feature (it has been introduced by #15028), meaning that this PR does not affect the behaviour of any unrelated functionality of Gitea.
* Better repo API unit checks (#21130)John Olheiser2022-09-284-31/+45
| | | | | | | | | | | | | | | | | | | | This PR would presumably Fix #20522 Fix #18773 Fix #19069 Fix #21077 Fix #13622 ----- 1. Check whether unit type is currently enabled 2. Check if it _will_ be enabled via opt 3. Allow modification as necessary Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: 6543 <6543@obermui.de>
* Fix empty container layer history and UI (#21251)KN4CK3R2022-09-274-3/+15
| | | Fixes #21248
* Add filetree on left of diff view (#21012)sebastian-sauer2022-09-2713-158/+590
| | | | | | | | | | | | | | This PR adds a filetree to the left side of the files/diff view. Initially the filetree will not be shown and may be shown via a new "Show file tree" button. Showing and hiding is using the same icon as github. Folders are collapsible. On small devices (max-width 991 PX) the file tree will be hidden. Close #18192 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* [skip ci] Updated translations via CrowdinTyrone Yeh2022-09-271-24/+213
|
* Add author search input (#21246)Tyrone Yeh2022-09-261-0/+4
| | | | | | New author filter in #20578 missing author search input #20623 lost author, so add this Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Upgrade chroma to v2.3.0 (#21259)silverwind2022-09-267-43/+40
| | | | | | | | | | | | | The behaviour of `PreventSurroundingPre` has changed in https://github.com/alecthomas/chroma/pull/618 so that apparently it now causes line wrapper tags to be no longer emitted, but we need some form of indication to split the HTML into lines, so I did what https://github.com/yuin/goldmark-highlighting/pull/33 did and added the `nopWrapper`. Maybe there are more elegant solutions but for some reason, just splitting the HTML string on `\n` did not work. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* [skip ci] Updated translations via CrowdinJulien Palard2022-09-261-0/+11
|
* Typo in config-cheat-sheet (#21261)Julien Palard2022-09-251-1/+1
|
* Use native inputs in whitespace dropdown (#20980)silverwind2022-09-252-8/+19
| | | | | | | | | | | | | | | Use native `<input type="radio">` instead of fake icon font. The `pointer-events: none` is necessary so the link click always takes effect. Tested in Firefox, Safari and Chrome. Before: <img width="305" alt="Screen Shot 2022-08-27 at 20 42 11" src="https://user-images.githubusercontent.com/115237/187044786-6655c766-c3fb-4672-9e3e-219b3ec4896c.png"> After: <img width="298" alt="Screen Shot 2022-08-27 at 21 10 05" src="https://user-images.githubusercontent.com/115237/187044790-33f87741-062e-4744-80b1-d3bd3fd725e3.png"> <img width="302" alt="image" src="https://user-images.githubusercontent.com/115237/187044872-6c133cea-65ee-4ebd-b18a-a8b38c791565.png">