16369 Commits (e97e883ad50774f249c8c694598c25a17227299b)
 

Author SHA1 Message Date
wxiaoguang 7934602a4c
Improve some flex layouts (#26649)
Fix #26617

1. Separate the "flex-list" examples into a dedicated template, and add some more examples
2. Use `flex-basis` instead of `flex-shrink` for `flex-item-trailing`, to avoid wrapping the texts too aggressively
3. Some `flex-wrap: wrap;` are removed
11 months ago
Bo-Yi Wu 23addde28e
feat: implement organization secret creation API (#26566)
- Add a new `CreateSecretOption` struct for creating secrets
- Implement a `CreateOrgSecret` function to create a secret in an
organization
- Add a new route in `api.go` to handle the creation of organization
secrets
- Update the Swagger template to include the new `CreateOrgSecret` API
endpoint

---------

Signed-off-by: appleboy <appleboy.tw@gmail.com>
11 months ago
yp05327 a4a567f29f
Check disabled workflow when rerun jobs (#26535)
In GitHub, we can not rerun jobs if the workflow is disabled.

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
11 months ago
techknowlogick b3f7137174
Update minimum password length requirements (#25946) 11 months ago
techknowlogick 02a45e8d58
cynkra is covered via oc links now (#26641) 11 months ago
techknowlogick b85a57845c
update config docs url (#26640) 11 months ago
techknowlogick 59f837f44e
devpod use go1.21 (#26637) 11 months ago
delvh 3d80308b36
Use correct minio error (#26634)
Previously, `err` was defined above, checked for `err == nil` and used
nowhere else.
Hence, the result of `convertMinioErr` would always be `nil`.
This leads to a NPE further down the line.
That is not intentional, it should convert the error of the most recent
operation, not one of its predecessors.

Found through
https://discord.com/channels/322538954119184384/322538954119184384/1143185780206993550.
11 months ago
wxiaoguang 0731abc444
Remove avatarHTML from template helpers (#26598)
The HTML code is more readable and more correct (it needs `"ui avatar"`
class)

Co-authored-by: Giteabot <teabot@gitea.io>
11 months ago
Jason Song 8cf3b61fb9
Add optimistic lock to ActionRun table (#26563)
Should fix #26559.

How xorm works: https://xorm.io/docs/chapter-06/1.lock/

---------

Co-authored-by: Giteabot <teabot@gitea.io>
11 months ago
wxiaoguang 42cbe6005a
Improve the branch selector tab UI (#26631) 11 months ago
CaiCandong 5bd63f83e3
Improve translation of milestone filters (#26569)
https://github.com/go-gitea/gitea/issues/26567#issue-1855312074
> The terms `closest` and `furthest` don't describe the actual sorting
behavior as these two are semantically relative to the current date.
> Could we switch to `earliest` and `latest` instead?

close #26567

---------

Co-authored-by: yp05327 <576951401@qq.com>
Co-authored-by: Giteabot <teabot@gitea.io>
11 months ago
Yarden Shoham 16dee4f1b2
Add `branch_filter` to hooks API endpoints (#26599)
We now include the branch filler in the response.

- Closes #26591 

# Before

![image](https://github.com/go-gitea/gitea/assets/20454870/73933940-c1a7-4573-abae-f340b63028b2)

# After

![image](https://github.com/go-gitea/gitea/assets/20454870/3b3c4a85-0f7c-48c7-8617-def7a66c671d)

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: Giteabot <teabot@gitea.io>
11 months ago
silverwind facdaee47b
Replace box-shadow for `floating` dropdown as well (#26581)
Add `box-shadow` replacement to the `floating` dropdown variant as well,
which was missed in https://github.com/go-gitea/gitea/pull/26469. The
Fomantic style has `!important`, so this has to have too. Also made a
tiny adjustment to shadow color on dark theme.

<img width="305" alt="Screenshot 2023-08-18 at 16 40 34"
src="https://github.com/go-gitea/gitea/assets/115237/a0aac9cb-6393-4d69-b0b3-00eaac5ccf9f">
<img width="202" alt="Screenshot 2023-08-18 at 16 40 22"
src="https://github.com/go-gitea/gitea/assets/115237/0a5fa3aa-7452-4dbd-86ed-ccbc1c872ebb">

Co-authored-by: Giteabot <teabot@gitea.io>
11 months ago
yp05327 f6e7798405
Add link to job details and tooltip to commit status in repo list in dashboard (#26326)
Tooltip:

![image](https://github.com/go-gitea/gitea/assets/18380374/237cb545-7844-424b-b995-1008eaaaedec)

Link to the target job:

![image](https://github.com/go-gitea/gitea/assets/18380374/0c11a97f-6517-47f2-8773-f381488c084e)
11 months ago
wxiaoguang 3be80a863b
Ignore the trailing slashes when comparing oauth2 redirect_uri (#26597)
Fix #26526
11 months ago
silverwind 3db3f5daae
Update tool dependencies (#26607)
- Updated all tool dependencies to latest versions
- Add Makefile to `swagger` files because it specifies `go-swagger`
version
- Fix lint
11 months ago
techknowlogick 653e77fd22
bump go to 1.21 (#26608)
Co-authored-by: Giteabot <teabot@gitea.io>
11 months ago
delvh 9c80a5d508
Update 1.20.3 changelog (#26609) 11 months ago
TimberBro 84d05516dc
Fix NPM packages name validation (#26595)
- Added new tests to cover corner cases
- Replace existing regex with new one
Closes #26551 

---
As @silverwind suggested, I started from
[validate-npm-package-name](https://github.com/npm/validate-npm-package-name),
but found this solution too complicated.
Then I tried to fix existing regex myself, but thought, that exclude all
restricted symbols is harder, than set only allowed symbols.
Then I search a bit more and found
[package-name-regex](https://github.com/dword-design/package-name-regex)
and regex from it works for all new test cases.

Let me know, if more information or help with this PR is needed.
11 months ago
wxiaoguang ead52dd96c
Use "input" event instead of "keyup" event for migration form (#26602)
Otherwise, "pasted" content won't update the UI.
11 months ago
wxiaoguang 79c3329502
Do not use deprecated log config options by default (#26592)
Simplify the log config

* Remove unnecessary `ROUTER` config, it defaults to the `MODE`.
* `XORM` config was deprecated
11 months ago
a1012112796 f00fdd1abd
fix reopen logic for agit flow pull request (#26399)
the head branch is meaningless for a agit flow pull request, so should
not check it when reopen it.

related: #24231
fix #26334

Signed-off-by: a1012112796 <1012112796@qq.com>
11 months ago
silverwind 5feef6d5c0
Update JS dependencies (#26586)
- Update all JS dependencies
- Adapt `ansi_up` import for ESM
- Tested Mermaid and Ansi rendering
11 months ago
lonix1 8f936488f7
docs: template variables (#26547)
Explanation for using gitea's variables in `.tmpl` files.

Thanks to @wxiaoguang for advising me on
[discord](https://discord.com/channels/322538954119184384/561007778139734027/1141217820441587722).
11 months ago
GiteaBot 00cf36d6c7 [skip ci] Updated translations via Crowdin 11 months ago
wxiaoguang 48c4a7e75c
Rewrite the DiffFileTreeItem and fix misalignment (#26565)
Fix some layout / user-interaction problems and close #25650 , the code
has been simplified (+46 −108)

<details>


![image](https://github.com/go-gitea/gitea/assets/2114189/55c38812-3338-4048-9137-0cae0ef213e8)

</details>

---------

Co-authored-by: delvh <dev.lh@web.de>
11 months ago
silverwind 30e5278d1b
Allow text selection in actions step header (#26588) 11 months ago
silverwind bfb5b43b04
Bump xgo to go-1.21.x and node to 20 in release-version (#26589)
Now that https://github.com/techknowlogick/xgo/issues/163 is resolved,
we can bump these.

It seems there is no way to dry-run this, so we may only notice issues
next release, but I don't expect any.
11 months ago
wxiaoguang e5b3f53d36
Add minimum polyfill to support "relative-time-element" in PaleMoon (#26575)
Close #26525
11 months ago
GiteaBot 445dbda276 [skip ci] Updated translations via Crowdin 11 months ago
wxiaoguang fe2b9274b1
Fix various line-height styles (#26553)
Fix #26537

Use the same default line-height as "normalize.css" instead of "1". "1"
is not right because it doesn't work with descent part and causes
overflow problems.


![image](https://github.com/go-gitea/gitea/assets/2114189/3f2e8fb5-b326-4889-bfff-c79c75f1b7f4)

---------

Co-authored-by: silverwind <me@silverwind.io>
11 months ago
Jason Song b658f2c61b
Return empty when searching issues with no repos (#26545) 11 months ago
Jason Song 47fddaadc8
Support rebuilding issue indexer manually (#26546)
Provide a way to rebuild issue indexer manually.

So if the indexer get outdated because of some bugs like #26539, we can
rebuild it.

<img width="1104" alt="image"
src="https://github.com/go-gitea/gitea/assets/9418365/ac242e29-6f04-47ca-b3d0-801a796448d3">

Co-authored-by: Giteabot <teabot@gitea.io>
11 months ago
CaiCandong 940f997512
Fix label filter between `all` and `no` (#26557)
Regression of https://github.com/go-gitea/gitea/pull/25886.
# Description 
For `labelIDs`:

9afcb0e046/routers/web/repo/issue.go (L171-L174)
 - `nil` mean no filter
 - `[0]` mean `no label` filter

When `selectLabels == "0"`, labelIDs should be `[0]` rather than `nil`
 # Before:
 


https://github.com/go-gitea/gitea/assets/50507092/3dac5075-6da0-4769-ba20-48a56f4063c0


#  After:


https://github.com/go-gitea/gitea/assets/50507092/ff79fd4c-b02e-4dfb-9309-ae7851f4dcdb

Co-authored-by: Giteabot <teabot@gitea.io>
11 months ago
Jason Song c179ab4236
Fix "issueReposQueryPattern does not match query" (#26556)
Fix
`https://github.com/go-gitea/gitea/pull/26545#discussion_r1295734340`

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
11 months ago
wxiaoguang c6b92c84fe
Sync repo's IsEmpty status correctly (#26517)
Close #26509
11 months ago
GiteaBot 16aee56e6a [skip ci] Updated translations via Crowdin 11 months ago
silverwind 376c0e25f7
Remove fomantic transition module (#26469)
Removes all dropdown and dimmer animations. Works everywhere as far as I
can tell, but need to give this thorough testing. Removes around 70kb
JS/CSS.

Note, I'm not 100% sure regarding the various callbacks, those will need
more investigation, but it appears to work nonetheless.

Fixes: https://github.com/go-gitea/gitea/issues/15709
11 months ago
Jason Song 3b129aaa80
Explain SearchOptions and fix ToSearchOptions (#26542)
Follow #26012 #26490.

A detailed description has been added to the comment.
11 months ago
wxiaoguang 1432d4eab9
Update go dependencies (#26534) 11 months ago
yp05327 9665622378
Differentiate better between user settings and admin settings (#26538)
User settings page and admin settings page are too similar. I thinlk
this will be better of using `User Settings` and `Admin Settings` as the
navbar's title.

Before:

![image](https://github.com/go-gitea/gitea/assets/18380374/68db06f3-918b-41bc-b4d3-522b1057eb57)

![image](https://github.com/go-gitea/gitea/assets/18380374/24f53d91-54e1-410c-ad9b-438bb2c8069f)

After:

![image](https://github.com/go-gitea/gitea/assets/18380374/6600a872-d630-4ea6-a58f-d9ded7d38067)

![image](https://github.com/go-gitea/gitea/assets/18380374/501cde5d-9868-4cba-829d-ff8bafce695d)
11 months ago
Jason Song 7e75e58ae4
Add missing triggers to update issue indexer (#26539)
Fix #26536

Follow #26012

Whatever the comment type is, always update the issue indexer. So the
issue indexer will be updated when there is a change in Status,
Assignee, Label, and so on.

I added the logic for `NotifyUpdateComment`, but missed it for
`NotifyCreateIssueComment` and `NotifyDeleteComment`.
11 months ago
yp05327 82f6e3d845
Improve deadline icon location in milestone list page (#26532) 11 months ago
silverwind 3e044d2c9f
Use unique class for breadcrumb divider (#26524)
Fix regression from https://github.com/go-gitea/gitea/pull/25539:
https://github.com/go-gitea/gitea/pull/26519#issuecomment-1678825200.

Before:
<img width="429" alt="Screenshot 2023-08-15 at 15 46 12"
src="https://github.com/go-gitea/gitea/assets/115237/a818f60a-77a2-48fe-8e6f-363d152ccb1e">

After:
<img width="424" alt="Screenshot 2023-08-15 at 15 46 19"
src="https://github.com/go-gitea/gitea/assets/115237/c90159e2-ced2-4a74-8a0f-a1b2b5d0b565">

<img width="605" alt="Screenshot 2023-08-15 at 15 56 11"
src="https://github.com/go-gitea/gitea/assets/115237/3ded6f57-86f4-422a-86cb-56dd2c216dee">
11 months ago
yp05327 bc930f332f
Fix typo of RunerOwnerID (#26508) 11 months ago
yp05327 8703b6c954
Improve clickable area in repo action view page (#26115)
Before:

![image](https://github.com/go-gitea/gitea/assets/18380374/52e4dda1-0221-440b-93e1-242db8bd5885)
After:

![image](https://github.com/go-gitea/gitea/assets/18380374/dda5e72b-205e-44f7-b4a9-83703021f2d1)

In current design, the clickable area is too small, and it is hard to
find the correct clickable area as the area with background color (div
with class name `job-brief-item selected`) is bigger than it.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
11 months ago
wxiaoguang c7fd9ad8b4
Fix dark theme highlight for "NameNamespace" (#26519)
The color is taken from "Name"

Before:


![image](https://github.com/go-gitea/gitea/assets/2114189/b94d7521-770c-4e14-a63b-f30c44fe883f)


After:


![image](https://github.com/go-gitea/gitea/assets/2114189/d99c1f13-a0c0-4dc8-82ab-bfdd451e46ec)

Co-authored-by: Giteabot <teabot@gitea.io>
11 months ago
silverwind 7563891cc4
Remove duplicate CSS import for chroma/base.css (#26523) 11 months ago
CaiCandong 0e74fc4a84
Fix project filter bugs (#26490)
related: #26012

### Bugs
1. missing project filter on the issue page.

1e76a824bc/modules/indexer/issues/dboptions.go (L11-L15)
3. incorrect SQL condition: some issue does not belong to a project but
exists on the project_issue table.

f5dbac9d36/models/issues/issue_search.go (L233)

### Before:

![before](https://github.com/go-gitea/gitea/assets/50507092/1dcde39e-3e2f-4151-b2c6-4d67bf493c2f)

### After:

![after](https://github.com/go-gitea/gitea/assets/50507092/badfb81f-056d-4a2f-9838-1cba9c15768d)

---------

Co-authored-by: Giteabot <teabot@gitea.io>
11 months ago