]> source.dussan.org Git - gitea.git/log
gitea.git
13 months agoFix counting and filtering on the dashboard page for issues (#26657)
Jason Song [Wed, 23 Aug 2023 02:29:17 +0000 (10:29 +0800)]
Fix counting and filtering on the dashboard page for issues (#26657)

This PR has multiple parts, and I didn't split them because
it's not easy to test them separately since they are all about the
dashboard page for issues.

1. Support counting issues via indexer to fix #26361
2. Fix repo selection so it also fixes #26653
3. Keep keywords in filter links.

The first two are regressions of #26012.

After:

https://github.com/go-gitea/gitea/assets/9418365/71dfea7e-d9e2-42b6-851a-cc081435c946

Thanks to @CaiCandong  for helping with some tests.

13 months agoadd mfa doc (#26654)
Lunny Xiao [Wed, 23 Aug 2023 01:56:11 +0000 (09:56 +0800)]
add mfa doc (#26654)

copy and modified from #14572

> Whilst debating enforcing MFA within our team, I realised there isn't
a lot of context to the side effects of enabling it. Most of us use Git
over HTTP and would need to add a token.

I plan to add another PR that adds a sentence to the UI about needing to
generate a token when enabling MFA if HTTP is to be used.

---------

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: silverwind <me@silverwind.io>
13 months ago[Refactor] getIssueStatsChunk to move inner function into own one (#26671)
6543 [Wed, 23 Aug 2023 01:29:49 +0000 (03:29 +0200)]
[Refactor] getIssueStatsChunk to move inner function into own one (#26671)

move inner **countSession** of **getIssueStatsChunk** into it's own
function for reuse

---
*Sponsored by Kithara Software GmbH*

13 months agoUse line-height: normal by default (#26635)
wxiaoguang [Tue, 22 Aug 2023 10:19:15 +0000 (18:19 +0800)]
Use line-height: normal by default (#26635)

Fix #26537 again because 1.15 is too small for some fonts.

13 months agoImprove repo sub menu (#26531)
yp05327 [Tue, 22 Aug 2023 09:20:09 +0000 (18:20 +0900)]
Improve repo sub menu (#26531)

Before:

![image](https://github.com/go-gitea/gitea/assets/18380374/9e71282c-4645-45f3-bdb8-13c4333f7c2b)

After:

![image](https://github.com/go-gitea/gitea/assets/18380374/656ff837-35cf-43f8-88d0-f5e123600e57)

Icons are not in the middle of the line.

13 months agoFix organization list in dashboard (#26650)
yp05327 [Tue, 22 Aug 2023 08:49:00 +0000 (17:49 +0900)]
Fix organization list in dashboard (#26650)

Fix ui problem comes from #26326

Before:

![image](https://github.com/go-gitea/gitea/assets/18380374/c59264c9-ed63-48ae-8f76-779058e4b226)

After:

![image](https://github.com/go-gitea/gitea/assets/18380374/77d69274-6988-494a-970a-42fe69767e1e)

13 months agoImprove show role (#26621) 22751/head
yp05327 [Tue, 22 Aug 2023 05:30:33 +0000 (14:30 +0900)]
Improve show role (#26621)

Add a general show role template.

13 months agoImprove some flex layouts (#26649)
wxiaoguang [Tue, 22 Aug 2023 04:57:02 +0000 (12:57 +0800)]
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

13 months agofeat: implement organization secret creation API (#26566)
Bo-Yi Wu [Tue, 22 Aug 2023 03:20:34 +0000 (11:20 +0800)]
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>
13 months agoCheck disabled workflow when rerun jobs (#26535)
yp05327 [Tue, 22 Aug 2023 02:30:02 +0000 (11:30 +0900)]
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>
13 months agoUpdate minimum password length requirements (#25946)
techknowlogick [Mon, 21 Aug 2023 19:27:50 +0000 (15:27 -0400)]
Update minimum password length requirements (#25946)

13 months agocynkra is covered via oc links now (#26641)
techknowlogick [Mon, 21 Aug 2023 17:16:23 +0000 (13:16 -0400)]
cynkra is covered via oc links now (#26641)

13 months agoupdate config docs url (#26640)
techknowlogick [Mon, 21 Aug 2023 17:14:49 +0000 (13:14 -0400)]
update config docs url (#26640)

13 months agodevpod use go1.21 (#26637)
techknowlogick [Mon, 21 Aug 2023 16:20:50 +0000 (12:20 -0400)]
devpod use go1.21 (#26637)

13 months agoUse correct minio error (#26634)
delvh [Mon, 21 Aug 2023 16:20:11 +0000 (18:20 +0200)]
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.

13 months agoRemove avatarHTML from template helpers (#26598)
wxiaoguang [Mon, 21 Aug 2023 15:00:14 +0000 (23:00 +0800)]
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>
13 months agoAdd optimistic lock to ActionRun table (#26563)
Jason Song [Mon, 21 Aug 2023 14:07:52 +0000 (22:07 +0800)]
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>
13 months agoImprove the branch selector tab UI (#26631)
wxiaoguang [Mon, 21 Aug 2023 13:35:02 +0000 (21:35 +0800)]
Improve the branch selector tab UI (#26631)

13 months agoImprove translation of milestone filters (#26569)
CaiCandong [Mon, 21 Aug 2023 13:11:07 +0000 (21:11 +0800)]
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>
13 months agoAdd `branch_filter` to hooks API endpoints (#26599)
Yarden Shoham [Mon, 21 Aug 2023 11:43:52 +0000 (14:43 +0300)]
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>
13 months agoReplace box-shadow for `floating` dropdown as well (#26581)
silverwind [Mon, 21 Aug 2023 10:49:49 +0000 (12:49 +0200)]
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>
13 months agoAdd link to job details and tooltip to commit status in repo list in dashboard (...
yp05327 [Mon, 21 Aug 2023 07:26:10 +0000 (16:26 +0900)]
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)

13 months agoIgnore the trailing slashes when comparing oauth2 redirect_uri (#26597)
wxiaoguang [Mon, 21 Aug 2023 04:15:55 +0000 (12:15 +0800)]
Ignore the trailing slashes when comparing oauth2 redirect_uri (#26597)

Fix #26526

13 months agoUpdate tool dependencies (#26607)
silverwind [Sun, 20 Aug 2023 22:59:19 +0000 (00:59 +0200)]
Update tool dependencies (#26607)

- Updated all tool dependencies to latest versions
- Add Makefile to `swagger` files because it specifies `go-swagger`
version
- Fix lint

13 months agobump go to 1.21 (#26608)
techknowlogick [Sun, 20 Aug 2023 22:27:46 +0000 (18:27 -0400)]
bump go to 1.21 (#26608)

Co-authored-by: Giteabot <teabot@gitea.io>
13 months agoUpdate 1.20.3 changelog (#26609)
delvh [Sun, 20 Aug 2023 19:17:15 +0000 (21:17 +0200)]
Update 1.20.3 changelog (#26609)

13 months agoFix NPM packages name validation (#26595)
TimberBro [Sun, 20 Aug 2023 15:06:42 +0000 (18:06 +0300)]
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.

13 months agoUse "input" event instead of "keyup" event for migration form (#26602)
wxiaoguang [Sun, 20 Aug 2023 14:36:07 +0000 (22:36 +0800)]
Use "input" event instead of "keyup" event for migration form (#26602)

Otherwise, "pasted" content won't update the UI.

13 months agoDo not use deprecated log config options by default (#26592)
wxiaoguang [Sun, 20 Aug 2023 01:05:29 +0000 (09:05 +0800)]
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

13 months agofix reopen logic for agit flow pull request (#26399)
a1012112796 [Sat, 19 Aug 2023 09:29:34 +0000 (17:29 +0800)]
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>
13 months agoUpdate JS dependencies (#26586)
silverwind [Sat, 19 Aug 2023 08:18:39 +0000 (10:18 +0200)]
Update JS dependencies (#26586)

- Update all JS dependencies
- Adapt `ansi_up` import for ESM
- Tested Mermaid and Ansi rendering

13 months agodocs: template variables (#26547)
lonix1 [Sat, 19 Aug 2023 00:24:27 +0000 (02:24 +0200)]
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).

13 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 19 Aug 2023 00:20:23 +0000 (00:20 +0000)]
[skip ci] Updated translations via Crowdin

14 months agoRewrite the DiffFileTreeItem and fix misalignment (#26565)
wxiaoguang [Fri, 18 Aug 2023 19:55:56 +0000 (03:55 +0800)]
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>
14 months agoAllow text selection in actions step header (#26588)
silverwind [Fri, 18 Aug 2023 18:38:29 +0000 (20:38 +0200)]
Allow text selection in actions step header (#26588)

14 months agoBump xgo to go-1.21.x and node to 20 in release-version (#26589)
silverwind [Fri, 18 Aug 2023 18:32:14 +0000 (20:32 +0200)]
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.

14 months agoAdd minimum polyfill to support "relative-time-element" in PaleMoon (#26575)
wxiaoguang [Fri, 18 Aug 2023 09:27:11 +0000 (17:27 +0800)]
Add minimum polyfill to support "relative-time-element" in PaleMoon (#26575)

Close #26525

14 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 18 Aug 2023 00:21:36 +0000 (00:21 +0000)]
[skip ci] Updated translations via Crowdin

14 months agoFix various line-height styles (#26553)
wxiaoguang [Thu, 17 Aug 2023 21:50:32 +0000 (05:50 +0800)]
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>
14 months agoReturn empty when searching issues with no repos (#26545)
Jason Song [Thu, 17 Aug 2023 17:42:17 +0000 (01:42 +0800)]
Return empty when searching issues with no repos (#26545)

14 months agoSupport rebuilding issue indexer manually (#26546)
Jason Song [Thu, 17 Aug 2023 14:05:17 +0000 (22:05 +0800)]
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>
14 months agoFix label filter between `all` and `no` (#26557)
CaiCandong [Thu, 17 Aug 2023 13:19:24 +0000 (21:19 +0800)]
Fix label filter between `all` and `no` (#26557)

Regression of https://github.com/go-gitea/gitea/pull/25886.
# Description
For `labelIDs`:

https://github.com/go-gitea/gitea/blob/9afcb0e0461aa48a4fbda7740d4c5424911e35ef/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>
14 months agoFix "issueReposQueryPattern does not match query" (#26556)
Jason Song [Thu, 17 Aug 2023 12:38:02 +0000 (20:38 +0800)]
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>
14 months agoSync repo's IsEmpty status correctly (#26517)
wxiaoguang [Thu, 17 Aug 2023 04:43:39 +0000 (12:43 +0800)]
Sync repo's IsEmpty status correctly (#26517)

Close #26509

14 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 17 Aug 2023 00:21:25 +0000 (00:21 +0000)]
[skip ci] Updated translations via Crowdin

14 months agoRemove fomantic transition module (#26469)
silverwind [Wed, 16 Aug 2023 22:12:40 +0000 (00:12 +0200)]
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
14 months agoExplain SearchOptions and fix ToSearchOptions (#26542)
Jason Song [Wed, 16 Aug 2023 15:40:13 +0000 (23:40 +0800)]
Explain SearchOptions and fix ToSearchOptions (#26542)

Follow #26012 #26490.

A detailed description has been added to the comment.

14 months agoUpdate go dependencies (#26534)
wxiaoguang [Wed, 16 Aug 2023 12:02:40 +0000 (20:02 +0800)]
Update go dependencies (#26534)

14 months agoDifferentiate better between user settings and admin settings (#26538)
yp05327 [Wed, 16 Aug 2023 10:12:03 +0000 (19:12 +0900)]
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)

14 months agoAdd missing triggers to update issue indexer (#26539)
Jason Song [Wed, 16 Aug 2023 09:36:05 +0000 (17:36 +0800)]
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`.

14 months agoImprove deadline icon location in milestone list page (#26532)
yp05327 [Wed, 16 Aug 2023 08:22:25 +0000 (17:22 +0900)]
Improve deadline icon location in milestone list page (#26532)

14 months agoUse unique class for breadcrumb divider (#26524)
silverwind [Wed, 16 Aug 2023 00:08:23 +0000 (02:08 +0200)]
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">

14 months agoFix typo of RunerOwnerID (#26508)
yp05327 [Tue, 15 Aug 2023 23:10:40 +0000 (08:10 +0900)]
Fix typo of RunerOwnerID (#26508)

14 months agoImprove clickable area in repo action view page (#26115)
yp05327 [Tue, 15 Aug 2023 22:44:43 +0000 (07:44 +0900)]
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>
14 months agoFix dark theme highlight for "NameNamespace" (#26519)
wxiaoguang [Tue, 15 Aug 2023 22:10:10 +0000 (06:10 +0800)]
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>
14 months agoRemove duplicate CSS import for chroma/base.css (#26523)
silverwind [Tue, 15 Aug 2023 21:13:56 +0000 (23:13 +0200)]
Remove duplicate CSS import for chroma/base.css (#26523)

14 months agoFix project filter bugs (#26490)
CaiCandong [Tue, 15 Aug 2023 14:50:12 +0000 (22:50 +0800)]
Fix project filter bugs (#26490)

related: #26012

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

https://github.com/go-gitea/gitea/blob/1e76a824bcd71acd59cdfb2c4547806bc34b3d86/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.

https://github.com/go-gitea/gitea/blob/f5dbac9d36f1678b928bee04e85fbd045c725698/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>
14 months agoFix display problems of members and teams unit (#26363)
yp05327 [Tue, 15 Aug 2023 14:00:35 +0000 (23:00 +0900)]
Fix display problems of members and teams unit (#26363)

Fix:
- display member count and team count in the menu bar

![image](https://github.com/go-gitea/gitea/assets/18380374/7f03ced4-67e2-41ce-b19f-a992823726bb)
- Also display member unit in the menu bar if there are no hidden
members in public org

![image](https://github.com/go-gitea/gitea/assets/18380374/31422ad6-7190-438d-8e99-8a4af9cce908)
- hidden member board when there's no seeable members.
In this org, we only have hidden members:

![image](https://github.com/go-gitea/gitea/assets/18380374/d749420b-554a-4483-8cd2-221df61b5ca7)
We will hidden the member board when doer is not the member of this org

![image](https://github.com/go-gitea/gitea/assets/18380374/93bb782e-7d4d-4ad3-a096-133afbc51f8a)
Before:

![image](https://github.com/go-gitea/gitea/assets/18380374/eafc0b3e-6218-42ab-a892-39645d08a5eb)
If you click the number in the members board, you will access the
members page, which is not expected.

![image](https://github.com/go-gitea/gitea/assets/18380374/73d6dadc-0ef2-4ca9-8485-c5f4211bffb2)

---------

Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Giteabot <teabot@gitea.io>
14 months agoUse `hidden` over `clip` for text truncation (#26520)
silverwind [Tue, 15 Aug 2023 13:23:51 +0000 (15:23 +0200)]
Use `hidden` over `clip` for text truncation (#26520)

Avoid browser bugs:

- Firefox not cutting off -
https://github.com/go-gitea/gitea/pull/26354#issuecomment-1678456052
- Safari not showing ellipsis -
https://github.com/go-gitea/gitea/pull/26354#issuecomment-1678812801

14 months agoAdd API route to list org secrets (#26485)
Bo-Yi Wu [Tue, 15 Aug 2023 12:32:43 +0000 (20:32 +0800)]
Add API route to list org secrets (#26485)

- Add a new function `CountOrgSecrets` in the file
`models/secret/secret.go`
- Add a new file `modules/structs/secret.go`
- Add a new function `ListActionsSecrets` in the file
`routers/api/v1/api.go`
- Add a new file `routers/api/v1/org/action.go`
- Add a new function `listActionsSecrets` in the file
`routers/api/v1/org/action.go`

go-sdk: https://gitea.com/gitea/go-sdk/pulls/629

---------

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: Giteabot <teabot@gitea.io>
14 months agoSet "type=button" for editor's toolbar buttons (#26510)
wxiaoguang [Tue, 15 Aug 2023 11:31:48 +0000 (19:31 +0800)]
Set "type=button" for editor's toolbar buttons (#26510)

The editor usually is in a form, so the buttons should have
"type=button", avoid conflicting with the form's submit.

14 months agoApply to become a maintainer (#26514)
CaiCandong [Tue, 15 Aug 2023 09:30:06 +0000 (17:30 +0800)]
Apply to become a maintainer (#26514)

Here is my PR list:- [go-gitea/gitea/pulls (author:caicandong is:merged)](https://github.com/go-gitea/gitea/pulls?q=is%3Apr+sort%3Aupdated-desc+author%3ACaiCandong+is%3Amerged)

14 months agoDetect ogg mime-type as audio or video (#26494)
wxiaoguang [Tue, 15 Aug 2023 02:31:25 +0000 (10:31 +0800)]
Detect ogg mime-type as audio or video (#26494)

"ogg" is just a "container" format for audio and video.

Golang's `DetectContentType` only reports "application/ogg" for
potential ogg files.

Actually it could do more "guess" to see whether it is a audio file or a
video file.

14 months agoUse `object-fit: contain` for oauth2 custom icons (#26493)
wxiaoguang [Mon, 14 Aug 2023 16:21:04 +0000 (00:21 +0800)]
Use `object-fit: contain` for oauth2 custom icons (#26493)

14 months agoadd disable workflow feature (#26413)
a1012112796 [Mon, 14 Aug 2023 15:14:30 +0000 (23:14 +0800)]
add disable workflow feature (#26413)

As title, that's simmilar with github.

![image](https://github.com/go-gitea/gitea/assets/25342410/9e8b2444-63e0-4e87-80da-730c1e4d09d6)

![image](https://github.com/go-gitea/gitea/assets/25342410/6c3a3345-3ba7-48c9-9acd-3e621632491b)

---------

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Jason Song <i@wolfogre.com>
14 months agoMove dropzone progress bar to bottom to show filename when uploading (#26492)
wxiaoguang [Mon, 14 Aug 2023 14:36:53 +0000 (22:36 +0800)]
Move dropzone progress bar to bottom to show filename when uploading (#26492)

1. Make the "filename" visible
2. Avoiding UI flicker when the uploading is completing

14 months agoHandle base64 decoding correctly to avoid panic (#26483)
wxiaoguang [Mon, 14 Aug 2023 10:30:16 +0000 (18:30 +0800)]
Handle base64 decoding correctly to avoid panic (#26483)

Fix the panic if the "base64 secret" is too long.

14 months agoAllow to archive labels (#26478)
puni9869 [Mon, 14 Aug 2023 09:56:14 +0000 (15:26 +0530)]
Allow to archive labels (#26478)

## Archived labels

This adds the structure to allow for archived labels.
Archived labels are, just like closed milestones or projects, a medium to hide information without deleting it.
It is especially useful if there are outdated labels that should no longer be used without deleting the label entirely.

## Changes

1. UI and API have been equipped with the support to mark a label as archived
2. The time when a label has been archived will be stored in the DB

## Outsourced for the future

There's no special handling for archived labels at the moment.
This will be done in the future.

## Screenshots

![image](https://github.com/go-gitea/gitea/assets/80308335/208f95cd-42e4-4ed7-9a1f-cd2050a645d4)

![image](https://github.com/go-gitea/gitea/assets/80308335/746428e0-40bb-45b3-b992-85602feb371d)

Part of https://github.com/go-gitea/gitea/issues/25237

---------

Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
14 months agoUpdate zh-cn documentation (#26406)
CaiCandong [Mon, 14 Aug 2023 05:35:49 +0000 (13:35 +0800)]
Update zh-cn documentation (#26406)

14 months agoFix NuGet search endpoints (#25613)
KN4CK3R [Mon, 14 Aug 2023 02:50:55 +0000 (04:50 +0200)]
Fix NuGet search endpoints (#25613)

Fixes #25564
Fixes #23191

- Api v2 search endpoint should return only the latest version matching
the query
- Api v3 search endpoint should return `take` packages not package
versions

14 months agoFix tooltip of commit select button (#26472)
silverwind [Mon, 14 Aug 2023 02:16:40 +0000 (04:16 +0200)]
Fix tooltip of commit select button (#26472)

Previously, the tooltip for this button was only shown after opening and
closing it once because it was only set after the server response, now
it shows before opening it.

14 months agofix grab cursor on default column (#26476)
Denys Konovalov [Mon, 14 Aug 2023 01:15:16 +0000 (03:15 +0200)]
fix grab cursor on default column (#26476)

Fix https://github.com/go-gitea/gitea/pull/26448#issuecomment-1676194200

I accidentally set grab cursor for project columns instead of issue
cards, which actually turned out not to be a problem - with proper check
for the default column, which can't be moved.

---------

Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Giteabot <teabot@gitea.io>
14 months agoFix storage path logic especially for relative paths (#26441)
Lunny Xiao [Sun, 13 Aug 2023 20:09:25 +0000 (04:09 +0800)]
Fix storage path logic especially for relative paths (#26441)

This PR rewrites the function `getStorage` and make it more clear.

Include tests from #26435, thanks @earl-warren

---------

Co-authored-by: Earl Warren <contact@earl-warren.org>
14 months agoRename `Sync2` -> `Sync` (#26479)
delvh [Sun, 13 Aug 2023 19:17:21 +0000 (21:17 +0200)]
Rename `Sync2` -> `Sync` (#26479)

The xorm `Sync2` has already been deprecated in favor of `Sync`,
so let's do the same inside the Gitea codebase.

Command used to replace everything:
```sh
for i in $(ag Sync2 --files-with-matches); do vim $i -c ':%sno/Sync2/Sync/g' -c ':wq'; done
```

14 months agoAdd ThreadID parameter for Telegram webhooks (#25996)
Earl Warren [Sun, 13 Aug 2023 14:00:06 +0000 (16:00 +0200)]
Add ThreadID parameter for Telegram webhooks (#25996)

Telegram has recently implemented threads (channels) for group chats.

Co-authored-by: neveraskedtoexist <matikot415@gmail.com>
14 months agoFix stderr usages (#26477)
wxiaoguang [Sun, 13 Aug 2023 12:49:30 +0000 (20:49 +0800)]
Fix stderr usages (#26477)

14 months agoUse correct pull request commit link instead of a generic commit link (#26434)
Lunny Xiao [Sun, 13 Aug 2023 09:04:42 +0000 (17:04 +0800)]
Use correct pull request commit link instead of a generic commit link (#26434)

Replace #26197
Since #25528 merged, the links of pull request commits should be
redirect to pull file changes UI but not the generic one.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
14 months agoClose stdout correctly for "git blame" (#26470)
wxiaoguang [Sun, 13 Aug 2023 02:11:20 +0000 (10:11 +0800)]
Close stdout correctly for "git blame" (#26470)

Close stdout correctly for "git blame", otherwise the failed "git blame"
would case the request hanging forever.

And "os.Stderr" should never (seldom) be used as git command's stderr

14 months agoRefactor tests (#26464)
wxiaoguang [Sat, 12 Aug 2023 16:30:16 +0000 (00:30 +0800)]
Refactor tests (#26464)

1. Give the global variable clear names
2. Use generic parameter for `onGiteaRun`

14 months agoRemove last newline from config file (#26468)
wxiaoguang [Sat, 12 Aug 2023 15:28:35 +0000 (23:28 +0800)]
Remove last newline from config file (#26468)

When users put the secrets into a file (GITEA__sec__KEY__FILE), the
newline sometimes is different to avoid (eg: echo/vim/...)

So the last newline could be removed when reading, it makes the users
easier to maintain the secret files.

Co-authored-by: Giteabot <teabot@gitea.io>
14 months agoAdd matrix to support (#26382)
John Olheiser [Sat, 12 Aug 2023 14:54:50 +0000 (09:54 -0500)]
Add matrix to support (#26382)

This PR adds our matrix space to the support options and alphabetizes
the list.

I also considered adding our Mastodon, however that isn't as suitable as
the other options because it's just whoever has access to the account vs
a community chat/forum.

---------

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
14 months agoRefactor project templates (#26448)
Denys Konovalov [Sat, 12 Aug 2023 10:30:28 +0000 (12:30 +0200)]
Refactor project templates (#26448)

This PR refactors a bunch of projects-related code, mostly the
templates.
The following things were done:
  - rename boards to columns in frontend code
  - use the new `ctx.Locale.Tr` method
  - cleanup template, remove useless newlines, classes, comments
  - merge org-/user and repo level project template together
    - move "new column" button into project toolbar
- move issue card (shared by projects and pinned issues) to shared
template, remove useless duplicated styles
- add search function to projects (to make the layout more similar to
milestones list where it is inherited from :laughing:)
  - maybe more changes I forgot I've done :laughing:

Closes #24893

After:
![Bildschirmfoto vom 2023-08-10
23-02-00](https://github.com/go-gitea/gitea/assets/47871822/cab61456-1d23-4373-8163-e567f1b3b5f9)
![Bildschirmfoto vom 2023-08-10
23-02-26](https://github.com/go-gitea/gitea/assets/47871822/94b55d60-5572-48eb-8111-538a52d8bcc6)
![Bildschirmfoto vom 2023-08-10
23-02-46](https://github.com/go-gitea/gitea/assets/47871822/a0358f4b-4e05-4194-a7bc-6e0ecba5a9b6)

---------

Co-authored-by: silverwind <me@silverwind.io>
14 months agoAvoiding accessing undefined mentionValues (#26461)
wxiaoguang [Sat, 12 Aug 2023 08:36:23 +0000 (16:36 +0800)]
Avoiding accessing undefined mentionValues (#26461)

The `window.config.mentionValues` might be undefined:

```
{{if or .Participants .Assignees .MentionableTeams}}
    mentionValues: ...
{{end}}
```

14 months agoTweak actions menu (#26278)
silverwind [Sat, 12 Aug 2023 08:26:53 +0000 (10:26 +0200)]
Tweak actions menu (#26278)

Ressurect lost changes from
https://github.com/go-gitea/gitea/pull/24451.

- Always show icons for each entry in the menu
- Make all checkboxes toggle only their feature, e.g. "seconds" and
"timestamps" can now be toggled on together.
- Reorder the items

<img width="845" alt="Screenshot 2023-08-01 at 19 19 27"
src="https://github.com/go-gitea/gitea/assets/115237/8a76e9bf-7966-42a6-87c9-e88cdddaec82">

---------

Co-authored-by: Giteabot <teabot@gitea.io>
14 months agoAdjust minio new sequence, now it will check whether bucket exist first and then...
Lunny Xiao [Sat, 12 Aug 2023 08:03:54 +0000 (16:03 +0800)]
Adjust minio new sequence, now it will check whether bucket exist first and then create one if it doesn't exist (#26420)

For some reason, the permission of the client_id and secret may cannot
create bucket, so now we will check whether bucket does exist first and
then try to create a bucket if it doesn't exist.

Try to fix #25984

Co-authored-by: silverwind <me@silverwind.io>
14 months agoSet commit id when ref used explicitly (#26447)
Jack Hay [Sat, 12 Aug 2023 07:33:12 +0000 (03:33 -0400)]
Set commit id when ref used explicitly (#26447)

In the `RepoRefForAPI()` context function `CommitID` is not set if `ref`
is used. It is set correctly for other if/else branches where `Commit`
is set. It doesn't appear that any routes that use `RepoRefForAPI()`
also use `CommitID` but that may be the case in the future.

## Changes
- Sets `ctx.Repo.CommitID` when `ref` is explicitly used for api routes
that use `RepoRefForAPI()`

14 months agoFix 404 error when remove self from an organization (#26362)
yp05327 [Sat, 12 Aug 2023 07:02:22 +0000 (16:02 +0900)]
Fix 404 error when remove self from an organization (#26362)

Same to #24322

Not only `leave` action but also `remove` action should check whether
user still belongs to the org.

14 months agoUpdate index doc (#26455)
CaiCandong [Sat, 12 Aug 2023 00:49:23 +0000 (08:49 +0800)]
Update index doc (#26455)

In the previous feature description, numerous functionalities of Gitea
were listed, which appeared redundant and failed to highlight the unique
characteristics of Gitea. Therefore, I have rewritten this section based
on the description provided on the official Gitea website

14 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 12 Aug 2023 00:20:47 +0000 (00:20 +0000)]
[skip ci] Updated translations via Crowdin

14 months agoremove unnecessary explore org template (#26459)
Denys Konovalov [Fri, 11 Aug 2023 20:07:04 +0000 (22:07 +0200)]
remove unnecessary explore org template (#26459)

14 months agoFix URL of padlock icon in profile (#26446)
Panagiotis "Ivory" Vasilopoulos [Fri, 11 Aug 2023 17:40:38 +0000 (17:40 +0000)]
Fix URL of padlock icon in profile (#26446)

14 months agoCount only visible repos on profile (#25928)
JakobDev [Fri, 11 Aug 2023 17:08:05 +0000 (19:08 +0200)]
Count only visible repos on profile (#25928)

Fixes #25914

14 months agoUpdate upgrade documentation to add a check for deprecated configurations (#26451)
Lunny Xiao [Fri, 11 Aug 2023 05:53:23 +0000 (13:53 +0800)]
Update upgrade documentation to add a check for deprecated configurations (#26451)

fix
https://github.com/go-gitea/gitea/issues/25995#issuecomment-1674096710

---------

Co-authored-by: silverwind <me@silverwind.io>
14 months agoFall back to esbuild for css minify (#26445)
silverwind [Fri, 11 Aug 2023 04:13:25 +0000 (06:13 +0200)]
Fall back to esbuild for css minify (#26445)

Fixes https://github.com/go-gitea/gitea/issues/26439.

The minification result is not ideal with esbuild, but it's better than
failing competely.

Co-authored-by: Giteabot <teabot@gitea.io>
14 months agoUpdate JS dependencies (#26449)
silverwind [Fri, 11 Aug 2023 00:29:15 +0000 (02:29 +0200)]
Update JS dependencies (#26449)

- Update all JS dependencies
- Tested Monaco and Swagger

14 months agoCall git.InitSimple for runRepoSyncReleases (#26396)
wxiaoguang [Thu, 10 Aug 2023 22:42:48 +0000 (06:42 +0800)]
Call git.InitSimple for runRepoSyncReleases (#26396)

Fix #26394

Otherwise, the git module is not initialized and it doesn't respect the
"timeout" config in app.ini

14 months agoTarget specific OS for devcontainer base image (#26422)
techknowlogick [Thu, 10 Aug 2023 21:57:29 +0000 (17:57 -0400)]
Target specific OS for devcontainer base image (#26422)

fixes #25842

credit to philippbeckmann for discovering this

14 months agoLock go to 1.21 on CI (#26433)
silverwind [Thu, 10 Aug 2023 21:53:44 +0000 (23:53 +0200)]
Lock go to 1.21 on CI (#26433)

To prevent unwanted surprises with new minor versions of go, lock the
version to minor version using [semver tilde
syntax](https://github.com/npm/node-semver#tilde-ranges-123-12-1). We
were already getting 1.21.0 since yesterday, so use that version now as
minimum.

14 months agoAlways show usernames in reaction tooltips (#26444)
Panagiotis "Ivory" Vasilopoulos [Thu, 10 Aug 2023 21:20:01 +0000 (21:20 +0000)]
Always show usernames in reaction tooltips (#26444)

Even if GetDisplayName() is normally preferred elsewhere, this change
provides more consistency, as usernames are also always being shown
when participating in a conversation taking place in an issue or
a pull request. This change makes conversations easier to follow, as
you would not have to have a mental association between someone's
username and someone's real name in order to follow what is happening.

This behavior matches GitHub's. Optimally, both the username and the
full name (if applicable) could be shown, but such an effort is a
much bigger task that needs to be thought out well.

14 months agoFix incorrect redirection in new issue using references (#26440)
CaiCandong [Thu, 10 Aug 2023 20:04:08 +0000 (04:04 +0800)]
Fix incorrect redirection in new issue using references (#26440)

fix #26427
related https://github.com/go-gitea/gitea/pull/25258

---

Before:

![gitea](https://github.com/go-gitea/gitea/assets/50507092/ed8d3a17-1f63-42f2-a698-3b684e70dc91)

---

After:

![After](https://github.com/go-gitea/gitea/assets/50507092/b8e1338f-c520-4abc-b0df-b812c021ac7e)