summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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">
* [skip ci] Updated licenses and gitignoreswxiaoguang2022-09-251-0/+9
|
* Use en-US as fallback when using other default language (#21200)wxiaoguang2022-09-254-12/+36
| | | | | | | | | | | | | Only en-US has complete translations. When use other language as default, the en-US should still be used as fallback. Close #21199 ### Screenshot ![image](https://user-images.githubusercontent.com/2114189/190882906-b7a83958-0ea2-46c4-9084-42c4f9a239aa.png) Co-authored-by: Lauris BH <lauris@nix.lv>
* Make NuGet service index publicly accessible (#21242)KN4CK3R2022-09-242-56/+78
| | | | | | | | | | | | Addition to #20734, Fixes #20717 The `/index.json` endpoint needs to be accessible even if the registry is private. The NuGet client uses this endpoint without authentification. The old fix only works if the NuGet cli is used with `--source <name>` but not with `--source <url>/index.json`. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Save files in local storage as umask (#21198)Nulo (he/him)2022-09-244-0/+84
| | | | | | | | Go creates temporary files as 600, but sometimes we want the group to be able to read them (for example, for another user to back up the storage) This PR applies the umask to the renamed tmp files in local storage. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* NPM Package Registry search API endpoint (#20280)Jack Vine2022-09-246-0/+134
| | | | | | | | | | Close #20098, in the NPM registry API, implemented to match what's described by https://github.com/npm/registry/blob/master/docs/REGISTRY-API.md#get-v1search Currently have only implemented the bare minimum to work with the [Unity Package Manager](https://docs.unity3d.com/Manual/upm-ui.html). Co-authored-by: Jack Vine <jackv@jack-lemur-suse.cat-prometheus.ts.net> Co-authored-by: KN4CK3R <admin@oldschoolhack.me> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* [skip ci] Updated translations via CrowdinTyrone Yeh2022-09-243-0/+15
|
* Added search input field to issue filter (#20623)Tyrone Yeh2022-09-232-0/+20
| | | | | Added search input field to issue filter for label and milestone and assignee Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Various CSS tweaks (#21244)silverwind2022-09-225-99/+61
| | | | | | - Remove arc-green specific rules and instead fix the colors in the base rules. - Make file table row border visible on arc-green. - Remove remnants of fomantic accordeon module that was removed.
* [skip ci] Updated translations via CrowdinKN4CK3R2022-09-231-0/+1319
|
* Use absolute links in feeds (#21229)KN4CK3R2022-09-213-34/+43
| | | | | | fixes #20864 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Prevent invalid behavior for file reviewing when loading more files (#21230)delvh2022-09-224-15/+29
| | | | | | | | | | | | | | The problem was that many PR review components loaded by `Show more` received the same ID as previous batches, which confuses browsers (when clicked). All such occurrences should now be fixed. Additionally improved the background of the `viewed` checkbox. Lastly, the `go-licenses.json` was automatically updated. Fixes #21228. Fixes #20681. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Respect `REQUIRE_SIGNIN_VIEW` for packages (#20873)KN4CK3R2022-09-212-33/+62
| | | | | | | | Fix #20863 When REQUIRE_SIGNIN_VIEW = true, even with public repositories, you can only see them after you login. The packages should not be accessed without login. Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Make Clone in VSCode link get updated correctly (#21225)wxiaoguang2022-09-211-1/+1
| | | | | | Follow #20557, fix #21224 The `clone_script` will update `.js-clone-url` and related elements, so it should be put after these elements.
* Configure golangci-lint to show all issues (#21106)silverwind2022-09-201-1/+3
| | | | | | | | golangci by default [limits](https://golangci-lint.run/usage/configuration/#issues-configuration) "same issues" to 3 which can be hindering when many issues are present. Change it to always show all issues. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix user visible check (#21210)KN4CK3R2022-09-209-5/+109
| | | | | | | | | | Fixes #21206 If user and viewer are equal the method should return true. Also the common organization check was wrong as `count` can never be less then 0. Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix template bug of admin monitor (#21208)Lunny Xiao2022-09-191-1/+1
| | | | | Fix #21207 Co-authored-by: Lauris BH <lauris@nix.lv>
* Clarify that `ENABLE_SWAGGER` only influences the API docs, not the routes ↵delvh2022-09-204-10/+10
| | | | | | | (#21215) Previously, the docs seemed to suggest that you can disable the API completely by setting `ENABLE_SWAGGER=false`. This is not the case.
* Enable fluid page layout on medium size viewports (#21178)silverwind2022-09-191-0/+7
| | | | | Fomantic has abrupt breakpoints at 991px and 768px which leads to variable amounts of wasted screen space below those breakpoints. Instead, enable fluid width for all viewport sizes below 1200px.
* [API] teamSearch show teams with no members if user is admin (#21204)65432022-09-196-24/+48
| | | close #21176
* Fix typo (#21201)naoki kuroda2022-09-181-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) --> I fixed typo.
* Remove unnecessary length check for repo's Description & Website (#21194)wxiaoguang2022-09-181-8/+0
| | | | | | | | | Follows #21119 The manual length check doesn't make sense nowadays: 1. The length check is already done by form's `binding:MaxSize` (then the manual check is unnecessary) 2. The CreateRepository doesn't have such check (then the manual check is inconsistent) So this PR removes these manual length checks.
* Treat git object mode 40755 as directory (#21195)wxiaoguang2022-09-181-2/+2
| | | | | | | Git uses 040000 for tree object, but some users may get 040755 for unknown reasons Try to fix #21190 * #21190
* Fix reaction of issues (#21185)Jason Song2022-09-171-4/+15
| | | | | | | | | | | Fix #20860. `CommentID` in `FindReactionsOptions` should be -1 to search reactions with zero comment id. https://github.com/go-gitea/gitea/blob/8351172b6e5221290dc5b2c81e159e2eec0b43c8/models/issues/reaction.go#L108-L121 Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix CSV diff for added/deleted files (#21189)KN4CK3R2022-09-173-20/+20
| | | | | | | | Fixes #21184 Regression of #19552 Instead of using `GetBlobByPath` I use the already existing instances. We need more information from #19530 if that error is still present.
* Show label description in comments section (#21156)JakobDev2022-09-161-5/+5
| | | The labels in the comment section are currently missing the description that all other labels have.
* Limit length of repo description and repo url input fields (#21119)JakobDev2022-09-163-11/+11
| | | | | | Both allow only limited characters. If you input more, you will get a error message. So it make sense to limit the characters of the input fields. Slightly relax the MaxSize of repo's Description and Website
* [skip ci] Updated translations via Crowdinsilverwind2022-09-161-0/+1
|
* File header tweaks (#21175)silverwind2022-09-151-5/+2
| | | | | | | | | | | | - Remove non-matching selector - Set font-size on parent so `.mono` can correctly reduce it Before (font subjectively too big): <img width="1270" alt="Screenshot 2022-09-15 at 19 03 56" src="https://user-images.githubusercontent.com/115237/190466867-283e9c23-cbfa-457e-8dbe-94902e886cc7.png"> After: <img width="1266" alt="image" src="https://user-images.githubusercontent.com/115237/190467290-eb392007-5db2-4ab0-a5be-e7cfe4618dcc.png">
* Keep path when creating a new branch (#21153)JakobDev2022-09-153-1/+5
| | | | | If you are create a new new branch while viewing file or directory, you get redirected to the root of the repo. With this PR, you keep your current path instead of getting redirected to the repo root.
* Display image digest for container packages (#21170)KN4CK3R2022-09-142-0/+5
| | | fixes #21160
* Use correct branch for .editorconfig error (#21152)JakobDev2022-09-141-1/+1
| | | | | | | In #21088 I accidentally forgot to support multiple branches. It always checks the default branch, no matter on which branch you are working on. With this fix, it always shows the error from the current branch. Sorry for that.
* Passing command line arguments correctly by string slice (#21168)wxiaoguang2022-09-142-17/+13
| | | | | | | | Using `append(args, strings.Fields(arg)...)` is dangerous, it may generate incorrect results. For example: `arg1 "the dangerous"` will be splitted to 3 arguments: `arg1`, `"the`, `dangerous"`. In some cases the incorrect arguments may lead to security problems.