summaryrefslogtreecommitdiffstats
path: root/templates
Commit message (Collapse)AuthorAgeFilesLines
* Fix template error when comment review doesn't exist (#29888)wxiaoguang2024-03-194-194/+212
| | | Fix #29885
* Migrate border and margin classes to Tailwind (#29828)silverwind2024-03-189-13/+14
| | | | | | | Used all existing css vars, other migrations are 1:1. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix the wrong locale key of searching users (#29868)Nanguan Lin2024-03-171-1/+1
| | | | | regression of #29530 I guess it's because the user-blocking feature is committed after that locale clean PR.
* Refactor clone-panel styles (#29861)wxiaoguang2024-03-175-8/+8
| | | | | | | 1. The borders were doubled on the "empty" page, fix it. 2. Remove unnecessary CSS classes like "clone", "compact", etc 3. Use CSS class "clone-panel" instead of ID "clone-panel" 4. Use `tw-flex-1` instead of `gt-f1` 5. Remove unnecessary ID "more-btn"
* Fix `for` attribute not pointing to the ID of the color picker (#29813)Yarden Shoham2024-03-151-1/+1
| | | | | It didn't include the word picker. Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Improve repo search UI (#29767)wxiaoguang2024-03-154-24/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Introduce a special "flex-items-block" for menu items, to align the dropdown menu items 2. Simplify the "repo search" form 3. Add missing "TopicOnly" search option Screenshots: The old UI items don't align: <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/b965ac00-bad6-4d2f-9103-8841bd940aa5) </details> New UI (doesn't change much, but the items align) <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/a1add892-21dc-423b-90d5-5569faa3dced) ![image](https://github.com/go-gitea/gitea/assets/2114189/fb4040b2-96d8-4fb2-a0ed-760b9881fd86) </details> --------- Co-authored-by: silverwind <me@silverwind.io>
* Improve branch select list ui in go templates (#29729)HEREYUA2024-03-155-8/+13
| | | | | | | | | | | | | | | | | | Relate:[#27417](https://github.com/go-gitea/gitea/issues/27471) Reference: [#26631](https://github.com/go-gitea/gitea/pull/26631) Before ![image](https://github.com/go-gitea/gitea/assets/37935145/88ca8da5-25dd-4f60-bea8-a80107f19cc5) After ![image](https://github.com/go-gitea/gitea/assets/37935145/3cb180dc-1331-43e9-8633-be5e288401e8) --------- Co-authored-by: silverwind <me@silverwind.io>
* Fix Citation modal responsiveness and clipboard copy (#29799)silverwind2024-03-152-9/+7
| | | | | | | | | | The modal was broken in two ways: - On small screens, the input box was partially hanging outside the modal. Fixed with flexbox and increased modal width. - The clipboard copy was not working because the modal had both `data-clipboard-text` and `data-clipboard-target`, while we only support one of those. Made a small tweak in clipboard as well so that it will still fall back to target if text is empty.
* Add `<overflow-menu>`, rename webcomponents (#29400)silverwind2024-03-1532-134/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Add `<overflow-menu>` web component 2. Rename `<gitea-origin-url>` to `<origin-url>` and make filenames match. <img width="439" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/2fbe4ca4-110b-4ad2-8e17-c1e116ccbd74"> <img width="444" alt="Screenshot 2024-03-02 at 21 36 52" src="https://github.com/go-gitea/gitea/assets/115237/aa8f786e-dc8c-4030-b12d-7cfb74bdfd6e"> <img width="537" alt="Screenshot 2024-03-03 at 03 05 06" src="https://github.com/go-gitea/gitea/assets/115237/fddd50aa-adf1-4b4b-bd7f-caf30c7b2245"> ![image](https://github.com/go-gitea/gitea/assets/115237/0f43770c-834c-4a05-8e3d-d30eb8653786) ![image](https://github.com/go-gitea/gitea/assets/115237/4b4c6bd7-843f-4f49-808f-6b3aed5e9f9a) TODO: - [x] Check if removal of `requestAnimationFrame` is possible to avoid flash of content. Likely needs a `MutationObserver`. - [x] Hide tippy when button is removed from DOM. - [x] ~~Implement right-aligned items (https://github.com/go-gitea/gitea/pull/28976)~~. Not going to do it. - [x] Clean up CSS so base element has no background and add background via tailwind instead. - [x] Use it for org and user page. --------- Co-authored-by: Giteabot <teabot@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Unify search boxes (#29530)Denys Konovalov2024-03-1442-341/+294
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unify all but a few search boxes to use uniform style, uniform translations and shared templates where possible. Remove a few duplicated search templates, e. g. code search. <details><summary>Example after screenshots:</summary> ![grafik](https://github.com/go-gitea/gitea/assets/47871822/e20e7d6b-c6be-4a47-b132-672766f41421) ![grafik](https://github.com/go-gitea/gitea/assets/47871822/d5b11b9c-c12f-4a29-8fb0-24e5aa511d18) ![grafik](https://github.com/go-gitea/gitea/assets/47871822/d86bb444-36c7-426d-9cf1-c634963dffb1) ![grafik](https://github.com/go-gitea/gitea/assets/47871822/a76c0319-0518-484a-a840-563d02b61198) </details> Also includes #29700 Co-authored-by: 6543 <6543@obermui.de> --------- Co-authored-by: 6543 <m.huber@kithara.com> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io>
* Improve commit record's ui in comment list (#26619)yp053272024-03-141-8/+8
| | | | | | | | | | | | | | | | | Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/795f9941-9989-4045-b0fc-d6dd0262269b) ![image](https://github.com/go-gitea/gitea/assets/18380374/f6505f5e-4248-456e-a98d-e714c6484b2f) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/321dda1e-6999-4851-afff-2e6c8d20367b) ![image](https://github.com/go-gitea/gitea/assets/18380374/182f18d1-2295-4004-852b-c0ebb498b411) --------- Co-authored-by: silverwind <me@silverwind.io>
* Fix missing translation on milestons (#29785)Lunny Xiao2024-03-141-2/+2
| | | | Caused by #26569 Fix #29778
* Fix lint-swagger warning (#29787)sillyguodong2024-03-141-16/+1
| | | | | | | | | | | Caused by: #23106 Fix: https://github.com/go-gitea/gitea/actions/runs/8274650046/job/22640335697 1. Delete `UserBadgeList` in `options.go`, because it wasn't used. (The struct defined in `options.go` is the struct used to parse the request body) 2. Move `BadgeList` struct under `routers/api/v1/swagger` folder which response should be defined in.
* fix missed RenderLabel change in card template (#29772)65432024-03-131-1/+1
| | | | | | | regression of #29680 close #29770 PS: it would be nice to have a linter that is able to check template helpers ...
* Fix incorrect locale Tr for gpg command (#29754)wxiaoguang2024-03-131-2/+2
|
* Fix date rendering by adding `<gitea-absolute-date>` (#29725)silverwind2024-03-121-0/+10
| | | | | | | | | | | | | Alternative to: https://github.com/go-gitea/gitea/pull/29698 Fixes: https://github.com/go-gitea/gitea/issues/29034 <img width="278" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/12ecd967-2723-410d-8a28-a1b0f41b7bba"> It also fixes a secondary issue that we were showing timestamp tooltips over date, which makes no sense, so these are now gone as well: <img width="284" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/a70432f3-97b6-41e6-b202-b53b76924a66">
* Highlight archived labels (#29680)65432024-03-127-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | the issue is, that you can not distinguish between normal and archived labels. So this will make archived labels 80% **grayscale**. And prepend "Archived: " to the tooltip info ![image](https://github.com/go-gitea/gitea/assets/24977596/fd77c4d2-eff5-4afd-9bfa-19cb9991c5e7) ![image](https://github.com/go-gitea/gitea/assets/24977596/2e0f30e5-f301-4c9c-8e9f-677298d90b27) ![image](https://github.com/go-gitea/gitea/assets/24977596/53d70abf-b306-453d-aa95-a3a035b19a33) ![image](https://github.com/go-gitea/gitea/assets/24977596/6020e5f5-2364-4807-979f-37dffa8735e5) --- *Sponsored by Kithara Software GmbH* --------- Co-authored-by: delvh <dev.lh@web.de>
* remove repetitive words (#29695)pengqiseven2024-03-111-1/+1
| | | Signed-off-by: pengqiseven <912170095@qq.com>
* Fix action runner offline label padding (#29691)Chongyi Zheng2024-03-091-1/+1
| | | | | | | | | | | | | | Before: The `offline` padding is `calc(.833em - 1px)` from `basic` CSS class, but `idle` padding is `6px`. <img width="1035" alt="image" src="https://github.com/go-gitea/gitea/assets/37034805/ccb42615-20d7-4032-a805-40cd9643012d"> After: <img width="1035" alt="image" src="https://github.com/go-gitea/gitea/assets/37034805/d6af99c8-76cb-4850-96d6-5289b06e1ca8">
* Replace more gt- with tw- (#29678)silverwind2024-03-086-16/+16
| | | This will conclude the trivial class replacements.
* Filter for default-branch selection (#29388)Tim-Niclas Oelschläger2024-03-081-1/+1
| | | | | | | | | | | | | | | Filter for default-branch selection (fixes #4751) before: ![image](https://github.com/go-gitea/gitea/assets/72873130/dcae266d-2e04-41bf-8739-64a85c9007f6) after: ![image](https://github.com/go-gitea/gitea/assets/72873130/5f27c0a7-1d30-4ccd-b4bb-6c34fff1b79f) --------- Co-authored-by: silverwind <me@silverwind.io>
* Store webhook event in database (#29145)oliverpool2024-03-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor the webhook logic, to have the type-dependent processing happen only in one place. --- ## Current webhook flow 1. An event happens 2. It is pre-processed (depending on the webhook type) and its body is added to a task queue 3. When the task is processed, some more logic (depending on the webhook type as well) is applied to make an HTTP request This means that webhook-type dependant logic is needed in step 2 and 3. This is cumbersome and brittle to maintain. Updated webhook flow with this PR: 1. An event happens 2. It is stored as-is and added to a task queue 3. When the task is processed, the event is processed (depending on the webhook type) to make an HTTP request So the only webhook-type dependent logic happens in one place (step 3) which should be much more robust. ## Consequences of the refactor - the raw event must be stored in the hooktask (until now, the pre-processed body was stored) - to ensure that previous hooktasks are correctly sent, a `payload_version` is added (version 1: the body has already been pre-process / version 2: the body is the raw event) So future webhook additions will only have to deal with creating an http.Request based on the raw event (no need to adjust the code in multiple places, like currently). Moreover since this processing happens when fetching from the task queue, it ensures that the queuing of new events (upon a `git push` for instance) does not get slowed down by a slow webhook. As a concrete example, the PR #19307 for custom webhooks, should be substantially smaller: - no need to change `services/webhook/deliver.go` - minimal change in `services/webhook/webhook.go` (add the new webhook to the map) - no need to change all the individual webhook files (since with this refactor the `*webhook_model.Webhook` is provided as argument)
* Remove jQuery AJAX from the repo editor (#29636)Yarden Shoham2024-03-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Preview Tab - Removed the jQuery AJAX call and replaced with our fetch wrapper - Tested the preview tab functionality and it works as before # Diff Tab - Removed the jQuery AJAX call and replaced with htmx - Tested the diff tab functionality and it works as before ## htmx Attributes - `hx-post="{{.RepoLink}}..."`: make a POST request to the endpoint - `hx-indicator=".tab[data-tab='diff']"`: attach the loading indicator to the tab body - `hx-target=".tab[data-tab='diff']"`: target the tab body for swapping with the response - `hx-swap="innerHTML"`: swap the target's inner HTML - `hx-include="#edit_area"`: include the value of the textarea (content) in the request body - `hx-vals='{"context":"{{.BranchLink}}"}'`: include the context in the request body - `hx-params="context,content"`: include only these keys in the request body # Demo using `fetch` and `htmx` instead of jQuery AJAX ![demo](https://github.com/go-gitea/gitea/assets/20454870/585cd6e8-f329-4c9e-ab53-a540acbd7988) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io>
* Move all login and account creation page labels to be above inputs (#29432)Rafael Heard2024-03-0612-49/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a few inconsistencies within Gitea and this PR addresses one of them. This PR updates the sign-in page layout, including the register and openID tabs, to match the layout of the settings pages (/user/settings) for more consistency. This PR updates the following routes: `/user/login` `/user/sign_up` `/user/login/openid` `/user/forgot_password` `/user/link_account` `/user/recover_account` **Before** <img width="968" alt="Screenshot 2024-02-05 at 8 27 24 AM" src="https://github.com/go-gitea/gitea/assets/6152817/fb0cb517-57c0-4eed-be1d-56f36bd1960d"> **After** <img width="968" alt="Screenshot 2024-02-05 at 8 26 39 AM" src="https://github.com/go-gitea/gitea/assets/6152817/428d691d-0a42-4a67-a646-05527f2a7b41"> This PR addresses a revert of the original PR due to this [comment](https://github.com/go-gitea/gitea/pull/28753#issuecomment-1956596817). --------- Co-authored-by: rafh <rafaelheard@gmail.com>
* Add a link for the recently pushed branch notification (#29627)wxiaoguang2024-03-061-1/+2
|
* Fix wrong header of org project view page (#29626)yp053272024-03-061-13/+15
| | | | | | | | | | | | | Follow #29248 The project view page still using `user/overview/header.tmpl` Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/9cb638a3-7cc6-4efa-979a-e2592007fd12) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/62b0b2ea-8cb0-459f-b27a-bad3908eb1c0)
* Fix wrong line number in code search result (#29260)yp053272024-03-063-28/+16
| | | | | | | | | | | Fix #29136 Before: The result is a table and all line numbers are all in one row. After: Use a separate table column for the line numbers. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Make wiki default branch name changable (#29603)wxiaoguang2024-03-063-3/+7
| | | | | | | | | Fix #29000 Fix #28685 Fix #18568 Related: #27497 And by the way fix #24036, add a Cancel button there (one line)
* Replace more `gt-` with `tw-`, update frontend docs (#29595)silverwind2024-03-0517-35/+35
| | | | | | | | Tested a few things, all working fine. Not sure if the chinese machine translation is good. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Remove unnecessary ctxData for "attachments" template (#29600)wxiaoguang2024-03-054-5/+5
| | | The "attachments" template never uses it
* Fix projects mode bugs (#29593)Denys Konovalov2024-03-041-6/+6
| | | | | | | | | Fix for regressions introduced by #28805 Enabled projects on repos created before the PR weren't detected. Also, the way projects mode was detected in settings didn't match the way it was detected on permission check, which leads to confusion. Co-authored-by: Giteabot <teabot@gitea.io>
* Add aria-label to the navbar menu button (#29587)wxiaoguang2024-03-041-1/+1
|
* Make admin pages wider because of left sidebar added and some tables become ↵Lunny Xiao2024-03-041-1/+1
| | | | | | | | | | too narrow (#29581) Fix #25939 screenshots <img width="1895" alt="image" src="https://github.com/go-gitea/gitea/assets/81045/937eb28d-bb7d-4765-b580-bc991d61f467">
* Refactor star/watch button (#29576)wxiaoguang2024-03-042-14/+12
| | | | 1. Use "star/unstart", but not `{{if}}un{{}}star{{}}` (the same to "watch/unwatch") 2. Use "not-mobile" for hiding the elements on mobile
* Remove unnecessary SanitizeHTML from code (#29575)wxiaoguang2024-03-043-3/+3
| | | | | | * "mail/issue/default.tmpl": the body is rendered by backend `markdown.RenderString() HTML`, it has been already sanitized * "repo/settings/webhook/base_list.tmpl": "Description" is prepared by backend `ctx.Tr`, it doesn't need to be sanitized
* Fix incorrect package link method calls in templates (#29580)wxiaoguang2024-03-045-5/+5
| | | | Fix #29562 Follow #29531
* Add user blocking (#29028)KN4CK3R2024-03-0411-19/+460
| | | | | | | | | | | | | | | | | | | | | | Fixes #17453 This PR adds the abbility to block a user from a personal account or organization to restrict how the blocked user can interact with the blocker. The docs explain what's the consequence of blocking a user. Screenshots: ![grafik](https://github.com/go-gitea/gitea/assets/1666336/4ed884f3-e06a-4862-afd3-3b8aa2488dc6) ![grafik](https://github.com/go-gitea/gitea/assets/1666336/ae6d4981-f252-4f50-a429-04f0f9f1cdf1) ![grafik](https://github.com/go-gitea/gitea/assets/1666336/ca153599-5b0f-4b4a-90fe-18bdfd6f0b6b) --------- Co-authored-by: Lauris BH <lauris@nix.lv>
* Allow options to disable user ssh keys configuration from the interface on ↵Lunny Xiao2024-03-041-1/+3
| | | | | | | | | | | app.ini (#29447) Follow #29275 Extract from #20549 Fix #24716 --------- Co-authored-by: delvh <dev.lh@web.de>
* Replace some `gt-` classes with `tw-` (#29570)silverwind2024-03-0437-47/+47
| | | | Replace 18 `gt-` prefixes with `tw-` with perl replacement. I manually checked them all with `rg` afterwards.
* Enable/disable owner and repo projects independently (#28805)Denys Konovalov2024-03-043-2/+44
| | | | | | | | | | | | | | | Part of #23318 Add menu in repo settings to allow for repo admin to decide not just if projects are enabled or disabled per repo, but also which kind of projects (repo-level/owner-level) are enabled. If repo projects disabled, don't show the projects tab. ![grafik](https://github.com/go-gitea/gitea/assets/47871822/b9b43fb4-824b-47f9-b8e2-12004313647c) --------- Co-authored-by: delvh <dev.lh@web.de>
* Add an trailing slash to dashboard links (#29555)wxiaoguang2024-03-041-6/+8
| | | Fix #29533, and add some tests for "base/paginate.tmpl"
* Extend issue template yaml engine (#29274)65432024-03-046-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new option: `visible`: witch can hide a specific field of the form or the created content afterwards It is a string array witch can contain `form` and `content`. If only `form` is present, it wont show up in the created issue afterwards and the other way around. By default it sets both except for markdown As they are optional and github don't have any similar thing, it is non breaking and also do not conflict with it. With this you can: - define "post issue creation" elements like a TODO list to track an issue state - make sure to have a checkbox that reminds the user to check for a thing but dont have it in the created issue afterwards - define markdown for the created issue (was the downside of using yaml instead of md in the past) - ... ## Demo ```yaml name: New Contribution description: External Contributor creating a pull body: - type: checkboxes id: extern-todo visible: [form] attributes: label: Contribution Guidelines options: - label: I checked there exist no similar feature to be extended required: true - label: I did read the CONTRIBUTION.MD required: true - type: checkboxes id: intern-todo visible: [content] attributes: label: Maintainer Check-List options: - label: Does this pull follow the KISS principe - label: Checked if internal bord was notifyed # .... ``` [Demo Video](https://cloud.obermui.de/s/tm34fSAbJp9qw9z/download/vid-20240220-152751.mkv) --- *Sponsored by Kithara Software GmbH* --------- Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: delvh <dev.lh@web.de>
* Filter Repositories by type (#29231)Tim-Niclas Oelschläger2024-03-038-77/+73
| | | | | | | | | | | | | Filter Repositories by type (resolves #1170, #1318) before: ![image](https://github.com/go-gitea/gitea/assets/72873130/74e6be62-9010-4ab4-8f9b-bd8afbebb8fb) after: ![image](https://github.com/go-gitea/gitea/assets/72873130/e4d85ed6-7864-4150-8d72-5194dac1293f)
* Breaking summary for template refactoring (#29395)wxiaoguang2024-03-031-1/+1
| | | https://github.com/go-gitea/gitea/pull/29395
* Add option to set language in admin user view (#28449)65432024-03-022-0/+23
| | | | | | | | | | | ![image](https://github.com/go-gitea/gitea/assets/24977596/be7e3f92-af3f-4628-b4ed-abf6439687f3) `/admin/users/<UserID>/edit` ![image](https://github.com/go-gitea/gitea/assets/24977596/906af0dd-cceb-4ed9-9cd9-32c71ae1bf71) `/admin/users/<UserID>` --- *Sponsored by Kithara Software GmbH*
* Fix elipsis button not working if the last commit loading is deferred (#29544)Yarden Shoham2024-03-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, if we had more than 200 entries being deferred in loading, the entire table would get replaced thus losing any event listeners attached to the elements within the table, such as the elipsis button and commit list with tippy. With this change we remove the previous javascript code that replaced the table and use htmx to replace the table. htmx attributes added: - `hx-indicator="tr.notready td.message span"`: attach the loading spinner to the files whose last commit is still being loaded - `hx-trigger="load"` trigger the request-replace behavior as soon as possible - `hx-swap="morph"`: use the idiomorph morphing algorithm, this is the thing that makes it so the elipsis button event listener is kept during the replacement, fixing the bug because we don't actually replace the table, only modifying it - `hx-post="{{.LastCommitLoaderURL}}"`: make a post request to this url to get the table with all of the commit information As part of this change I removed the handling of partial replacement in the case we have less than 200 "not ready" files. The first reason is that I couldn't make htmx replace only a subset of returned elements, the second reason is that we have a cache implemented in the backend already so the only cost added is that we query the cache a few times (which is sure to be populated due to the initial request), and the last reason is that since the last refactor of this functionality that removed jQuery we don't properly send the "not ready" entries as the backend expects `FormData` with `f[]` and we send a JSON with `f` so we always query for all rows anyway. # Before ![before](https://github.com/go-gitea/gitea/assets/20454870/482ebfec-66c5-40cc-9c1e-e3b3bfe1bbc1) # After ![after](https://github.com/go-gitea/gitea/assets/20454870/454c517e-3a4e-4006-a49f-99cc56e0fd60) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add support for API blob upload of release attachments (#29507)KN4CK3R2024-03-021-3/+3
| | | | | | | | | | | | Fixes #29502 Our endpoint is not Github compatible. https://docs.github.com/en/rest/releases/assets?apiVersion=2022-11-28#upload-a-release-asset --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Rename Action.GetDisplayName to GetActDisplayName (#29540)wxiaoguang2024-03-021-1/+1
| | | | | | To avoid conflicting with User.GetDisplayName, because there is no data type in template. And it matches other methods like GetActFullName / GetActUserName
* Fix a bug returning 404 when display a single tag with no release (#29466)Lunny Xiao2024-03-022-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Partially caused by #29149 When use ```go releases, err := getReleaseInfos(ctx, &repo_model.FindReleasesOptions{ ListOptions: db.ListOptions{Page: 1, PageSize: 1}, RepoID: ctx.Repo.Repository.ID, TagNames: []string{ctx.Params("*")}, // only show draft releases for users who can write, read-only users shouldn't see draft releases. IncludeDrafts: writeAccess, }) ``` replace ```go release, err := repo_model.GetRelease(ctx, ctx.Repo.Repository.ID, ctx.Params("*")) ``` It missed `IncludeTags: true,`. That means this bug will be occupied only when the release is a tag. This PR will fix - Get the right tag record when it's not a release - Display correct tag tab but not release tag when it's a tag. - The button will bring the tag name to the new page when it's a single tag page - the new page will automatically hide the release target inputbox when the tag name is pre filled. This should be backport to v1.21.
* Fix incorrect redirection when creating a PR fails (#29537)wxiaoguang2024-03-023-21/+3
| | | | | | | | | | | This is only a quick fix to make it easier to backport. After this PR gets merged, I will propose a new PR to fix the FIXME. <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/98d1d5c4-2e79-4a75-80e9-76fd898986e0) </details>