aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Case-insensitive NuGet symbol file GUID (#21409)Hubert Wawrzyńczyk2022-10-123-3/+3
| | | | | | | NuGet symbol file lookup returned 404 on Visual Studio 2019 due to case-sensitive api router. The api router should accept case-insensitive GUID. Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add generic set type (#21408)KN4CK3R2022-10-1241-324/+328
| | | | | This PR adds a generic set type to get rid of maps used as sets. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Improve OAuth integration tests (#21390)M Hickford2022-10-122-33/+133
| | | | | | | In particular, test explicit error responses. No change to behaviour. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Make e-mail sanity check more precise (#20991)Andreas Fischer2022-10-112-20/+21
| | | | | | | | | | | | For security reasons, all e-mail addresses starting with non-alphanumeric characters were rejected. This is too broad and rejects perfectly valid e-mail addresses. Only leading hyphens should be rejected -- in all other cases e-mail address specification should follow RFC 5322. Co-authored-by: Andreas Fischer <_@ndreas.de> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix broken link to frontend guidelines in hacking guidelines (#21382)Yarden Shoham2022-10-112-1/+1
|
* Use Name instead of DisplayName in LFS Lock (#21415)KN4CK3R2022-10-113-5/+6
| | | | | Fixes #21268 Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [skip ci] Updated translations via Crowdinkolaente2022-10-121-0/+8
|
* feat(pr review): add more space on mobile (#21326)kolaente2022-10-111-0/+10
| | | | | | | | | | | | | | | | | This PR adds more space to the review screen on mobile so that comments are more readable and less "squashed" an smaller screens. Before: ![Screen Shot 2022-10-03 at 17 12 26](https://user-images.githubusercontent.com/13721712/193612834-6add9e25-f635-4a5b-84f6-b8e2b320ec29.png) After: ![Screen Shot 2022-10-03 at 17 10 15](https://user-images.githubusercontent.com/13721712/193612671-ab4ef640-0360-44ef-9184-b366b7abeb37.png) Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv>
* Bump `golang.org/x/text` (#21412)Gusted2022-10-112-2/+3
| | | | | - Update the `golang.org/x/text` dependency, this fixes [a security issue](https://groups.google.com/g/golang-announce/c/-hjNw559_tE/m/KlGTfid5CAAJ).
* Update gitea.service (#21399)plsnp2022-10-111-6/+2
| | | | | | | | | | | | | | | | | `LimitMEMLOCK=infinity` is already the default, so removed that Default soft limit for LimitNOFILE is 1024 Default hard limit for LimitNOFILE is 524288 `LimitNOFILE=65535` increases the soft limit, but decreases the hard limit References: * https://www.freedesktop.org/software/systemd/man/systemd.exec.html * https://blog.skbali.com/2019/09/set-ulimits-for-a-script-started-using-systemd/ Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Do DB update after merge in hammer context (#21401)zeripath2022-10-111-10/+12
| | | | | | | | | | | | | | | When merge was changed to run in the background context, the db updates were still running in request context. This means that the merge could be successful but the db not be updated. This PR changes both these to run in the hammer context, this is not complete rollback protection but it's much better. Fix #21332 Signed-off-by: Andrew Thornton <art27@cantab.net> Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* add gitpod config (#20995)Anbraten2022-10-111-0/+34
| | | | | | | | | | | Add a config for <https://www.gitpod.io/>. This allows users to easily run an online IDE pre-configured to develop and test Gitea by opening <https://gitpod.io/#https://github.com/go-gitea/gitea>. [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/go-gitea/gitea) Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Remove cancel button in repo creation page (#21381)Yarden Shoham2022-10-111-1/+0
|
* Improve clarity for camo proxy parameters (#21386)Bill Wenrich2022-10-111-3/+3
| | | | | | | | | | Updates the Config Cheat Sheet for the `ALLWAYS` option in Camo proxy. - Clarifies the behavior for true (both HTTP and HTTPS is proxied) vs false (only HTTP is proxied) - Minor grammar and typo improvements Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Redirect to new repository owner (#21398)KN4CK3R2022-10-111-1/+10
| | | | | | | Fixes #17655 If you rename `user1` to `user2` and visit `/user1` you get redirected to `/user2`. But if you visit `/user1/repo` you just get a 404 error. With this PR the user is redirected to `/user2/repo`.
* Use ISO date format instead of hard-coded English date format for date range ↵Yarden Shoham2022-10-111-2/+2
| | | | | | | in repo activity page (#21396) January 2, 2006 -> 2006-01-02 Signed-off-by: Yarden Shoham <hrsi88@gmail.com>
* log real ip of requests from ssh (#21216)Lunny Xiao2022-10-112-2/+17
| | | | | | | | | | | Partially fix #21213. This PR will get client IP address from SSH_CONNECTION env which should be the first field of that. And deliver it to the internal API so Gitea routers could record the real IP from SSH requests. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
* Add Num{Issues,Pulls} stats checks (#21404)Gusted2022-10-111-1/+13
| | | | | | | | - Currently `repository.Num{Issues,Pulls}` weren't checked and could become out-of-consistency. Adds these two checks to `CheckRepoStats`. - Fix incorrect SQL query for `repository.NumClosedPulls`, the check should be for `repo_num_pulls`. - Reference: https://codeberg.org/Codeberg/Community/issues/696
* Add user/organization code search (#19977)Lauris BH2022-10-1119-145/+341
| | | | | | | Fixes #19925 Screenshots: ![attels](https://user-images.githubusercontent.com/165205/173864718-fe789429-55bc-4cad-808c-9f02f335cddf.png)
* Stop logging CheckPath returns error: context canceled (#21064)zeripath2022-10-102-4/+2
| | | | | | | | | | We should only log CheckPath errors if they are not simply due to context cancellation - and we should add a little more context to the error message. Fix #20709 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Hook go-licenses into tidy again (#21353)silverwind2022-10-103-19/+8
| | | | | | | | | Running it as part of the build is really unnecessary because we have a valid output file in the repo and assuming go dependencies do not change unless go.mod also changes, tidy really is the best target to run the license generation after. Also, regenerate the file as I missed to do so during the chroma update, and mark all json files in assets as generated.
* Fix missing left and right carets in TRANSLATORS (#21397)Yarden Shoham2022-10-101-1/+1
|
* Fix calls to i18n in templates (#21394)wxiaoguang2022-10-103-8/+8
| | | | | | | | | | | | Although the `.i18n` has been refactored to `.locale`, some PRs using `.i18n` were still merged. * #20219 * #21246 This PR fixes the calls to `.i18n`. At the moment, `{{.nosuch.nosuch "..."}}` won't cause template error so these mistakes don't cause 500 and haven't been found.
* Update JS dependencies and eslint config (#21388)silverwind2022-10-1010-1504/+1438
| | | | | | | | - Update all JS dependencies and playwright image - Add new eslint rules, enable a few more, fix issues - Regenerate SVGs - Tested Vue and Swagger Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Allow creation of OAuth2 applications for orgs (#18084)qwerty2872022-10-0915-235/+439
| | | | | | | | | | Adds the settings pages to create OAuth2 apps also to the org settings and allows to create apps for orgs. Refactoring: the oauth2 related templates are shared for instance-wide/org/user, and the backend code uses `OAuth2CommonHandlers` to share code for instance-wide/org/user. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix typos in PullRequestMergeForm.vue header comment (#21378)Yarden Shoham2022-10-091-2/+2
| | | Signed-off-by: Yarden Shoham <hrsi88@gmail.com>
* Use weighted algorithm for string matching when finding files in repo (#21370)wxiaoguang2022-10-086-66/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR is for: * https://github.com/go-gitea/gitea/issues/20231 Now, when a user searches `word`, they always see `/{word}.txt` before `/{w}e-g{o}t-{r}esult.{d}at` Demo: When searching "a", "a.ext" comes first. Then when searching "at", the longer matched "template" comes first. <details> ![image](https://user-images.githubusercontent.com/2114189/194588738-3644d891-956f-40e4-b79b-b97d34265456.png) ![image](https://user-images.githubusercontent.com/2114189/194588797-9b124670-4e1e-4510-a170-780295ed89b8.png) </details> This PR also makes the frontend tests could import feature JS files by introducing `jestSetup.js` Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: silverwind <me@silverwind.io>
* Bump playwright to 1.26.1 (#21357)Kyle D2022-10-083-17/+17
|
* npm package registry support for `bin` (#21372)eleith2022-10-085-1/+17
| | | | | | | | | | | | | | | | | | | | | Fix #21303 npm package.json supports binary packaging: https://docs.npmjs.com/cli/v8/configuring-npm/package-json#bin the npm registry documents that the binary references will be attached to the abbreviated version object: https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md#abbreviated-version-object unfortunately their api documentation leaves this out: https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md#abbreviated-version-objectdoc which is likely to be the reason this was left out in gitea's initial implementation this response is critical for npm to install the binary in the `.bin` folder so as to be included on the users default bin path, resulting in immediate access to any binaries provided by the package
* Removed one extra whitespace in footer after "Template" (#21364)Michael Horstmann2022-10-081-2/+1
|
* Fix formatted link for PR review notifications to matrix (#21319)Akshay Mankar2022-10-072-3/+3
| | | | | The PR review notifications HTML was written as markdown due to not using `MatrixLinkFormatter`.
* Show private data in feeds (#21369)KN4CK3R2022-10-071-1/+3
| | | Show private data in feeds for admins and matching users.
* Add nicer error handling on template compile errors (#21350)zeripath2022-10-073-1/+225
| | | | | | | | | | | There are repeated issues reported whereby users are unable to interpret the template errors. This PR adds some (somewhat complex) error handling to the panic recovery for template renderering but hopefully makes the interpretation of the error easier. Reference #21344 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix some typos and update db transaction demo in backend guideline (#21322)rj12022-10-081-18/+14
| | | Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor parseTreeEntries, speed up tree list (#21368)wxiaoguang2022-10-087-53/+109
| | | | | Close #20315 (fix the panic when parsing invalid input), Speed up #20231 (use ls-tree without size field) Introduce ListEntriesRecursiveFast (ls-tree without size) and ListEntriesRecursiveWithSize (ls-tree with size)
* Add GET and DELETE endpoints for Docker blob uploads (#21367)KN4CK3R2022-10-073-5/+92
| | | | | | | | | | This PR adds support for https://docs.docker.com/registry/spec/api/#get-blob-upload https://docs.docker.com/registry/spec/api/#delete-blob-upload Both are not required by the OCI spec but some clients call these endpoints. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* 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`