鲁汀 
							
						 
					 
					
						
						
							
						
						b029ad431b 
					 
					
						
						
							
							Fix code tag style problem and LFS view bug ( #35628 )  
						
						... 
						
						
						
						Fix  #35567 
---------
Signed-off-by: 鲁汀 <131967983+lutinglt@users.noreply.github.com >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com > 
					
						2025-10-12 02:38:42 +08:00 
						 
				 
			
				
					
						
							
							
								Kausthubh J Rao 
							
						 
					 
					
						
						
							
						
						c4532101a4 
					 
					
						
						
							
							fix(webhook): prevent tag events from bypassing branch filters targets  #35449  ( #35567 )  
						
						... 
						
						
						
						Tag creation/deletion was triggering push webhooks even when branch
filters were configured, causing unintended pipeline executions.
This change modifies the branch filter logic to check the full ref
name directly instead of first determining if it's a "branch" event.
Fixes: Tag events now properly respect branch filters
- Add getPayloadRef() function to extract full ref names
- Update PrepareWebhook() to use direct ref matching
- Prevents refs/tags/* from matching refs/heads/* filters
Closes  #35449 
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
Co-authored-by: silverwind <me@silverwind.io > 
						
						
					 
					
						2025-10-03 08:51:57 +02:00 
						 
				 
			
				
					
						
							
							
								wxiaoguang 
							
						 
					 
					
						
						
							
						
						e0745eb14d 
					 
					
						
						
							
							Refactor webhook and fix feishu/lark secret ( #34961 )  
						
						
						
						
					 
					
						2025-07-06 06:04:08 +00:00 
						 
				 
			
				
					
						
							
							
								wxiaoguang 
							
						 
					 
					
						
						
							
						
						6033c67a1a 
					 
					
						
						
							
							Refactor some trivial problems ( #34959 )  
						
						... 
						
						
						
						1. make our "route group pattern match" also update chi's RoutePattern
2. fix incorrect "NotFound" call in conda package
3. make ".flex-item .flex-item-main" has a general gap, then no need to
use `tw` tricks
4. improve the "test webhook" UI 
						
						
					 
					
						2025-07-05 23:19:33 +08:00 
						 
				 
			
				
					
						
							
							
								wxiaoguang 
							
						 
					 
					
						
						
							
						
						327048c106 
					 
					
						
						
							
							Refactor template helper ( #34819 )  
						
						... 
						
						
						
						FIx abuses and remove unused code
---------
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com >
Co-authored-by: silverwind <me@silverwind.io > 
						
						
					 
					
						2025-06-24 01:27:35 +08:00 
						 
				 
			
				
					
						
							
							
								ChristopherHX 
							
						 
					 
					
						
						
							
						
						cda90eca31 
					 
					
						
						
							
							Add workflow_run api + webhook ( #33964 )  
						
						... 
						
						
						
						Implements 
- https://docs.github.com/en/rest/actions/workflow-jobs?apiVersion=2022-11-28#list-jobs-for-a-workflow-run--code-samples 
- https://docs.github.com/en/rest/actions/workflow-jobs?apiVersion=2022-11-28#get-a-job-for-a-workflow-run--code-samples 
- https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#list-workflow-runs-for-a-repository 
- https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#get-a-workflow-run 
  - `/actions/runs` for global + user + org (Gitea only)
  - `/actions/jobs` for global + user + org + repository (Gitea only)
  - workflow_run webhook + action trigger
    - limitations
- workflow id is assigned to a string, this may result into problems in
strongly typed clients
Fixes
- workflow_job webhook url to no longer contain the `runs/<run>` part to
align with api
- workflow instance does now use it's name inside the file instead of
filename if set
Refactoring
- Moved a lot of logic from workflows/workflow_job into a shared module
used by both webhook and api
TODO
- [x] Verify Keda Compatibility
- [x] Edit Webhook API bug is resolved
 
Closes https://github.com/go-gitea/gitea/issues/23670 
Closes https://github.com/go-gitea/gitea/issues/23796 
Closes https://github.com/go-gitea/gitea/issues/24898 
Replaces https://github.com/go-gitea/gitea/pull/28047  and is much more
complete
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com > 
						
						
					 
					
						2025-06-20 20:14:00 +08:00 
						 
				 
			
				
					
						
							
							
								wxiaoguang 
							
						 
					 
					
						
						
							
						
						ee6929d96b 
					 
					
						
						
							
							Refactor dropdown ellipsis ( #34123 )  
						
						... 
						
						
						
						Remove legacy `truncated-item-container` and `truncated-item-name`. 
						
						
					 
					
						2025-04-05 03:21:11 +00:00 
						 
				 
			
				
					
						
							
							
								ChristopherHX 
							
						 
					 
					
						
						
							
						
						651ef66966 
					 
					
						
						
							
							Add workflow_job webhook ( #33694 )  
						
						... 
						
						
						
						Provide external Integration information about the Queue lossly based on
https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=completed#workflow_job 
Naming conflicts between GitHub & Gitea are here, Blocked => Waiting,
Waiting => Queued
Rationale Enhancement for ephemeral runners management #33570  
						
						
					 
					
						2025-03-11 10:40:38 -07:00 
						 
				 
			
				
					
						
							
							
								Lunny Xiao 
							
						 
					 
					
						
						
							
						
						a4676db7dd 
					 
					
						
						
							
							Fix commit status events ( #33320 )  
						
						... 
						
						
						
						Fix  #32873  
Fix  #33201  
~Fix #33244~
~Fix #33302~
depends on ~#33396~
A part of this PR should be backported to v1.23 manually. 
					
						2025-02-04 03:25:59 +00:00 
						 
				 
			
				
					
						
							
							
								Lunny Xiao 
							
						 
					 
					
						
						
							
						
						e94f37f95e 
					 
					
						
						
							
							Refactor webhook events ( #33337 )  
						
						... 
						
						
						
						Extract from #33320 
This PR uses a map instead of a struct to store webhook event
information. It removes many duplicated functions and makes the logic
clearer. 
						
						
					 
					
						2025-01-23 18:53:06 +00:00 
						 
				 
			
				
					
						
							
							
								wxiaoguang 
							
						 
					 
					
						
						
							
						
						b068dbd40e 
					 
					
						
						
							
							Refactor DateUtils and merge TimeSince ( #32409 )  
						
						... 
						
						
						
						Follow #32383  and #32402  
						
						
					 
					
						2024-11-04 11:30:00 +00:00 
						 
				 
			
				
					
						
							
							
								Denys Konovalov 
							
						 
					 
					
						
						
							
						
						83f37f6302 
					 
					
						
						
							
							Remove urls from translations ( #31950 )  
						
						... 
						
						
						
						Part of #27700 
Removes all URLs from translation strings to easy up changing them in
the future and to exclude people injecting malicious URLs through
translations. First measure as long as #24402  is out of scope. 
						
						
					 
					
						2024-09-02 18:36:24 +00:00 
						 
				 
			
				
					
						
							
							
								silverwind 
							
						 
					 
					
						
						
							
						
						6e140b58dd 
					 
					
						
						
							
							Prevent tab shifting, remove extra margin on fluid pages ( #31090 )  
						
						... 
						
						
						
						1. Extend concept of https://github.com/go-gitea/gitea/pull/29831  to all
tabular menus, there were only three left that weren't already
`<overflow-menu>`.
<img width="634" alt="Screenshot 2024-05-27 at 00 42 16"
src="https://github.com/go-gitea/gitea/assets/115237/d9a7e219-d05e-40a1-9e93-777f9a8a90dd ">
<img width="965" alt="Screenshot 2024-05-27 at 00 29 32"
src="https://github.com/go-gitea/gitea/assets/115237/e6ed71b1-11fb-4a74-9adb-af4524286cff ">
2. Remove extra padding on `fluid padded` container like for example PR
diff view. The page margin is already correctly sized via
`.ui.container`, so this was just extraneous padding that looked ugly.
Before:
<img width="1351" alt="Screenshot 2024-05-27 at 00 45 11"
src="https://github.com/go-gitea/gitea/assets/115237/4b45fd11-b1b2-4fbb-a618-26eb22be9472 ">
After:
<img width="1344" alt="Screenshot 2024-05-27 at 00 45 22"
src="https://github.com/go-gitea/gitea/assets/115237/d09593eb-6c7f-45e7-85b6-f0050047004b ">
3. Replace `gt-word-break` with `tw-break-anywhere` in issue-title,
fixing overflow.
Before:
<img width="1333" alt="Screenshot 2024-05-27 at 00 50 14"
src="https://github.com/go-gitea/gitea/assets/115237/64d15d04-b456-401e-a972-df636965f0eb ">
After:
<img width="1316" alt="Screenshot 2024-05-27 at 00 50 26"
src="https://github.com/go-gitea/gitea/assets/115237/ed1ce830-1408-414b-8263-eeaf773f52c8 "> 
						
						
					 
					
						2024-05-27 06:45:16 +00:00 
						 
				 
			
				
					
						
							
							
								silverwind 
							
						 
					 
					
						
						
							
						
						9946353282 
					 
					
						
						
							
							Remove fomantic button module ( #30475 )  
						
						... 
						
						
						
						CSS-only module. Button colors are reduced to this:
<img width="639" alt="Screenshot 2024-04-14 at 15 36 07"
src="https://github.com/go-gitea/gitea/assets/115237/882d6c02-d1de-44f2-b707-db02a9f5070d ">
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com > 
						
						
					 
					
						2024-04-14 17:53:52 +00:00 
						 
				 
			
				
					
						
							
							
								silverwind 
							
						 
					 
					
						
						
							
						
						ec3d467f15 
					 
					
						
						
							
							Migrate gt-hidden to tw-hidden ( #30046 )  
						
						... 
						
						
						
						We have to define this one in helpers.css because tailwind only
generates a single class but certain things rely on this being
double-class. Command ran:
```sh
perl -p -i -e 's#gt-hidden#tw-hidden#g' web_src/js/**/* templates/**/* models/**/* web_src/css/**/*
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com > 
						
						
					 
					
						2024-03-24 18:23:38 +00:00 
						 
				 
			
				
					
						
							
							
								silverwind 
							
						 
					 
					
						
						
							
						
						68ec9b4859 
					 
					
						
						
							
							Migrate margin and padding helpers to tailwind ( #30043 )  
						
						... 
						
						
						
						This will conclude the refactor of 1:1 class replacements to tailwind,
except `gt-hidden`. Commands ran:
```bash
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-0#tw-$1$2-0#g'   {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-1#tw-$1$2-0.5#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-2#tw-$1$2-1#g'   {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-3#tw-$1$2-2#g'   {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-4#tw-$1$2-4#g'   {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-5#tw-$1$2-8#g'   {web_src/js,templates,routers,services}/**/*
``` 
						
						
					 
					
						2024-03-24 17:42:49 +01:00 
						 
				 
			
				
					
						
							
							
								silverwind 
							
						 
					 
					
						
						
							
						
						f88ad5424f 
					 
					
						
						
							
							Replace 10 more gt- classes with tw- ( #29945 )  
						
						... 
						
						
						
						Likely the biggest change of the tailwind refactors. Only thing of note
is that `tw-flex-1` resolves to `flex: 1 1 0%` while our `gt-f1` was
`flex: 1 1 0`, I don't think it will make any difference. Commands I've
ran:
```sh
perl -p -i -e 's#gt-vm#tw-align-middle#g' web_src/js/**/* templates/**/* models/**/*
perl -p -i -e 's#gt-fw#tw-flex-wrap#g' web_src/js/**/* templates/**/* models/**/*
perl -p -i -e 's#gt-f1#tw-flex-1#g' web_src/js/**/* templates/**/* models/**/*
perl -p -i -e 's#gt-fc#tw-flex-col#g' web_src/js/**/* templates/**/* models/**/*
perl -p -i -e 's#gt-sb#tw-justify-between#g' web_src/js/**/* templates/**/* models/**/*
perl -p -i -e 's#gt-je#tw-justify-end#g' web_src/js/**/* templates/**/* models/**/*
perl -p -i -e 's#gt-jc#tw-justify-center#g' web_src/js/**/* templates/**/* models/**/*
perl -p -i -e 's#gt-ac#tw-content-center#g' web_src/js/**/* templates/**/* models/**/* tests/**/*
perl -p -i -e 's#gt-df#tw-flex#g' web_src/js/**/* templates/**/* models/**/* tests/**/*
perl -p -i -e 's#gt-dib#tw-inline-block#g' web_src/js/**/* templates/**/* models/**/* tests/**/*
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com > 
						
						
					 
					
						2024-03-22 13:45:10 +00:00 
						 
				 
			
				
					
						
							
							
								silverwind 
							
						 
					 
					
						
						
							
						
						d6fed9ab88 
					 
					
						
						
							
							Fix various loading states, remove .loading class ( #29920 )  
						
						... 
						
						
						
						Various code was using fomantic `loading` class which I think got broken
a while ago and rendered only a full circle. Fix those to use
`is-loading`.
Before:
<img width="295" alt="Screenshot 2024-03-19 at 22 56 26"
src="https://github.com/go-gitea/gitea/assets/115237/dbe83395-5db4-4868-90bc-3613866a35f0 ">
After:
<img width="60" alt="Screenshot 2024-03-19 at 22 54 35"
src="https://github.com/go-gitea/gitea/assets/115237/8ac19b7e-035a-4c6d-850b-53a234ef69c2 ">
<img width="294" alt="Screenshot 2024-03-19 at 22 54 56"
src="https://github.com/go-gitea/gitea/assets/115237/34e819d7-25f7-43a1-9d48-4a68dcd2b6ad ">
<img width="320" alt="Screenshot 2024-03-19 at 22 55 16"
src="https://github.com/go-gitea/gitea/assets/115237/05127544-47ff-4e18-9fd8-c84e44c374f8 ">
<img width="153" alt="Screenshot 2024-03-19 at 23 01 43"
src="https://github.com/go-gitea/gitea/assets/115237/a33248c6-b11d-40ff-82d8-f5a3d85b55aa ">
<img width="1300" alt="Screenshot 2024-03-19 at 23 56 25"
src="https://github.com/go-gitea/gitea/assets/115237/562ca876-b5d5-4295-961e-9d2cdab31ab0 ">
<img width="136" alt="Screenshot 2024-03-20 at 00 00 38"
src="https://github.com/go-gitea/gitea/assets/115237/44838ac4-67f3-4fec-a8e3-978cc5dbdb72 "> 
						
						
					 
					
						2024-03-21 16:31:15 +00:00 
						 
				 
			
				
					
						
							
							
								oliverpool 
							
						 
					 
					
						
						
							
						
						26653b196b 
					 
					
						
						
							
							Store webhook event in database ( #29145 )  
						
						... 
						
						
						
						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) 
						
						
					 
					
						2024-03-07 23:18:38 +01:00 
						 
				 
			
				
					
						
							
							
								wxiaoguang 
							
						 
					 
					
						
						
							
						
						dae7f1ebdb 
					 
					
						
						
							
							Remove unnecessary SanitizeHTML from code ( #29575 )  
						
						... 
						
						
						
						* "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 
						
						
					 
					
						2024-03-04 12:02:45 +00:00 
						 
				 
			
				
					
						
							
							
								wxiaoguang 
							
						 
					 
					
						
						
							
						
						fb42972c05 
					 
					
						
						
							
							Rename Str2html to SanitizeHTML and clarify its behavior ( #29516 )  
						
						... 
						
						
						
						Str2html was abused a lot. So use a proper name for it: SanitizeHTML
And add some tests to show its behavior. 
						
						
					 
					
						2024-03-01 10:16:19 +00:00 
						 
				 
			
				
					
						
							
							
								wxiaoguang 
							
						 
					 
					
						
						
							
						
						f9207b0947 
					 
					
						
						
							
							Refactor Safe modifier ( #29392 )  
						
						... 
						
						
						
						After this PR: no need to play with the Safe/Escape tricks anymore. See
the changes for more details. 
						
						
					 
					
						2024-02-25 10:45:56 +00:00 
						 
				 
			
				
					
						
							
							
								wxiaoguang 
							
						 
					 
					
						
						
							
						
						c9d0e63c20 
					 
					
						
						
							
							Remove unnecessary "Str2html" modifier from templates ( #29319 )  
						
						... 
						
						
						
						Follow #29165  
						
						
					 
					
						2024-02-22 18:05:47 +00:00 
						 
				 
			
				
					
						
							
							
								wxiaoguang 
							
						 
					 
					
						
						
							
						
						a784ed3d6c 
					 
					
						
						
							
							Use "Safe" modifier for manually constructed safe HTML strings in templates ( #29227 )  
						
						... 
						
						
						
						Follow #29165 . These HTML strings are safe to be rendered directly, to
avoid double-escaping. 
						
						
					 
					
						2024-02-18 01:48:59 +00:00 
						 
				 
			
				
					
						
							
							
								Yarden Shoham 
							
						 
					 
					
						
						
							
						
						0157db84b1 
					 
					
						
						
							
							Fix label for pointing to a name instead of id in webhook settings ( #29209 )  
						
						... 
						
						
						
						Here's the spec for the `for` attribute:
https://html.spec.whatwg.org/multipage/forms.html#attr-label-for 
Signed-off-by: Yarden Shoham <git@yardenshoham.com > 
						
						
					 
					
						2024-02-17 14:32:43 +00:00 
						 
				 
			
				
					
						
							
							
								Tim-Nicas Oelschläger 
							
						 
					 
					
						
						
							
						
						374e886f51 
					 
					
						
						
							
							Change webhook-type in create-view ( #29114 )  
						
						... 
						
						
						
						It's now possible to change webhook-type in create-view.
before:

after:

---------
Co-authored-by: silverwind <me@silverwind.io >
Co-authored-by: Giteabot <teabot@gitea.io > 
						
						
					 
					
						2024-02-15 14:59:48 +01:00 
						 
				 
			
				
					
						
							
							
								wxiaoguang 
							
						 
					 
					
						
						
							
						
						93bd4351bf 
					 
					
						
						
							
							Fix more "locale" usages ( #27259 )  
						
						
						
						
					 
					
						2023-09-25 20:42:40 +08:00 
						 
				 
			
				
					
						
							
							
								delvh 
							
						 
					 
					
						
						
							
						
						7960ba7e2b 
					 
					
						
						
							
							Always use ctx.Locale.Tr inside templates ( #27231 )  
						
						
						
						
					 
					
						2023-09-25 08:56:50 +00:00 
						 
				 
			
				
					
						
							
							
								Yarden Shoham 
							
						 
					 
					
						
						
							
						
						e6d8b14620 
					 
					
						
						
							
							Disable Test Delivery and Replay webhook buttons when webhook is inactive ( #27211 )  
						
						... 
						
						
						
						These buttons are now disabled when the webhook is not active.
The buttons were always enabled before this change.
- Fixes  #26824 
- Replaces #26814 
# Before


# After


Signed-off-by: Yarden Shoham <git@yardenshoham.com > 
						
						
					 
					
						2023-09-25 07:33:00 +00:00 
						 
				 
			
				
					
						
							
							
								silverwind 
							
						 
					 
					
						
						
							
						
						8099238618 
					 
					
						
						
							
							Change green buttons to primary color ( #27099 )  
						
						... 
						
						
						
						I think it's better if the primary actions have primary color instead of
green which fits better into the overall single-color UI design. This PR
currently replaces every green button with primary:
<img width="141" alt="Screenshot 2023-09-16 at 14 07 59"
src="https://github.com/go-gitea/gitea/assets/115237/843c1e50-4fb2-4ec6-84ba-0efb9472dcbe ">
<img width="161" alt="Screenshot 2023-09-16 at 14 07 51"
src="https://github.com/go-gitea/gitea/assets/115237/9442195a-a3b2-4a42-b262-8377d6f5c0d1 ">
Modal actions now use uncolored/primary instead of previous green/red
colors. I also removed the box-shadow on all basic buttons:
<img width="259" alt="Screenshot 2023-09-16 at 14 16 39"
src="https://github.com/go-gitea/gitea/assets/115237/5beea529-127a-44b0-8d4c-afa7b034a490 ">
<img width="261" alt="Screenshot 2023-09-16 at 14 17 42"
src="https://github.com/go-gitea/gitea/assets/115237/4757f7b2-4d46-49bc-a797-38bb28437b88 ">
The change currently includes the "Merge PR" button, for which we might
want to make an exception to match the icon color there:
<img width="442" alt="Screenshot 2023-09-16 at 14 33 53"
src="https://github.com/go-gitea/gitea/assets/115237/993ac1a5-c94d-4895-b76c-0d872181a70b "> 
						
						
					 
					
						2023-09-18 22:05:31 +00:00 
						 
				 
			
				
					
						
							
							
								Kerwin Bryant 
							
						 
					 
					
						
						
							
						
						a38eca3f52 
					 
					
						
						
							
							Fix Fomantic's line-height causing vertical scrollbars to appear ( #26961 )  
						
						... 
						
						
						
						Before:

After:

---  
1. **Remove the scroll bar exception that in the a tag**  
2. **Reduce the actual width of the a tag to the actual width of the
content**

As shown in the screenshot, the red box area should not be clickable 
						
						
					 
					
						2023-09-13 09:08:45 +00:00 
						 
				 
			
				
					
						
							
							
								Kerwin Bryant 
							
						 
					 
					
						
						
							
						
						9b0743ae33 
					 
					
						
						
							
							Extract common code to new template ( #26933 )  
						
						... 
						
						
						
						Same as #26903  
						
						
					 
					
						2023-09-06 10:11:06 +00:00 
						 
				 
			
				
					
						
							
							
								Kerwin Bryant 
							
						 
					 
					
						
						
							
						
						65588b732c 
					 
					
						
						
							
							Extract common code to new template ( #26903 )  
						
						... 
						
						
						
						I noticed that the code of several new webhook pages is highly
repetitive, so I pulled out the common parts to a new template, unified
reference, unified maintenance
---------
Co-authored-by: KN4CK3R <admin@oldschoolhack.me > 
						
						
					 
					
						2023-09-05 12:00:28 +00:00 
						 
				 
			
				
					
						
							
							
								wxiaoguang 
							
						 
					 
					
						
						
							
						
						19a1e1b20e 
					 
					
						
						
							
							Remove polluted .ui.right ( #26825 )  
						
						... 
						
						
						
						Each change is tested manually line by line. There are too many changes
so I can't share dozens of screenshots.
In short:
1. `ui right` could be still used in `ui top attached header`, because
there is a special case.
2. A lot of `ui right` are just no-op, so they can be removed safely.
3. Some of the `ui right` should be replaced by `gt-float-right` (to
avoid breaking, leave them to the future).
4. A few of the `ui right` could be rewritten by flex. 
						
						
					 
					
						2023-08-31 02:29:59 +00:00 
						 
				 
			
				
					
						
							
							
								Lunny Xiao 
							
						 
					 
					
						
						
							
						
						476b9d1589 
					 
					
						
						
							
							Use docs.gitea.com instead of docs.gitea.io ( #26739 )  
						
						
						
						
					 
					
						2023-08-27 11:59:12 +00:00 
						 
				 
			
				
					
						
							
							
								wxiaoguang 
							
						 
					 
					
						
						
							
						
						4fdb09de58 
					 
					
						
						
							
							Fix incorrect "tabindex" attributes ( #26733 )  
						
						... 
						
						
						
						Fix  #26731 
Almost all "tabindex" in code are incorrect.
1. All "input/button" by default are focusable, so no need to use "tabindex=0"
2. All "div/span" by default are not focusable, so no need to use "tabindex=-1"
3. All "dropdown" are focusable by framework, so no need to use "tabindex"
4. Some tabindex values are incorrect (eg: `new_form.tmpl`), so remove them
Co-authored-by: Giteabot <teabot@gitea.io > 
					
						2023-08-26 10:44:00 +08:00 
						 
				 
			
				
					
						
							
							
								Earl Warren 
							
						 
					 
					
						
						
							
						
						50fc22eecf 
					 
					
						
						
							
							Add ThreadID parameter for Telegram webhooks ( #25996 )  
						
						... 
						
						
						
						Telegram has recently implemented threads (channels) for group chats.
Co-authored-by: neveraskedtoexist <matikot415@gmail.com > 
						
						
					 
					
						2023-08-13 14:00:06 +00:00 
						 
				 
			
				
					
						
							
							
								silverwind 
							
						 
					 
					
						
						
							
						
						72363be7ca 
					 
					
						
						
							
							Use shared template for webhook icons ( #26242 )  
						
						... 
						
						
						
						Fixes: https://github.com/go-gitea/gitea/issues/26241  
						
						
					 
					
						2023-07-31 08:00:52 +00:00 
						 
				 
			
				
					
						
							
							
								silverwind 
							
						 
					 
					
						
						
							
						
						64f2d70262 
					 
					
						
						
							
							Replace fomantic divider module with our own ( #25539 )  
						
						... 
						
						
						
						Should look exactly like before for normal dividers. "Horizontal" ones
look better because they no longer use image backgrounds.
<img width="917" alt="Screenshot 2023-06-27 at 19 07 56"
src="https://github.com/go-gitea/gitea/assets/115237/d97d8dec-6859-44a8-85ba-e4549b4dd9df ">
<img width="914" alt="Screenshot 2023-06-27 at 19 05 58"
src="https://github.com/go-gitea/gitea/assets/115237/8bf98544-2d82-4ebf-ac68-d6dc237bd6b2 ">
<img width="1246" alt="Screenshot 2023-06-27 at 19 00 42"
src="https://github.com/go-gitea/gitea/assets/115237/36a6bb21-6029-4f53-8bee-535f55c66fed ">
<img width="344" alt="Screenshot 2023-06-27 at 18 58 15"
src="https://github.com/go-gitea/gitea/assets/115237/a9e70aee-8e6b-4ea1-9e93-19c9f96aec6e ">
<img width="823" alt="Screenshot 2023-06-27 at 18 56 22"
src="https://github.com/go-gitea/gitea/assets/115237/e7a497cd-f262-4683-8872-23c3c8cce32f ">
<img width="330" alt="Screenshot 2023-06-27 at 19 21 11"
src="https://github.com/go-gitea/gitea/assets/115237/42f24149-a655-4c7e-bd26-8ab52db6446b "> 
						
						
					 
					
						2023-06-29 20:24:22 +08:00 
						 
				 
			
				
					
						
							
							
								silverwind 
							
						 
					 
					
						
						
							
						
						e24f651c86 
					 
					
						
						
							
							Add template linting via djlint ( #25212 )  
						
						... 
						
						
						
						So I found this [linter](https://github.com/Riverside-Healthcare/djlint )
which features a mode for go templates, so I gave it a try and it did
find a number of valid issue, like unbalanced tags etc. It also has a
number of bugs, I had to disable/workaround many issues.
Given that this linter is written in python, this does add a dependency
on `python` >= 3.8 and `poetry` to the development environment to be
able to run this linter locally.
- `e.g.` prefixes on placeholders are removed because the linter had a
false-positive on `placeholder="e.g. cn=Search"` for the `attr=value`
syntax and it's not ideal anyways to write `e.g.` into a placeholder
because a placeholder is meant to hold a sample value.
- In `templates/repo/settings/options.tmpl` I simplified the logic to
not conditionally create opening tags without closing tags because this
stuff confuses the linter (and possibly the reader as well). 
						
						
					 
					
						2023-06-14 18:17:58 +00:00 
						 
				 
			
				
					
						
							
							
								谈笑风生间 
							
						 
					 
					
						
						
							
						
						309354c70e 
					 
					
						
						
							
							New webhook trigger for receiving Pull Request review requests ( #24481 )  
						
						... 
						
						
						
						close https://github.com/go-gitea/gitea/issues/16321 
Provided a webhook trigger for requesting someone to review the Pull
Request.
Some modifications have been made to the returned `PullRequestPayload`
based on the GitHub webhook settings, including:
- add a description of the current reviewer object as
`RequestedReviewer` .
- setting the action to either **review_requested** or
**review_request_removed** based on the operation.
- adding the `RequestedReviewers` field to the issues_model.PullRequest.
This field will be loaded into the PullRequest through
`LoadRequestedReviewers()` when `ToAPIPullRequest` is called.
After the Pull Request is merged, I will supplement the relevant
documentation. 
						
						
					 
					
						2023-05-24 22:06:27 -04:00 
						 
				 
			
				
					
						
							
							
								yp05327 
							
						 
					 
					
						
						
							
						
						dbb3736785 
					 
					
						
						
							
							Fix incorrect webhook time and use relative-time to display it ( #24477 )  
						
						... 
						
						
						
						Fixes  #24414 
After click replay this webhook, it will display `now`

---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
Co-authored-by: Giteabot <teabot@gitea.io > 
					
						2023-05-03 19:53:43 -04:00 
						 
				 
			
				
					
						
							
							
								yp05327 
							
						 
					 
					
						
						
							
						
						bcdd3c30af 
					 
					
						
						
							
							Fix test delivery button in repo webhook settings page ( #24478 )  
						
						... 
						
						
						
						Caused by
https://github.com/go-gitea/gitea/pull/24246/files#diff-2bfe41d93dbb409583a4f945902e46bb513f60f1c9301649c1689200c4f1466eR1 
Class `new` was removed in #24246 , but in function
`initCompWebHookEditor`, it will check `.new.webhook`.
So in repo webhook settings page, `initCompWebHookEditor` will init
nothing, and no response after click the test delivery button.
da65b7ad47/web_src/js/features/comp/WebHookEditor.js (L6-L9)teabot@gitea.io > 
						
						
					 
					
						2023-05-02 21:58:18 +02:00 
						 
				 
			
				
					
						
							
							
								silverwind 
							
						 
					 
					
						
						
							
						
						d6f8238492 
					 
					
						
						
							
							Replace N/A with - everywhere ( #24474 )  
						
						... 
						
						
						
						Followup to https://github.com/go-gitea/gitea/pull/24427 .
Reasoning is that `N/A` is specific to english while `-` is
language-neutral and does not need translation.
Before:
<img width="891" alt="Screenshot 2023-05-01 at 20 58 20"
src="https://user-images.githubusercontent.com/115237/235511592-8a36d0f2-34ff-4dbe-b642-67c0ade644fe.png ">
After:
<img width="901" alt="Screenshot 2023-05-01 at 20 59 59"
src="https://user-images.githubusercontent.com/115237/235511594-d49f6d09-92e8-4e99-be7b-2a37f5d24129.png "> 
						
						
					 
					
						2023-05-02 05:54:29 -04:00 
						 
				 
			
				
					
						
							
							
								wxiaoguang 
							
						 
					 
					
						
						
							
						
						83022013c8 
					 
					
						
						
							
							Fix layouts of admin table / adapt repo / email test  ( #24370 )  
						
						... 
						
						
						
						Ref:
https://github.com/go-gitea/gitea/pull/24315#pullrequestreview-1403034993 
And fix the incorrect layout for "dasbboard", the "form" shouldn't
follow `<h4 class="ui top attached header">`, so move it to inner.
Diff with ignoring spaces:
https://github.com/go-gitea/gitea/pull/24370/files?diff=unified&w=1 
A known bug: the adapt/delete button doesn't work due to a historical
messy logic, will fix it in next PR (#24374 )



 
						
						
					 
					
						2023-04-28 09:48:41 +08:00 
						 
				 
			
				
					
						
							
							
								wxiaoguang 
							
						 
					 
					
						
						
							
						
						75c62054a6 
					 
					
						
						
							
							Improve some modal action buttons ( #24289 )  
						
						... 
						
						
						
						Follow #24097  and #24285 
And add a devtest page for modal action button testing.
http://localhost:3000/devtest/fomantic-modal 
Now the `modal_actions_confirm.tmpl` could support: green / blue /
yellow positive buttons, the negative button is "secondary".
ps: this PR is only a small improvement, there are still a lot of
buttons not having proper colors. In the future these buttons could be
improved by this approach.
These buttons could also be improved according to the conclusion of
#24285  in the future.

And add GitHub-like single danger button (context:
https://github.com/go-gitea/gitea/issues/24285#issuecomment-1519100312 )

---------
Co-authored-by: silverwind <me@silverwind.io > 
						
						
					 
					
						2023-04-24 07:08:59 -04:00 
						 
				 
			
				
					
						
							
							
								Hester Gong 
							
						 
					 
					
						
						
							
						
						44e0cfa96e 
					 
					
						
						
							
							Change to vertical navbar layout for secondary navbar for repo/user/admin settings  ( #24246 )  
						
						... 
						
						
						
						Co-Author: @wxiaoguang 
This is the first step of #24229 . And this PR will only includes html
changes, and followed by other PRs that fine tune css and change to
submenus.
After:
Admin Level
<img width="1400" alt="Screen Shot 2023-04-21 at 10 07 16"
src="https://user-images.githubusercontent.com/17645053/233523870-f848b61d-056a-4b41-9760-a9a49fea1fe8.png ">
User Level
<img width="1422" alt="Screen Shot 2023-04-21 at 10 07 23"
src="https://user-images.githubusercontent.com/17645053/233523878-979adb20-a657-43d9-99a6-ad414010c0ef.png ">
Repo Level
<img width="1404" alt="Screen Shot 2023-04-21 at 10 07 07"
src="https://user-images.githubusercontent.com/17645053/233523863-337440bd-c03a-4dfd-87fa-cef40300bfe0.png ">
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com > 
						
						
					 
					
						2023-04-23 18:21:21 +08:00 
						 
				 
			
				
					
						
							
							
								Hester Gong 
							
						 
					 
					
						
						
							
						
						476a043a5f 
					 
					
						
						
							
							Refactor delete_modal_actions template and use it for project column related actions ( #24097 )  
						
						... 
						
						
						
						Co-Author: @wxiaoguang 
This PR is to fix
https://github.com/go-gitea/gitea/issues/23318#issuecomment-1506275446  .
The way to fix this in this PR is to use `delete_modal_actions.tmpl`
here both to fix this issue and keep ui consistency (as suggested by
[TODO
here](4299c3b7db/templates/projects/view.tmpl (L161)https://user-images.githubusercontent.com/17645053/233825650-76307e65-9255-44bb-80e8-7062f58ead1b.png ">
<img width="786" alt="Screen Shot 2023-04-23 at 15 17 21"
src="https://user-images.githubusercontent.com/17645053/233825652-4dc6f7d1-a180-49fb-a468-d60950eaee0d.png ">
Test for functionalities:
https://user-images.githubusercontent.com/17645053/233826857-76376fda-022c-42d0-b0f3-339c17ca4e59.mov 
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com > 
						
						
					 
					
						2023-04-23 17:24:19 +08:00 
						 
				 
			
				
					
						
							
							
								wxiaoguang 
							
						 
					 
					
						
						
							
						
						59eb660b1a 
					 
					
						
						
							
							Fix incorrect toggle buttons ( #23676 )  
						
						... 
						
						
						
						Some of those are still Copy&Paste problems.
This PR:
* Only cleans the legacy incorrect code, doesn't change or improve the
"action" logic.
* Remove the redundant `$('.toggle.button').on('click')`, now
`$('.show-panel.button').on('click')` handles that kinds of buttons
Actually, there is only one correct "toggle button" in code, the one on
the webhook page.
No need to backport. 
						
						
					 
					
						2023-03-26 20:06:11 +08:00 
						 
				 
			
				
					
						
							
							
								wxiaoguang 
							
						 
					 
					
						
						
							
						
						8d5fbeb7a2 
					 
					
						
						
							
							Use data-tooltip-content for tippy tooltip ( #23649 )  
						
						... 
						
						
						
						Follow:
* #23574 
* Remove all ".tooltip[data-content=...]"
Major changes:
* Remove "tooltip" class, use "[data-tooltip-content=...]" instead of
".tooltip[data-content=...]"
* Remove legacy `data-position`, it's dead code since last Fomantic
Tooltip -> Tippy Tooltip refactoring
* Rename reaction attribute from `data-content` to
`data-reaction-content`
* Add comments for some `data-content`: `{{/* used by the form */}}`
* Remove empty "ui" class
* Use "text color" for SVG icons (a few) 
						
						
					 
					
						2023-03-24 18:35:38 +08:00