Jason Song
223782ca4c
refactor: rename to actions
2022-12-06 15:16:25 +08:00
Jason Song
704f72017d
refactor: rename packages
2022-12-05 15:45:38 +08:00
Jason Song
bd1af5b7f8
Merge branch 'main' into feature/bots
2022-12-05 14:31:00 +08:00
zeripath
0e46499258
Do not emit ambiguous character warning on rendered pages ( #22016 )
...
The real sensitivity of ambiguous characters is in source code -
therefore warning about them in rendered pages causes too many warnings.
Therefore simply remove the warning on rendered pages.
The escape button will remain available and it is present on the view
source page.
Fix #20999
Signed-off-by: Andrew Thornton <art27@cantab.net >
2022-12-03 23:47:00 +08:00
Jason Song
b9ab9b21c6
Merge branch 'go-gitea:main' into feature/bots
2022-12-02 13:28:14 +08:00
Mark Ormesher
665d02efaf
Remove duplicate "Actions" label in mobile view ( #21974 )
...
Closes #21973 .
The "Actions" button on the commit view page is labelled twice in mobile
view. No other buttons on the page have a `mobile-only` extra label, so
this PR removes it.
Before:

After:

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2022-12-01 22:39:19 -05:00
Jason Song
d2a4c10bc7
chore: code lint
2022-12-01 15:39:28 +08:00
Jason Song
b2745bff43
feat: support disable bots completely
2022-12-01 15:27:28 +08:00
Jason Song
ef4b3673dd
chore: golang lint
2022-11-26 22:12:52 +08:00
Lunny Xiao
2ecb59c092
rename builds -> bots
2022-11-25 17:48:48 +08:00
Jason Song
f3a9a25682
fix: remove build view header
2022-11-25 17:48:47 +08:00
fuxiaohei
6a0614f4a5
feat(runner): add repo runners ui pages
2022-11-25 17:48:46 +08:00
Lunny Xiao
e5b835cf52
current page
2022-11-25 17:48:46 +08:00
wxiaoguang
ea5e769428
fix build view ui
2022-11-25 17:48:46 +08:00
Lunny Xiao
8ec691f3ce
Almost finished
2022-11-25 17:48:46 +08:00
Lunny Xiao
08b463a308
Fix duplicated alert
2022-11-25 17:48:46 +08:00
Lunny Xiao
fa5b8e9eba
org secrets
2022-11-25 17:48:46 +08:00
Lunny Xiao
da981db596
finish adding and deleting secret for repository settting
2022-11-25 17:48:46 +08:00
Lunny Xiao
e43e3f9518
improve UI
2022-11-25 17:48:46 +08:00
Lunny Xiao
ab4f539453
add models and services
2022-11-25 17:48:46 +08:00
Jason Song
6531738b2e
fix: builds UI
2022-11-25 17:48:46 +08:00
Jason Song
dee4f2470b
feat: inner build view UI
2022-11-25 17:48:46 +08:00
Jason Song
9292e9ebdb
fix: add methods of status
2022-11-25 17:48:46 +08:00
Lunny Xiao
b65e263f92
Fix filter count
2022-11-25 17:48:45 +08:00
fuxiaohei
38b36edc5c
feat(runner): add runner page in repo and org settings
2022-11-25 17:48:45 +08:00
Lunny Xiao
3518c098b9
Improve ui for builds
2022-11-25 17:48:45 +08:00
Lunny Xiao
d69423a3b0
UI improvement
2022-11-25 17:48:45 +08:00
Lunny Xiao
57cc7bf823
improve UI
2022-11-25 17:48:45 +08:00
Jason Song
dd5b2c5dfd
feat: optimize log indexes
2022-11-25 17:48:45 +08:00
Lunny Xiao
243c1e5134
Add workflow
2022-11-25 17:48:45 +08:00
Lunny Xiao
b84aa84a0f
Fix template
2022-11-25 17:48:44 +08:00
Lunny Xiao
931d8c2c21
add runners management ui
2022-11-25 17:48:43 +08:00
Lunny Xiao
2ea693cdd2
update template
2022-11-25 17:48:43 +08:00
Lunny Xiao
2c4f6fd42f
add most tables
2022-11-25 17:48:43 +08:00
Lunny Xiao
5a479bb034
Add builds UI
2022-11-25 17:48:43 +08:00
Xinyu Zhou
26f941fbda
Fix button in branch list, avoid unexpected page jump before restore branch actually done ( #21562 )
...
This patch:
- Use `<button>` replace anchor link `<a>` in **_Delete/Restore
Branch_** button to avoid unexpected page jump before restore branch
actually done.
- Also replace right side buttons with `<button>` in branch list, let
some screen readers know they are buttons.
## Before
click restore branch -> restore triggered -> page refreshed, but branch
status not update -> manually refresh page
<details>
https://user-images.githubusercontent.com/76462613/197389108-5a0bd259-0455-40b2-92ac-4326900276f8.mp4
</details>
## After
waiting restore done -> page refresh -> branch status update
<details>
https://user-images.githubusercontent.com/76462613/197428683-616fcbd2-70f9-4572-bf76-e0b7f77b6dd7.mp4
</details>
Signed-off-by: baronbunny <its@baronbunny.cn >
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: Lauris BH <lauris@nix.lv >
2022-11-24 20:29:43 +08:00
silverwind
b97548a2ee
Fix table misalignments and tweak webhook and githook lists ( #21917 )
...
- Fix regression from #21893 which had misaligned a few tables like repo
lists and e-mails
- Bring githooks list in line with webhooks list for styling
- Change webhook list icons to just colored dots, like githook list
- Increase size of dot in webhook and githook list from 16 to 22px
2022-11-24 00:43:07 -06:00
kolaente
13746f070d
feat: add button to quickly clear merge message ( #21548 )
...
This PR adds a button to allow quickly clearing the merge message of a
PR. The button will remove everything but the git trailers.
I found myself often pruning the commit message before merging,
especially for PRs generated by renovate - renovate puts a very long and
detailed comment with the full changelog in each PR it opens. This
clutters the commit message. However, I want to explicitly preserve the
git commit trailers. Doing this manually works, but having a button is a
lot easier.
Screenshot:

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
Co-authored-by: delvh <dev.lh@web.de >
2022-11-23 18:24:03 +08:00
silverwind
1c7496c7a7
Webhook list enhancements ( #21893 )
2022-11-22 07:10:42 +08:00
silverwind
2e5ac53bdc
Embed Matrix icon as SVG ( #21890 )
...
Embed the SVG icon directly, making further invertion unnecessary
because the icon color can now follow text color.
<img width="240" alt="Screenshot 2022-11-21 at 20 16 32"
src="https://user-images.githubusercontent.com/115237/203142189-89f20de9-c0bd-4d05-92c0-44dadf20d78f.png ">
<img width="245" alt="Screenshot 2022-11-21 at 20 16 46"
src="https://user-images.githubusercontent.com/115237/203142191-658239ba-1859-49c6-91ad-10ddf14780d0.png ">
2022-11-21 20:25:26 +00:00
silverwind
c2fb27beb4
Improvements for Content Copy ( #21842 )
...
It now supports copying Markdown, SVG and Images (not in Firefox
currently because of lacking
[`ClipboardItem`](https://developer.mozilla.org/en-US/docs/Web/API/ClipboardItem )
support, but can be enabled in `about:config` and works). It will fetch
the data if in a rendered view or when it's an image.
Followup to https://github.com/go-gitea/gitea/pull/21629 .
2022-11-21 17:59:42 +08:00
Xinyu Zhou
b4802b9b2e
Allow disable RSS/Atom feed ( #21622 )
...
This patch provide a mechanism to disable RSS/Atom feed.
Signed-off-by: Xinyu Zhou <i@sourcehut.net >
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: 6543 <6543@obermui.de >
2022-11-21 13:14:58 +08:00
silverwind
eec1c71880
Show syntax lexer name in file view/blame ( #21814 )
...
Show which Chroma Lexer is used to highlight the file in the file
header. It's useful for development to see what was detected, and I
think it's not bad info to have for the user:
<img width="233" alt="Screenshot 2022-11-14 at 22 31 16"
src="https://user-images.githubusercontent.com/115237/201770854-44933dfc-70a4-487c-8457-1bb3cc43ea62.png ">
<img width="226" alt="Screenshot 2022-11-14 at 22 36 06"
src="https://user-images.githubusercontent.com/115237/201770856-9260ce6f-6c0f-442c-92b5-201e5b113188.png ">
<img width="194" alt="Screenshot 2022-11-14 at 22 36 26"
src="https://user-images.githubusercontent.com/115237/201770857-6f56591b-80ea-42cc-8ea5-21b9156c018b.png ">
Also, I improved the way this header overflows on small screens:
<img width="354" alt="Screenshot 2022-11-14 at 22 44 36"
src="https://user-images.githubusercontent.com/115237/201774828-2ddbcde1-da15-403f-bf7a-6248449fa2c5.png ">
Co-authored-by: delvh <dev.lh@web.de >
Co-authored-by: Lauris BH <lauris@nix.lv >
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: John Olheiser <john.olheiser@gmail.com >
2022-11-19 13:08:06 +02:00
silverwind
fefdb7ffd1
Timeline and color tweaks ( #21799 )
...
Followup to https://github.com/go-gitea/gitea/pull/21784 .
- Restore muted effect on timeline author and issuelist comment icon
- Remove whitespace inside shared user templates, fixing link hover
underline
- Use shared author link template more
- Use `bold` class instead of CSS
- Fix grey-light color being too dark on arc-green
- Add missing black-light color
- Fix issuelist progress bar color
- Fix various other cases of missing `.muted`
<img width="416" alt="Screenshot 2022-11-13 at 12 15 22"
src="https://user-images.githubusercontent.com/115237/201519497-1d4725c6-bc8b-47b5-9f68-1278ac9a8c92.png ">
<img width="324" alt="Screenshot 2022-11-13 at 12 16 52"
src="https://user-images.githubusercontent.com/115237/201519501-c0d03700-f9af-4316-ab46-482f2c7c738b.png ">
<img width="79" alt="Screenshot 2022-11-13 at 12 30 55"
src="https://user-images.githubusercontent.com/115237/201519502-46dc2d73-bbdf-4a2e-84d3-d2976f793163.png ">
<img width="440" alt="Screenshot 2022-11-13 at 12 41 03"
src="https://user-images.githubusercontent.com/115237/201519876-ada33948-f84a-4aeb-a40d-5c873f9a49e9.png ">
<img width="213" alt="Screenshot 2022-11-13 at 12 52 54"
src="https://user-images.githubusercontent.com/115237/201520291-a4d7238e-aeca-46c7-9008-8b644b1b676e.png ">
<img width="208" alt="Screenshot 2022-11-13 at 12 56 16"
src="https://user-images.githubusercontent.com/115237/201520436-aa8ba109-b959-42fb-831a-021e806c7082.png ">
Co-authored-by: Lauris BH <lauris@nix.lv >
Co-authored-by: techknowlogick <techknowlogick@gitea.io >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2022-11-19 12:02:30 +08:00
May
f311d15a0b
Added space between avatar and username ( #21825 )
...
Added space between avatar and username which is missing on verified
commit message and avatar is too close to username which is don't look
nice.
Current state

This is how it looks after change

Co-authored-by: zeripath <art27@cantab.net >
Co-authored-by: silverwind <me@silverwind.io >
Co-authored-by: techknowlogick <techknowlogick@gitea.io >
2022-11-15 16:36:53 -05:00
Yarden Shoham
de6dfb7141
Remove href="javascript:;" in "save topics (Done)" button ( #21813 )
...
To use an anchor tag as a button and have it be accessible I added
`role="button" tabindex="0"`,
[reference](https://stackoverflow.com/a/10510353/7414734 ).
* Closes #19912
2022-11-15 10:10:50 +08:00
Yarden Shoham
6f3efdfe11
Render number of commits in repo page in a user friendly way ( #21786 )
...
Use `JsPrettyNumber` to render the number of commits
* Closes #12637
### Before

### After

Signed-off-by: Yarden Shoham <hrsi88@gmail.com >
Co-authored-by: 6543 <6543@obermui.de >
2022-11-13 00:55:19 -05:00
Nolann
9f8e778918
Copy citation file content, in APA and BibTex format, on repo home page ( #19999 )
...
Add feature to easily copy CITATION.cff content in APA and BibTex format.
2022-11-11 18:02:50 +01:00
Yarden Shoham
e3a7f15791
Add "Copy" button to file view of raw text ( #21629 )
...
If a raw text file is displayed, a copy button of the text is enabled.
* Closes #12866
### Before

### After

#### Rendered files and binaries have their button disabled


Signed-off-by: Yarden Shoham <hrsi88@gmail.com >
Co-authored-by: silverwind <me@silverwind.io >
Co-authored-by: delvh <dev.lh@web.de >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2022-11-04 15:33:50 -04:00
oliverpool
b6e81357bd
Add Webhook authorization header ( #20926 )
...
_This is a different approach to #20267 , I took the liberty of adapting
some parts, see below_
## Context
In some cases, a weebhook endpoint requires some kind of authentication.
The usual way is by sending a static `Authorization` header, with a
given token. For instance:
- Matrix expects a `Bearer <token>` (already implemented, by storing the
header cleartext in the metadata - which is buggy on retry #19872 )
- TeamCity #18667
- Gitea instances #20267
- SourceHut https://man.sr.ht/graphql.md#authentication-strategies (this
is my actual personal need :)
## Proposed solution
Add a dedicated encrypt column to the webhook table (instead of storing
it as meta as proposed in #20267 ), so that it gets available for all
present and future hook types (especially the custom ones #19307 ).
This would also solve the buggy matrix retry #19872 .
As a first step, I would recommend focusing on the backend logic and
improve the frontend at a later stage. For now the UI is a simple
`Authorization` field (which could be later customized with `Bearer` and
`Basic` switches):

The header name is hard-coded, since I couldn't fine any usecase
justifying otherwise.
## Questions
- What do you think of this approach? @justusbunsi @Gusted @silverwind
- ~~How are the migrations generated? Do I have to manually create a new
file, or is there a command for that?~~
- ~~I started adding it to the API: should I complete it or should I
drop it? (I don't know how much the API is actually used)~~
## Done as well:
- add a migration for the existing matrix webhooks and remove the
`Authorization` logic there
_Closes #19872_
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: Gusted <williamzijl7@hotmail.com >
Co-authored-by: delvh <dev.lh@web.de >
2022-11-03 20:23:20 +02:00