Commit graph

18002 commits

Author SHA1 Message Date
silverwind
eadf1d4fa3
Inline the css-variables-parser dependency (#29571)
Get rid of the `postcss@7` dependency by inlining this simple function.

(cherry picked from commit d769b664dedb5f63b73146b58b21c0a772c2630d)
2024-03-11 23:36:57 +07:00
silverwind
2e9ca0597d
Replace some gt- classes with tw- (#29570)
Replace 18 `gt-` prefixes with `tw-` with perl replacement. I manually
checked them all with `rg` afterwards.

(cherry picked from commit a2e90014ec20a1085449a66061389cfe0d12260f)

Conflicts:
	templates/repo/header.tmpl
	because some of the header moved to header_fork.tmpl
2024-03-11 23:36:57 +07:00
Gusted
4dbf2d7c11 Merge pull request 'Better number for UserCards pagination' (#2584) from 0ko/forgejo:its39 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2584
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
2024-03-11 15:53:59 +00:00
Earl Warren
c63599d5c9 Merge pull request 'Improve English names & consistency' (#2610) from 0ko/forgejo:english20240308 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2610
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-11 14:06:46 +00:00
Earl Warren
339cbc4cd0 Merge pull request '[DEPS] Bump mysql driver' (#2623) from gusted/forgejo-bump-mysql into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2623
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-10 17:16:15 +00:00
Shiny Nematoda
3b2f28ff1c [PORT] Fix wrong line number in code search result (gitea#29260) (#2619)
Port [Fix wrong line number in code search result (gitea#29260)](https://github.com/go-gitea/gitea/pull/29260)

PS: also added [`-e`](https://git-scm.com/docs/git-grep#Documentation/git-grep.txt--e) before passing the keyword (my bad)

Co-authored-by: yp05327 <576951401@qq.com>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2619
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
Co-committed-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
2024-03-10 15:35:30 +00:00
0ko
671a4ff402 [I18N] Improve English names & consistency 2024-03-10 19:10:29 +05:00
Gusted
578f0b3335
[DEPS] Bump mysql driver
- Bump the SQL driver for MySQL to
[v1.8.0](https://github.com/go-sql-driver/mysql/releases/tag/v1.8.0),
which notably includes support for ed25519 authentication scheme (by
yours truly).
- Resolves #1868
2024-03-10 14:57:56 +01:00
0ko
b2bc233517 Test pagination of repo stars, watchers and forks
based on code suggested in https://codeberg.org/forgejo/forgejo/pulls/2584#issuecomment-1647897 and https://codeberg.org/forgejo/forgejo/pulls/2584#issuecomment-1655289

Co-authored-by: Gusted <gusted@noreply.codeberg.org>
2024-03-10 17:15:59 +05:00
Earl Warren
79f8339c74 Merge pull request 'Fix repo unarchivation button' (#2550) from 0ko/forgejo:unarchive_btn into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2550
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-03-10 06:31:47 +00:00
0ko
8f8b608fd7 Add test to UI of archive/unarchive related actions 2024-03-09 13:29:23 +00:00
0ko
097eb0802a Fix repo unarchivation button 2024-03-09 13:29:23 +00:00
0ko
9b214b362d fix: indicate there are no projects to choose from 2024-03-08 09:43:27 +05:00
0ko
3a375a1de3 fix: don't hide projects from sidebar when they're disabled in repo 2024-03-08 09:33:52 +05:00
oliverpool
6313b89e53 Merge '[BUG] prevent removing session cookie when redirect_uri query contains ://' (#2590)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2590
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-03-07 21:38:09 +00:00
Gusted
5a1700c84b Merge pull request 'Improve English locale for admin settings' (#2583) from 0ko/forgejo:english20240306 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2583
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
2024-03-07 20:48:37 +00:00
Gusted
16cd8f9b8e Merge pull request 'Port "Fix wrong test usage of AppSubURL"' (#2586) from gusted/forgejo-port-gt-29459 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2586
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
2024-03-07 18:55:54 +00:00
oliverpool
7444f9981e implement fix 2024-03-07 10:53:43 +01:00
oliverpool
ecfcbcb19f [BUG] prevent removing session cookie when redirect_uri query contains :// 2024-03-07 10:52:30 +01:00
0ko
498a3f988d Better number for UserCards pagination 2024-03-07 13:30:12 +05:00
KN4CK3R
8f55cf199d
Port "Fix wrong test usage of AppSubURL"
- Port of https://github.com/go-gitea/gitea/pull/29459
- The tests use an invalid `setting.AppSubURL`. The wrong behaviour
disturbs other PRs like https://github.com/go-gitea/gitea/pull/29222
and https://github.com/go-gitea/gitea/pull/29427.
2024-03-06 21:47:44 +01:00
Gusted
b9e27b64e6 Merge pull request '[BUG] Disable CODEOWNERS for forked repositories' (#2537) from gusted/forgejo-codeowner-forked into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2537
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-06 18:18:58 +00:00
0ko
23fae5ec08 [I18N] Improve English locale for admin settings 2024-03-06 22:21:19 +05:00
Gusted
d759bec64f Merge pull request '[BUG] Remember topic only in repo search' (#2575) from gusted/forgejo-port-1 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2575
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-03-06 13:55:45 +00:00
Gusted
e793e28f94
[BUG] Remember topic only in repo search
- Ports b4360d504c
2024-03-06 13:22:39 +01:00
Earl Warren
4565f5fbc9
[RELEASE] v1.21.7-0 release notes (cosmetic changes) 2024-03-06 18:20:27 +08:00
jilen
f4fd81b5d1 Add minio bucket lookup type option 2024-03-06 09:38:02 +00:00
Earl Warren
c2f4fcca5a Merge pull request '[RELEASE] v1.21.7-0 release notes' (#2572) from earl-warren/forgejo:wip-release-notes-1.21 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2572
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-03-06 09:14:00 +00:00
Earl Warren
025798d0f6 Merge pull request '[gitea] cherry-pick' (#2545) from earl-warren/forgejo:wip-gitea-cherry-pick into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2545
Reviewed-by: Otto <otto@codeberg.org>
2024-03-06 08:59:04 +00:00
Codeberg Translate
d17401ac91 [I18N] Translations update from Weblate (#2556)
Translations update from [Weblate](https://translate.codeberg.org) for [Forgejo/forgejo](https://translate.codeberg.org/projects/forgejo/forgejo/).

Current translation status:

![Weblate translation status](https://translate.codeberg.org/widget/forgejo/forgejo/horizontal-auto.svg)

Co-authored-by: Wuzzy <wuzzy@disroot.org>
Co-authored-by: Dirk <dirk@0x7be.de>
Co-authored-by: fnetX <otto@codeberg.org>
Co-authored-by: EssGeeEich <grassia.mauro@gmail.com>
Co-authored-by: Xinayder <me+codeberg@aoalmeida.com>
Co-authored-by: mondstern <mondstern@monocles.de>
Co-authored-by: Panagiotis \"Ivory\" Vasilopoulos <git@n0toose.net>
Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: acioustick <acioustick@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2556
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-03-06 08:55:20 +00:00
Earl Warren
95cd619d37
[RELEASE] v1.21.7-0 release notes 2024-03-06 13:30:41 +08:00
Earl Warren
a71f54654a Merge pull request 'Revert "[CI] pin go v1.21.8 version"' (#2569) from earl-warren/forgejo:wip-ci-go-action into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2569
2024-03-06 05:09:31 +00:00
Earl Warren
dc354ae0f7
Revert "[CI] pin go v1.21.8 version"
This reverts commit ac0f58035f.
2024-03-06 12:14:44 +08:00
wxiaoguang
de6768ed54
Add an trailing slash to dashboard links (#29555)
Fix #29533, and add some tests for "base/paginate.tmpl"

(cherry picked from commit 8553b4600e3035b6f6ad6907c37cebd013fa4d64)

Conflicts:
	services/contexttest/context_tests.go
	trivial conflict because
	"Improve user experience for outdated comments" was skipped
2024-03-06 12:10:47 +08:00
Earl Warren
cfce4e089e
Partial cherry-pick: a4859dcfea Improve user experience for outdated comments (#29050) 2024-03-06 12:10:47 +08:00
6543
ff8f7a7a0d
Extend issue template yaml engine (#29274)
Add new option:

`visible`: witch can hide a specific field of the form or the created
content afterwards

It is a string array witch can contain `form` and `content`. If only
`form` is present, it wont show up in the created issue afterwards and
the other way around. By default it sets both except for markdown

As they are optional and github don't have any similar thing, it is non
breaking and also do not conflict with it.

With this you can:
- define "post issue creation" elements like a TODO list to track an
issue state
- make sure to have a checkbox that reminds the user to check for a
thing but dont have it in the created issue afterwards
- define markdown for the created issue (was the downside of using yaml
instead of md in the past)
 - ...

## Demo

```yaml
name: New Contribution
description: External Contributor creating a pull

body:
- type: checkboxes
  id: extern-todo
  visible: [form]
  attributes:
    label: Contribution Guidelines
    options:
      - label: I checked there exist no similar feature to be extended
        required: true
      - label: I did read the CONTRIBUTION.MD
        required: true
- type: checkboxes
  id: intern-todo
  visible: [content]
  attributes:
    label: Maintainer Check-List
    options:
      - label: Does this pull follow the KISS principe
      - label: Checked if internal bord was notifyed
# ....
```
[Demo
Video](https://cloud.obermui.de/s/tm34fSAbJp9qw9z/download/vid-20240220-152751.mkv)

---
*Sponsored by Kithara Software GmbH*

---------

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
(cherry picked from commit 77e29e0c39392f142627303bd798fb55258072b2)
2024-03-06 12:10:47 +08:00
GiteaBot
ba7983aedc
[skip ci] Updated licenses and gitignores
(cherry picked from commit 2fb917f69e59f8b75825bf4fe659856b9dd02f44)
2024-03-06 12:10:47 +08:00
Earl Warren
10643f1d3a
[DEADCODE] update 2024-03-06 12:10:47 +08:00
yp05327
af19bae813
Fix workflow trigger event IssueChangeXXX bug (#29559)
Bugs from #29308
Follow #29467

partly fix #29558

(cherry picked from commit 9616dbec334aacb32c6d73b01fd749b11b1e3cdb)
2024-03-06 12:10:47 +08:00
Nanguan Lin
c69a0bb506
Fix 500 when pushing release to an empty repo (#29554)
As title.
The former code directly used `ctx.Repo.GitRepo`, causing 500.

22b4f0c09f/routers/api/v1/repo/release.go (L241)
(cherry picked from commit 6e2aafd5130cb9436f02209ae90bf79a58cc13ae)
2024-03-06 12:10:47 +08:00
silverwind
006d4ce6f2
Update js and py dependencies, bump python (#29561)
- Update js and py dependencies excluding `@mcaptcha/vanilla-glue`,
`eslint-plugin-array-func`
- Update stylelint config
- Require python 3.10 and use 3.12 on CI, bump setup-python as well
- Tested markdown toolbar, charts, clipboard, swagger ui, vue

(cherry picked from commit efa631aeead094267d46ea8f86e6d568f0c731e4)

Conflicts:
	.github/workflows/pull-compliance.yml
	does not existin in Forgejo
2024-03-06 12:10:46 +08:00
Tim-Niclas Oelschläger
83e04328df
Filter Repositories by type (#29231)
Filter Repositories by type (resolves #1170, #1318)

before:

![image](https://github.com/go-gitea/gitea/assets/72873130/74e6be62-9010-4ab4-8f9b-bd8afbebb8fb)

after:

![image](https://github.com/go-gitea/gitea/assets/72873130/e4d85ed6-7864-4150-8d72-5194dac1293f)

(cherry picked from commit e3524c63d6d42865ea8288af89b372544d35474b)
2024-03-06 12:10:46 +08:00
Earl Warren
a39f69ac28
Revert "[BUG] Remember topic only in repo search"
This reverts commit b4360d504c.
2024-03-06 12:10:46 +08:00
wxiaoguang
99b1a39aef
Breaking summary for template refactoring (#29395)
https://github.com/go-gitea/gitea/pull/29395
(cherry picked from commit e71b69257c38178eed9ccd0b62a5ae47d67858d4)
2024-03-06 12:10:46 +08:00
GiteaBot
fa6627fadb
[skip ci] Updated translations via Crowdin
(cherry picked from commit 22b4f0c09f1de5e581929bd10f39833d30d2c482)

Conflicts:
	options/locale/locale_ja-JP.ini
	prefer Forgejo translation
2024-03-06 12:10:46 +08:00
wxiaoguang
ff7a032c74
Fix incorrect cookie path for AppSubURL (#29534)
Regression of #24107

(cherry picked from commit 44398e405ffe297997c6b9c8dbb97f966926b65a)
2024-03-06 12:10:46 +08:00
6543
318634ef74
Add option to set language in admin user view (#28449)
![image](https://github.com/go-gitea/gitea/assets/24977596/be7e3f92-af3f-4628-b4ed-abf6439687f3)
`/admin/users/<UserID>/edit`

![image](https://github.com/go-gitea/gitea/assets/24977596/906af0dd-cceb-4ed9-9cd9-32c71ae1bf71)
`/admin/users/<UserID>`

---
*Sponsored by Kithara Software GmbH*

(cherry picked from commit e3e6569c5fd8c69aa65384e6d1636cc14b23a32b)
2024-03-06 12:10:46 +08:00
Yarden Shoham
1e29bccddb
Fix elipsis button not working if the last commit loading is deferred (#29544)
Before this change, if we had more than 200 entries being deferred in
loading, the entire table would get replaced thus losing any event
listeners attached to the elements within the table, such as the elipsis
button and commit list with tippy.

With this change we remove the previous javascript code that replaced
the table and use htmx to replace the table.

htmx attributes added:
- `hx-indicator="tr.notready td.message span"`: attach the loading
spinner to the files whose last commit is still being loaded
- `hx-trigger="load"` trigger the request-replace behavior as soon as
possible
- `hx-swap="morph"`: use the idiomorph morphing algorithm, this is the
thing that makes it so the elipsis button event listener is kept during
the replacement, fixing the bug because we don't actually replace the
table, only modifying it
- `hx-post="{{.LastCommitLoaderURL}}"`: make a post request to this url
to get the table with all of the commit information

As part of this change I removed the handling of partial replacement in
the case we have less than 200 "not ready" files. The first reason is
that I couldn't make htmx replace only a subset of returned elements,
the second reason is that we have a cache implemented in the backend
already so the only cost added is that we query the cache a few times
(which is sure to be populated due to the initial request), and the last
reason is that since the last refactor of this functionality that
removed jQuery we don't properly send the "not ready" entries as the
backend expects `FormData` with `f[]` and we send a JSON with `f` so we
always query for all rows anyway.

# Before

![before](https://github.com/go-gitea/gitea/assets/20454870/482ebfec-66c5-40cc-9c1e-e3b3bfe1bbc1)

# After

![after](https://github.com/go-gitea/gitea/assets/20454870/454c517e-3a4e-4006-a49f-99cc56e0fd60)

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit 937e8b55149388840bbf6c4d7216495bc3dd2fe9)
2024-03-06 12:10:46 +08:00
wxiaoguang
12441d7c5c
Fix incorrect relative/absolute URL usages (#29531)
Add two "HTMLURL" methods for PackageDescriptor.
And rename "FullWebLink" to "VersionWebLink"

(cherry picked from commit bf6502a8f7a2e9a2b64b43b7733316d863c9a768)
2024-03-06 12:10:46 +08:00
KN4CK3R
47a913d40d
Add support for API blob upload of release attachments (#29507)
Fixes #29502

Our endpoint is not Github compatible.

https://docs.github.com/en/rest/releases/assets?apiVersion=2022-11-28#upload-a-release-asset

---------

Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit 70c126e6184872a6ac63cae2f327fc745b25d1d7)
2024-03-06 12:10:46 +08:00