1
1
mirror of https://github.com/go-gitea/gitea synced 2024-12-22 08:34:26 +00:00
Commit Graph

18787 Commits

Author SHA1 Message Date
Giteabot
57868c2315
Fix locale (#32937) (#32942) 2024-12-21 19:10:42 -05:00
Giteabot
b1c21880c1
Update i18n.go - Language Picker (#32933) (#32935) 2024-12-21 10:24:17 -05:00
wxiaoguang
1e71ad89ce
Deprecated gopid in log (#32932) 2024-12-20 16:20:51 +00:00
Giteabot
c20642fa99
Relax the version checking for Arch packages (#32908) (#32913)
Backport #32908 by ExplodingDragon

It is mentioned in https://man.archlinux.org/man/PKGBUILD.5: 'The
variable is not allowed to contain colons, forward slashes, hyphens, or
whitespace.'

`_` is also an allowed character, and some software in the Arch Linux
AUR uses this naming convention.

Co-authored-by: Exploding Dragon <explodingfkl@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-19 19:02:58 +08:00
Giteabot
a4291fd553
Add more load functions to make sure the reference object loaded (#32901) (#32912)
Backport #32901 by @lunny

Fix #32897

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-12-19 10:14:04 +01:00
techknowlogick
fa5a064559
bump x/net (#32896) (#32899)
backport #32896 to 1.23
2024-12-18 22:44:55 +00:00
Giteabot
cb42232080
Fix Arch package metadata introduced incorrect field (#32881) (#32882)
Backport #32881 by ExplodingDragon

Incorrect content was introduced while generating the index, which has
now been removed, and the missing fields have been added.

Co-authored-by: Exploding Dragon <explodingfkl@gmail.com>
2024-12-18 12:56:47 +01:00
Lunny Xiao
c8ffe777cf
Add 1.23.0-rc0 changelog (#32863)
Notice: some of pull requests haven't been added to the changelog

- Which have been backported to v1.22
-
https://github.com/go-gitea/gitea/pulls?q=sort%3Aupdated-desc+is%3Apr+milestone%3A1.23.0+is%3Amerged+label%3Abackport%2Fv1.22
- Which have skip-changelog
-
https://github.com/go-gitea/gitea/pulls?q=sort%3Aupdated-desc+is%3Apr+milestone%3A1.23.0+is%3Amerged+-label%3Abackport%2Fv1.22+label%3Askip-changelog
- Build and Testing
-
https://github.com/go-gitea/gitea/pulls?q=sort%3Aupdated-desc+is%3Apr+milestone%3A1.23.0+is%3Amerged+label%3Abackport%2Fv1.22+label%3Atype%2Ftesting
-
https://github.com/go-gitea/gitea/pulls?q=sort%3Aupdated-desc+is%3Apr+milestone%3A1.23.0+is%3Amerged+label%3Abackport%2Fv1.22+label%3Atopic%2Fbuild
- No `type` label marked may be missed, I need to check one by one, but
I believe those are not too many.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-17 12:00:55 +08:00
wxiaoguang
e98dd6ee5b
Backport 1.23 (#32868)
Co-authored-by: delvh <dev.lh@web.de>
2024-12-17 11:58:27 +08:00
wxiaoguang
22c4599542
Improve Actions status aggregations (#32860)
Make the result the same as GitHub:

* all skipped, then result is skipped
* any cancelled, then result cancelled
2024-12-16 21:49:53 +08:00
wxiaoguang
d28a4843b8
Fix incomplete Actions status aggregations (#32859)
fix #32857
2024-12-16 11:18:00 +08:00
hiifong
276f43330c
Do not display attestation-manifest and use short sha256 instead of full sha256 (#32851)
Related: #24973

Before:

![image](https://github.com/user-attachments/assets/bca17900-5075-4d15-af7a-c71bf8979c04)

After:

![image](https://github.com/user-attachments/assets/c5a24e3b-763b-4463-80db-d4dbd89f7dc4)

Index:
```json
{
  "schemaVersion": 2,
  "mediaType": "application/vnd.oci.image.index.v1+json",
  "manifests": [
    {
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "digest": "sha256:5967afffdfde104ca1459286a72346baaef8b70ac153325d7a6cd85c7734ac6e",
      "size": 672,
      "platform": {
        "architecture": "amd64",
        "os": "linux"
      }
    },
    {
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "digest": "sha256:f9abfcc55320f9ff1f38eeb7dbb4bea10b29c7febfa49ccd7aab9fa02403b9f0",
      "size": 672,
      "platform": {
        "architecture": "arm64",
        "os": "linux"
      }
    },
    {
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "digest": "sha256:d70ad19d00c19e40691045cbddc3e8a5a4454c31cc454d1132b13bcaf35b6d46",
      "size": 566,
      "annotations": {
        "vnd.docker.reference.digest": "sha256:5967afffdfde104ca1459286a72346baaef8b70ac153325d7a6cd85c7734ac6e",
        "vnd.docker.reference.type": "attestation-manifest"
      },
      "platform": {
        "architecture": "unknown",
        "os": "unknown"
      }
    },
    {
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "digest": "sha256:73bc233bf4eac96a404ce3e0430b698831a4ea7050c878d5f76d1d1f133751dd",
      "size": 566,
      "annotations": {
        "vnd.docker.reference.digest": "sha256:f9abfcc55320f9ff1f38eeb7dbb4bea10b29c7febfa49ccd7aab9fa02403b9f0",
        "vnd.docker.reference.type": "attestation-manifest"
      },
      "platform": {
        "architecture": "unknown",
        "os": "unknown"
      }
    }
  ]
}
```

---------

Co-authored-by: silverwind <me@silverwind.io>
2024-12-16 10:22:49 +08:00
yp05327
300b724abf
Leave MAINTAINERS and the organization (#32820)
## Why join
I didn’t talk about myself before, so some people may think that I am an
employee from the company. So I think it is necessary to talk about why
and how I joined.
At the begining, my boss gave me a task to find a git software which can
self hosted in on-premise. Then I found that there are not many project
which meet our needs. But finally, I found Gitea. A easy use, easy
maintenance, and without a good machine you can also run it.
At that time, I just finished my previous work which is using helm to
deploy something in K8s. So I tried to use Gitea’s helm chart to deploy
in my work PC to see whether we can use it. But soon, I found a bug, and
reported it (https://gitea.com/gitea/helm-chart/issues/382), but after
about 1 month, there’s no fix. So I try to check the source code, and I
found that it is caused by Gitea’s code and it is easy to fix it. So I
created an issue (https://github.com/go-gitea/gitea/issues/22523) in
Gitea. But unfortunately, after a long time again, it is still not
fixed. So I tried to finish it by myself.
I’m not a pro programmer, coding is just my hobby since I was 13 or 14
years old. (I will tell the reason later), I even don’t know the
workflow about the contribution of OSS, so maybe I did some bad things
at the early time, I apologize.
But the people here are very kind, at that time, I start to consider
whether it has worth to recommend to my boss. So I started to use it,
but I found more and more bugs in a short time. Japanese company is very
sensitive to it, so I gave up to recommend.
But I can try to fix them! Because I can learn too many things during
the contribution, not just about the programing but also the usage of
other tools and the general contribution rule in the world of OSS. It
let me grow up, and to become (maybe) a perfect full-stack engineer
which is my dream. (Why it is my dream? I made a wrong decision in my
college, I took/followed the advice of my parent, choosed communications
engineering instead of computer science which is my favorite thing)
 
# Why leave
Several days ago, there’s an
[article](https://juejin.cn/post/7446578471901626420#comment) came into
my eye. Something about JiHu (GitLab Ltd in China) start to file a
lawsuit to the company which is using GitLab CE version which is under
MIT License. So people start to find other git service/application to
avoid it. And in the this article, a project called Fogejo is mentioned.
It says it is a hard-fork of Gitea. But I don’t know the meaning of
`hard-fork`, so I access the home page of this project to find where it
comes from.
Finally, I found it here:
https://forgejo.org/compare-to-gitea/#why-was-forgejo-created. They
said:
> As of early 2024, Forgejo is developed independently of Gitea, as a
“hard-fork”.

`hard-fork` has a quotation, so the meaning is not the original meaning
of it, but they said `as`, which means `like` or `similar` I think. So
just focus on the words before `as` is ok, because `hard-fork` is a
simile, `As of early 2024, Forgejo is developed independently of Gitea`
is what they want to say.
In my mind, this means:
since early 2024 Forgejo’s codes (new changes) are all written by
themselves, and emphasize that these changes are not related to Gitea,
because they can simply say `As of early 2024, Forgejo is developed
independently, as a “hard-fork”`

But after I check the commit history, I can still find some strange
commits in recent month:

https://codeberg.org/forgejo/forgejo/commits/branch/forgejo/search?q=author%3Ayp05327&all=
The author is me, but the commit is signed by someone I even never
heard.
Considering the words they said above, it feels/sounds like my work has
become their work. Although Gitea is under MIT license, is this allowed
in the OSS world?
Even it is allowed, I can not accept it personally.
So I created a issue to ask them:
https://codeberg.org/forgejo/forgejo/issues/6236
https://codeberg.org/forgejo/discussions/issues/251

Finally, it seems that they understood the problem and promised to
improve it. But I also required a public statement to explain it which
means they need to apologize, otherwise it is hard to the users who
believe these are all their work know it, and it seems they ignored some
of my words again? So it is hard for me to believe they will really make
changes and post the apologize. If they did, I will consider to come
back. Otherwise, I think there’s no worth to continually contribute to
any OSS project, so I decided to leave.

ps: TOC voting is still ongoing, please remove me from the list. And I
will leave the organization after the merge.

At the end, thanks to all people who have helped me to finish the
contribution and teach me new knowledges.
2024-12-16 00:38:18 +00:00
GiteaBot
5e22e511de [skip ci] Updated licenses and gitignores 2024-12-16 00:35:55 +00:00
Lunny Xiao
42090844ed
Fix bug on action list deleted branch (#32848)
Fix
https://github.com/go-gitea/gitea/issues/32761#issuecomment-2540946064

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-16 05:38:39 +08:00
silverwind
c8ea41b049
Fix remaining typescript issues, enable tsc (#32840)
Fixes 79 typescript errors. Discovered at least two bugs in
`notifications.ts`, and I'm pretty sure this feature was at least
partially broken and may still be, I don't really know how to test it.

After this, only like ~10 typescript errors remain in the codebase but
those are harder to solve.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-16 05:02:32 +08:00
silverwind
74b06d4f5c
Repo file list enhancements (#32835)
1. restore background color
2. fix border radius on top/bottom and on hover
3. parent link is now full-row again, much easier to click
4. parent link now uses directory icon, matching github
5 changed grid layout to remove auto width on file name column which could get too small.
6. mobile layout now shows more of the filename.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-15 16:56:56 +00:00
wxiaoguang
b01b0b99a5
Refactor some LDAP code (#32849) 2024-12-15 11:59:18 +00:00
TheFox0x7
33e8e82c4b
Enable tenv and testifylint rules (#32852)
Enables tenv and testifylint linters
closes: https://github.com/go-gitea/gitea/issues/32842
2024-12-15 10:41:29 +00:00
silverwind
df9a78cd04
Tweak repo sidebar (#32847)
Before and after:

<img width="218" alt="Screenshot 2024-12-15 at 04 53 53"
src="https://github.com/user-attachments/assets/299b1f0a-ba72-47c6-b662-a9d540d4d741"
/>
<img width="222" alt="Screenshot 2024-12-15 at 04 53 41"
src="https://github.com/user-attachments/assets/5a2b5332-e324-4d20-82e9-21d1c850e826"
/>

Diff without whitespace:
https://github.com/go-gitea/gitea/pull/32847/files?diff=unified&w=1

The `tw-mt-2` is fine even if the element renders empty:

<img width="387" alt="image"
src="https://github.com/user-attachments/assets/76a976e4-ba2e-48a5-9248-c361552a937a"
/>

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-15 10:01:46 +00:00
Lunny Xiao
9264811217
Remove translation to issue add time because the format is fixed should not be translated (#32850)
The input content should always be `1h 2m 3s` and will be the same on
different UI languages. So the translation is wrong.
2024-12-15 07:44:13 +00:00
wxiaoguang
d1c1e3cbcc
Fine tune ssh related comments and code (#32846)
Add more comments to explain the ssh problem, 
and rename `sshConn` to `sshSession`
2024-12-15 06:07:50 +00:00
silverwind
1cfb718976
Update golangci-lint to v1.62.2, fix issues (#32845)
Update it and fix new issues related to `redefines-builtin-id`
2024-12-15 02:31:07 +00:00
hiifong
7616aeb2ea
In some lfs server implementations, they require the ref attribute. (#32838)
Fix: #32611

In some lfs server implementations, they require the ref attribute.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-15 02:06:21 +00:00
mevius4
32059158da
Fix SSPI button visibility when SSPI is the only enabled method (#32841) 2024-12-15 09:41:36 +08:00
silverwind
1a07ebe549
Fix overflow on org header (#32837) 2024-12-14 06:50:12 +00:00
wxiaoguang
cc5ff98e0d
Refactor markdown math render (#32831)
Add more tests
2024-12-14 13:43:05 +08:00
hiifong
82c59d52ea
Add User-Agent for gitea's self-implemented lfs client. (#32832) 2024-12-14 03:35:19 +00:00
silverwind
bed563e574
Improve JSX/TSX support in code editor (#32833)
Two tweaks to Monaco to improve JSX/TSX support.

1. Certain language features like JSX/TSX only work when passing `uri`
(containing the filename), do this.
2. Set the `jsx` compiler option to avoid error annotations

Before:
<img width="441" alt="Screenshot 2024-12-13 at 15 11 33"
src="https://github.com/user-attachments/assets/dac245a7-e80f-4249-8e09-13124b03d12a"
/>

After:
<img width="441" alt="Screenshot 2024-12-13 at 15 10 46"
src="https://github.com/user-attachments/assets/726ad712-d116-438d-88da-bc40534b6860"
/>
2024-12-14 03:10:20 +00:00
Yarden Shoham
2ee4aa8998
Upgrade htmx to 2.0.4 (#32834)
Release notes:
https://github.com/bigskysoftware/htmx/releases/tag/v2.0.4

Tested `Star`, `Watch`, and the admin dashboard page. All functionality
remains unchanged.

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
2024-12-14 02:34:03 +00:00
Zettat123
7269130d28
Fix missing outputs for jobs with matrix (#32823)
Fix #32795

If a job uses a matrix, multiple `ActionRunJobs` may have the same
`JobID`. We need to merge the outputs of these jobs to make them
available to the jobs that need them.
2024-12-14 10:22:30 +08:00
wxiaoguang
a66c16dc1b
Allow to fork repository into the same owner (#32819)
This feature is experimental, not fully tested, and may be changed in
the future.

It is only designed for users who really need it: set
`[repository].ALLOW_FORK_INTO_SAME_OWNER=true` in your app.ini

Doc: https://gitea.com/gitea/docs/pulls/122


![image](https://github.com/user-attachments/assets/38d08c23-9cfc-49d8-9321-ff81edf65395)
2024-12-14 09:39:05 +08:00
wxiaoguang
5bc030efa2
Fix various UI bugs (#32821) 2024-12-13 01:45:32 -05:00
Lunny Xiao
887928e0a6
Add missing two sync feed for refs/pull (#32815)
Fowllow #32659
2024-12-13 04:22:39 +00:00
wxiaoguang
2910f384d5
Fix misuse of PublicKeyCallback (#32810)
Only upgrading the ssh package is not enough.
2024-12-13 03:57:37 +00:00
hiifong
30008fcfcf
Fix bug of branch/tag selector in the issue sidebar (#32744)
Fix: #32731

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-13 00:45:06 +00:00
hiifong
0b8a8941a0
Fix lfs migration (#32812)
Fix: #32803
2024-12-12 21:36:39 +00:00
Rowan Bohde
a03fdd9566
Avoid MacOS keychain dialog in integration tests (#32813)
Mac's git installation ships with a system wide config that configures
the credential helper `osxkeychain`, which will prompt the user with a
dialog.

```
$ git config list --system 
credential.helper=osxkeychain
```
By setting the environment variable
[`GIT_CONFIG_NOSYSTEM=true`](https://git-scm.com/docs/git-config#ENVIRONMENT),
Git will not load the system wide config, preventing the dialog from
populating.

Closes #26717
2024-12-12 21:10:47 +00:00
techknowlogick
ab6d819a89
Update actionlint.yaml 2024-12-12 15:45:27 -05:00
Lunny Xiao
6370d2fb93
Detect whether action view branch was deleted (#32764)
Fix #32761 

![图片](https://github.com/user-attachments/assets/a5a7eef8-0fea-4242-b199-1b0b73d9bbdb)
2024-12-12 19:28:23 +00:00
Chai-Shi
c9487a755b
Add "n commits" link to contributors in contributors graph page (#32799)
Fixes Issue #29365 and inherit PR #29429

- I should extend the #29429 fork but the fork is not synced, so I
created another PR.
- Use `silenced` class for the link, as in #29847

---------

Co-authored-by: Ben Chang <ben_chang@htc.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-12 19:02:54 +00:00
wxiaoguang
00e2b339b6
Fix "unicode escape" JS error (#32806)
<details>


![image](https://github.com/user-attachments/assets/98aef2fb-791e-4b4a-b2ac-e880f8a52040)


![image](https://github.com/user-attachments/assets/532673ae-c4cf-4d84-a5c6-93e6eacd341c)


![image](https://github.com/user-attachments/assets/2a241a3d-b7f6-44ca-89d9-9d68386fbf3e)


![image](https://github.com/user-attachments/assets/1251e43d-41f2-42d1-a23b-3182e3812c3d)

</details>

---------

Co-authored-by: silverwind <me@silverwind.io>
2024-12-12 18:37:44 +00:00
techknowlogick
566f5356db
use dedicated runners for release artifacts (#32811)
GH runners are having trouble, so switch the remaining release jobs to
use dedicated runners.
2024-12-12 12:02:59 -05:00
wxiaoguang
22bf2ca6ba
Make API "compare" accept commit IDs (#32801) 2024-12-12 08:10:09 +00:00
Kemal Zebari
01b1896bf5
Implement update branch API (#32433)
Resolves #22526.

Builds upon #23061.

---------

Co-authored-by: sillyguodong <33891828+sillyguodong@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-12 05:02:35 +00:00
wxiaoguang
1e751d81b3
Fix JS error when dropping a file to a editor without dropzone (#32804)
`dropzoneEl` may not exist
2024-12-12 12:37:25 +08:00
RiceChuan
dfd7594499
chore: use errors.New to replace fmt.Errorf with no parameters (#32800)
use errors.New to replace fmt.Errorf with no parameters

Signed-off-by: RiceChuan <lc582041246@gmail.com>
2024-12-12 12:26:11 +08:00
silverwind
ee45950dab
Switch to eslint-plugin-import-x (#32790)
Switch from deprecated `eslint-plugin-i` to
[`eslint-plugin-import-x`](https://github.com/un-ts/eslint-plugin-import-x).
2024-12-12 02:07:32 +00:00
wxiaoguang
17f0411441
Fix clone panel js error (#32798)
side effect of jquery removal, fix #32797
2024-12-12 02:01:20 +00:00
GiteaBot
1893b32670 [skip ci] Updated translations via Crowdin 2024-12-12 00:34:20 +00:00