aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Issue Templates: add option to have dropdown printed list (#31577)65432024-07-142-6/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue template dropdown can have many entries, and it could be better to have them rendered as list later on if multi-select is enabled. so this adds an option to the issue template engine to do so. DOCS: https://gitea.com/gitea/docs/pulls/19 --- ## demo: ```yaml name: Name title: Title about: About labels: ["label1", "label2"] ref: Ref body: - type: dropdown id: id6 attributes: label: Label of dropdown (list) description: Description of dropdown multiple: true list: true options: - Option 1 of dropdown - Option 2 of dropdown - Option 3 of dropdown - Option 4 of dropdown - Option 5 of dropdown - Option 6 of dropdown - Option 7 of dropdown - Option 8 of dropdown - Option 9 of dropdown ``` ![image](https://github.com/user-attachments/assets/102ed0f4-89da-420b-ab2a-1788b59676f9) ![image](https://github.com/user-attachments/assets/a2bdb14e-43ff-4cc6-9bbe-20244830453c) --- *Sponsored by Kithara Software GmbH*
* Fix update flake (#31626)65432024-07-122-3/+4
|
* [skip ci] Updated translations via CrowdinGiteaBot2024-07-1227-27/+0
|
* Display app name in the registration email title (#31562)Sunny Wan2024-07-112-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | I changed the title of the registation email from "Welcome to Gitea" to "Welcome to (appname)". I did this by substituting 'Gitea' in register_notify to %s and formating the registration title in mail.go. I changed this for all the languages I could, but I struggled to changed the translation file for Farsi. I have attached the screenshots of before and after and the related issue below. Related issue: https://github.com/go-gitea/gitea/issues/31108 Before change: ![Screenshot from 2024-07-04 22-32-17](https://github.com/go-gitea/gitea/assets/94445569/4178b51c-1acc-45f4-9750-dff41564a709) After: ![Screenshot from 2024-07-04 22-32-01](https://github.com/go-gitea/gitea/assets/94445569/9cd7a58d-c0f5-4a3c-a66c-805c55411eaa) --------- Signed-off-by: Sunny Wan <Sunnywan2020@gmail.com> Co-authored-by: 6543 <6543@obermui.de>
* typo on date in security document (#31617)techknowlogick2024-07-111-1/+1
|
* Update JS dependencies (#31616)silverwind2024-07-119-856/+1907
| | | | Result of `make update-js`. Tested all dependencies. Lockfile diff is because of https://github.com/npm/cli/pull/7475.
* Add types for js globals (#31586)silverwind2024-07-114-4/+48
| | | | Adds types for `window.config` and jQuery/htmx globals, eliminating 48 `tsc` errors.
* Upgrade security public key (#31594)Lunny Xiao2024-07-101-29/+29
| | | Fix #31591
* Fix wrong merge on removing docs (#31605)Lunny Xiao2024-07-101-1475/+0
|
* Refactor webhook (#31587)wxiaoguang2024-07-1018-182/+173
| | | | | | A more complete fix for #31588 1. Make "generic" code more readable 2. Clarify HTML or Markdown for the payload content
* Fix: Allow org team names of length 255 in create team form (#31564)Tobias Balle-Petersen2024-07-101-1/+1
| | | | | | | | | | | | | Gitea 1.22.1 was supposed to allow for team names of length 255 (up from 30) after the following PR was merged in: https://github.com/go-gitea/gitea/pull/31410. However, the length of team names was still limited to 30 as described in this issue: https://github.com/go-gitea/gitea/issues/31554. One more change to _gitea_ needs to be made to allow for the longer team names, as there is a 30 character limit here: https://github.com/go-gitea/gitea/blob/2c92c7c5226e29636a1d47a277130f477fa2037b/services/forms/org.go#L65 This PR changes that value to 255.
* Remove docs sub folder since docs has been moved to ↵Lunny Xiao2024-07-10233-26078/+3
| | | | https://gitea.com/gitea/docs (#31536)
* Add bohde as maintainer (#31601)Kyle D2024-07-101-0/+1
| | | | | [4 merged PRs](https://github.com/go-gitea/gitea/pulls?q=is%3Apr+author%3Abohde+is%3Aclosed) ✅
* Add `YEAR`, `MONTH`, `MONTH_ENGLISH`, `DAY` variables for template repos ↵delvh2024-07-091-0/+6
| | | | | (#31584) Fixes #31583
* Allow disabling authentication related user features (#31535)Rowan Bohde2024-07-0921-17/+586
| | | | | | | | | | | | | | | | | | | | We have some instances that only allow using an external authentication source for authentication. In this case, users changing their email, password, or linked OpenID connections will not have any effect, and we'd like to prevent showing that to them to prevent confusion. Included in this are several changes to support this: * A new setting to disable user managed authentication credentials (email, password & OpenID connections) * A new setting to disable user managed MFA (2FA codes & WebAuthn) * Fix an issue where some templates had separate logic for determining if a feature was disabled since it didn't check the globally disabled features * Hide more user setting pages in the navbar when their settings aren't enabled --------- Co-authored-by: Kyle D <kdumontnu@gmail.com>
* Add back esbuild-loader for .js files (#31585)silverwind2024-07-091-0/+13
| | | | | | | | | | The build currently seems to work fine without this, but in theory it should fail because Fomantic is JavaScript. I feel more comfortable having this loader declared. Note: I did try using the [combined loader config](https://github.com/privatenumber/esbuild-loader#-quick-setup) but when I did that, vue files could not load, so I think this is the best option.
* Use FullName in Emails to address the recipient if possible (#31527)65432024-07-085-13/+66
| | | | | | | | Before we had just the plain mail address as recipient. But now we provide additional Information for the Mail clients. --- *Sponsored by Kithara Software GmbH*
* Don't show hidden labels when filling out an issue template (#31576)65432024-07-081-1/+1
| | | | | | | Related to #31574 --- *Sponsored by Kithara Software GmbH*
* [skip ci] Updated translations via CrowdinGiteaBot2024-07-081-0/+27
|
* Convert frontend code to typescript (#31559)silverwind2024-07-07168-387/+563
| | | | | | | | | | | None of the frontend js/ts files was touched besides these two commands (edit: no longer true, I touched one file in https://github.com/go-gitea/gitea/pull/31559/commits/61105d0618e285d97e95044bfb64415f364a4526 because of a deprecation that was not showing before the rename). `tsc` currently reports 778 errors, so I have disabled it in CI as planned. Everything appears to work fine.
* [skip ci] Updated translations via CrowdinGiteaBot2024-07-071-2/+36
|
* [skip ci] Updated translations via CrowdinGiteaBot2024-07-0627-342/+0
|
* Allow force push to protected branches (#28086)Henry Goodman2024-07-0514-101/+528
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #22722 ### Problem Currently, it is not possible to force push to a branch with branch protection rules in place. There are often times where this is necessary (CI workflows/administrative tasks etc). The current workaround is to rename/remove the branch protection, perform the force push, and then reinstate the protections. ### Solution Provide an additional section in the branch protection rules to allow users to specify which users with push access can also force push to the branch. The default value of the rule will be set to `Disabled`, and the UI is intuitive and very similar to the `Push` section. It is worth noting in this implementation that allowing force push does not override regular push access, and both will need to be enabled for a user to force push. This applies to manual force push to a remote, and also in Gitea UI updating a PR by rebase (which requires force push) This modifies the `BranchProtection` API structs to add: - `enable_force_push bool` - `enable_force_push_whitelist bool` - `force_push_whitelist_usernames string[]` - `force_push_whitelist_teams string[]` - `force_push_whitelist_deploy_keys bool` ### Updated Branch Protection UI: <img width="943" alt="image" src="https://github.com/go-gitea/gitea/assets/79623665/7491899c-d816-45d5-be84-8512abd156bf"> ### Pull Request `Update branch by Rebase` option enabled with source branch `test` being a protected branch: ![image](https://github.com/go-gitea/gitea/assets/79623665/e018e6e9-b7b2-4bd3-808e-4947d7da35cc) <img width="1038" alt="image" src="https://github.com/go-gitea/gitea/assets/79623665/57ead13e-9006-459f-b83c-7079e6f4c654"> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor login page (#31530)Anbraten2024-07-0510-153/+166
| | | | | | | | | | | | | | | | | | | | | | | | | As requested in https://github.com/go-gitea/gitea/pull/31504#issuecomment-2196196646. This PR refactor the login page: ![Screenshot from 2024-07-04 19-23-10](https://github.com/go-gitea/gitea/assets/6918444/c45700f4-6747-473c-bdee-2156718a7953) ![Screenshot from 2024-07-04 19-23-21](https://github.com/go-gitea/gitea/assets/6918444/b1bf71cf-85f9-4517-a409-cc6d72e6af8f) ![Screenshot from 2024-06-30 09-35-20](https://github.com/go-gitea/gitea/assets/6918444/728cc37e-0cca-4883-afec-a43663d2c666) # Changes - [x] use separate box for passkey login and go to registration - [x] move forgot passoword next to password label - [x] fix password required label `*` and padding - [x] remove tabs from login page --------- Co-authored-by: silverwind <me@silverwind.io>
* Fix slow patch checking with commits that add or remove many files (#31548)Brecht Van Lommel2024-07-042-16/+48
| | | | | | | | | | | | | Running git update-index for every individual file is slow, so add and remove everything with a single git command. When such a big commit lands in the default branch, it could cause PR creation and patch checking for all open PRs to be slow, or time out entirely. For example, a commit that removes 1383 files was measured to take more than 60 seconds and timed out. With this change checking took about a second. This is related to #27967, though this will not help with commits that change many lines in few files.
* Add typescript guideline and typescript-specific eslint plugins and fix ↵silverwind2024-07-0311-151/+226
| | | | | | | | issues (#31521) 1. Add some general guidelines how to write our typescript code 2. Add `@typescript-eslint/eslint-plugin`, general typescript rules 3. Add `eslint-plugin-deprecation` to detect deprecated code 4. Fix all new lint issues that came up
* Update `golang.org/x/image` to v0.18.0 (#31541)silverwind2024-07-022-3/+3
| | | | | Result of `go get -u golang.org/x/image && make tidy` Fixes: https://github.com/go-gitea/gitea/security/dependabot/67
* [skip ci] Updated translations via CrowdinGiteaBot2024-07-011-0/+1
|
* Fix markdown preview $$ support (#31514)charles2024-06-296-6/+79
| | | | | | | | | | | | | | | | | | | | | | close #31481 currently `$$A + B$$ test` will ignore text after $$ block test text ![圖片](https://github.com/go-gitea/gitea/assets/30816317/39b2974b-c0b6-48a0-87d0-5f4a13615eed) before fix ![圖片](https://github.com/go-gitea/gitea/assets/30816317/15469e4c-474d-4128-b46f-d6cadaafbd68) after fix ![圖片](https://github.com/go-gitea/gitea/assets/30816317/c1025eef-177f-4ade-988f-510e7039f3f9) github display ![圖片](https://github.com/go-gitea/gitea/assets/30816317/97cd1e10-ac94-4899-86d8-8e359ef1d694)
* Add Passkey login support (#31504)Anbraten2024-06-298-11/+184
| | | | | | | | | | | | | | | | closes #22015 After adding a passkey, you can now simply login with it directly by clicking `Sign in with a passkey`. ![Screenshot from 2024-06-26 12-18-17](https://github.com/go-gitea/gitea/assets/6918444/079013c0-ed70-481c-8497-4427344bcdfc) Note for testing. You need to run gitea using `https` to get the full passkeys experience. --------- Co-authored-by: silverwind <me@silverwind.io>
* Use stable version of fabric (#31526)silverwind2024-06-291-1/+1
| | | | | Fabric 6 is [now stable](https://github.com/fabricjs/fabric.js/releases/tag/v6.0.0-rc5), use it.
* Always use HTML attributes for avatar size (#31509)silverwind2024-06-2810-59/+11
| | | | | | | | | | Many avatars were rendered in HTML with certain width/height but then resized again in CSS. This was pointless so I removed all these cases and made the HTML size match the previous render size. Also did a few CSS cleanups in the tribute rendering: <img width="648" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/cb2fafb3-5e20-46e9-814f-07df20038beb">
* Add initial typescript config and use it for eslint,vitest,playwright (#31186)silverwind2024-06-2815-66/+249
| | | | | | | | | | | | | | | | | | | | This enables eslint to use the typescript parser and resolver which brings some benefits that eslint rules now have type information available and a tsconfig.json is required for the upcoming typescript migration as well. Notable changes done: - Add typescript parser and resolver - Move the vue-specific config into the root file - Enable `vue-scoped-css/enforce-style-type` rule, there was only one violation and I added a inline disable there. - Fix new lint errors that were detected because of the parser change - Update `i/no-unresolved` to remove now-unnecessary workaround for the resolver - Disable `i/no-named-as-default` as it seems to raise bogus issues in the webpack config - Change vitest config to typescript - Change playwright config to typescript - Add `eslint-plugin-playwright` and fix issues - Add `tsc` linting to `make lint-js`
* Support legacy _links LFS batch responses (#31513)Royce Remer2024-06-283-0/+21
| | | | | | | | | | | | | | | | | | | | | Support legacy _links LFS batch response. Fixes #31512. This is backwards-compatible change to the LFS client so that, upon mirroring from an upstream which has a batch api, it can download objects whether the responses contain the `_links` field or its successor the `actions` field. When Gitea must fallback to the legacy `_links` field a logline is emitted at INFO level which looks like this: ``` ...s/lfs/http_client.go:188:performOperation() [I] <LFSPointer ee95d0a27ccdfc7c12516d4f80dcf144a5eaf10d0461d282a7206390635cdbee:160> is using a deprecated batch schema response! ``` I've only run `test-backend` with this code, but added a new test to cover this case. Additionally I have a fork with this change deployed which I've confirmed syncs LFS from Gitea<-Artifactory (which has legacy `_links`) as well as from Gitea<-Gitea (which has the modern `actions`). Signed-off-by: Royce Remer <royceremer@gmail.com>
* Fix JS error with disabled attachment and easymde (#31511)silverwind2024-06-281-1/+3
| | | | | | Not sure if this is a regression from https://github.com/go-gitea/gitea/pull/30513, but when attachments are disabled, `this.dropzone` is null and the code had failed in `initEasyMDEPaste` trying to access `dropzoneEl.dropzone`.
* Fix avatar radius problem on the new issue page (#31506)charles2024-06-271-1/+1
| | | | | | | | | | | | | | | Close #31502 Related to #31419. In this PR, the avatar width is set to 3em, but the height is not set, so the image is not squared. When object-fit is set to contain, it can't maintain the radius of the image. Result: ![圖片](https://github.com/go-gitea/gitea/assets/30816317/bceb98aa-b0f7-4753-bc8b-3b9c41dfd55a)
* Make toast support preventDuplicates (#31501)wxiaoguang2024-06-278-39/+86
| | | | | | | | | | make preventDuplicates default to true, users get a clear UI feedback and know that "a new message appears". Fixes: https://github.com/go-gitea/gitea/issues/26651 --------- Co-authored-by: silverwind <me@silverwind.io>
* Improve attachment upload methods (#30513)Tyrone Yeh2024-06-2710-99/+171
| | | | | | | | | | | | * Use dropzone to handle file uploading for all cases, including pasting and dragging * Merge duplicate code, use consistent behavior for link generating Close #20130 --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor issue label selection (#31497)wxiaoguang2024-06-262-30/+26
| | | Follow #26460
* Refactor dropzone (#31482)wxiaoguang2024-06-278-184/+184
| | | Refactor the legacy code and remove some jQuery calls.
* [skip ci] Updated translations via CrowdinGiteaBot2024-06-261-1/+1
|
* Optimization of labels handling in issue_search (#26460)Chl2024-06-253-9/+59
| | | | | | | | This PR enhances the labels handling in issue_search by optimizing the SQL query and de-duplicate the IDs when generating the query string. --------- Co-authored-by: techknowlogick <techknowlogick@gitea.com>
* use correct l10n string (#31487)CyberFlame2024-06-251-1/+1
| | | | | | | | Uses the correct string for searching - this is what it looks like prior to the change: ![image](https://github.com/go-gitea/gitea/assets/24910512/38519825-c347-44d6-85d4-6fa3c71ddb7c) (observe how the top box has "Search teams" even though collaborator would be user
* Fix overflow menu flickering on mobile (#31484)Brecht Van Lommel2024-06-251-0/+4
| | | | | | The overflow menu button was incorrectly included in the measurement of the width of the items. As a result, it could get stuck in a loop alternating between different measurements as the button appears and disappears.
* [skip ci] Updated translations via CrowdinGiteaBot2024-06-251-5/+5
|
* Fix poor table column width due to breaking words (#31473)Brecht Van Lommel2024-06-241-1/+5
| | | | | | | Caused by #31091 --------- Co-authored-by: silverwind <me@silverwind.io>
* bump golang deps (#31422)techknowlogick2024-06-245-218/+217
|
* Disable issue/PR comment button given empty input (#31463)Kemal Zebari2024-06-232-13/+18
| | | | | | | | | | | Given an empty issue/PR comment, the comment history would not be updated if the user were to submit it. Therefore, it would make since to just disable the comment button when the text editor is empty. This is inline with what GitHub does when given empty text editor input. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Simplify 404/500 page (#31409)wxiaoguang2024-06-237-19/+39
|
* Fix web notification icon not updated once you read all notifications (#31447)kiatt2102024-06-231-4/+5
| | | | | | | | | Fix #29065 Remove status filtering from GetUIDsAndNotificationCounts sql. --------- Co-authored-by: kiatt210 <kiatt210@github.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>