Commit graph

15517 commits

Author SHA1 Message Date
TomZ f279e2a264
[BRANDING] cosmetic s/Gitea/Forgejo/ in logs, messages, etc.
As the docs of codeberg refer to the strings printed by the Forgejo
ssh servers, this is user-facing and is nice to update to the new
product name.

(cherry picked from commit 103991d73f)
(cherry picked from commit 2a0d3f85f1)
(cherry picked from commit eb2b4ce388)
(cherry picked from commit 0998b51716)

[BRANDING] forgejo log message

(cherry picked from commit d51a046ebe)
(cherry picked from commit d66e1c7b6e)
(cherry picked from commit b5bffe4ce8)
(cherry picked from commit 3fa776d856)
(cherry picked from commit 18d064f472)
(cherry picked from commit c95094e355)
(cherry picked from commit 5784290bc4)
(cherry picked from commit aee336886b)
(cherry picked from commit ec2f60b516)
(cherry picked from commit 7af742a284)
2023-05-23 11:42:08 +02:00
Caesar Schinas 0118fba970
[BRANDING] Rebrand default meta tags
(cherry picked from commit b1a792b635)
(cherry picked from commit ba71acccdb)
(cherry picked from commit ef58efb8e0)
(cherry picked from commit 6a1b08241e)
(cherry picked from commit 132c7a3a07)
(cherry picked from commit a1f07975d6)
(cherry picked from commit f3793598b2)
(cherry picked from commit 60f38116af)
(cherry picked from commit 88884cf283)
(cherry picked from commit 520de41aef)
(cherry picked from commit cfd5e5b95a)
(cherry picked from commit 5cf1738f0a)
(cherry picked from commit b95f9b3142)
2023-05-23 11:32:26 +02:00
Caesar Schinas 9039b47c16
[BRANDING] Add Forgejo light, dark, and auto themes
(cherry picked from commit faab0c670e)
(cherry picked from commit b6d59493c7)
(cherry picked from commit 837da0c1f4)
(cherry picked from commit 71ad245e1d)
(cherry picked from commit 85a7032f1b)

Conflicts:
	web_src/css/themes/theme-forgejo-auto.less
	web_src/css/themes/theme-forgejo-dark.less
	web_src/css/themes/theme-forgejo-light.less
	web_src/less/_home.less
        see https://codeberg.org/forgejo/forgejo/pulls/552
(cherry picked from commit 0c2c131bb0)

[BRANDING] Add Forgejo light, dark, and auto themes: fix import

Closes: https://codeberg.org/forgejo/forgejo/issues/562
(cherry picked from commit 2b0dc1f80f)
(cherry picked from commit 494ad6a3b7)
(cherry picked from commit 6940fc22c4)
(cherry picked from commit bd6f00656c)
(cherry picked from commit ebb506a124)
(cherry picked from commit 43d72d3781)
(cherry picked from commit 1a87adca01)
(cherry picked from commit 0704c410b4)
2023-05-23 11:32:26 +02:00
Loïc Dachary 4871447def
[BRANDING] container images: set APP_NAME
(cherry picked from commit 12d7bc447e)
(cherry picked from commit 1335b17fc3)
(cherry picked from commit 0d7da06c47)
(cherry picked from commit 095c1ab679)
(cherry picked from commit 2220f00d09)
(cherry picked from commit f0be8bbdbf)
(cherry picked from commit 15188180a1)
(cherry picked from commit 96c471d7d3)
(cherry picked from commit 709052f1e7)
(cherry picked from commit 98cd2f5dee)
(cherry picked from commit a1014654b1)
(cherry picked from commit a16f4dc51d)
(cherry picked from commit abbed33d16)
2023-05-23 11:32:26 +02:00
Caesar Schinas f0036e37cf
[BRANDING] Custom loading animation for Forgejo
(cherry picked from commit a3b3b8a2df)
(cherry picked from commit de0fd2d2e4)
(cherry picked from commit e1bf4de211)
(cherry picked from commit 60ffc88a47)
(cherry picked from commit 7d2beea9ca)
(cherry picked from commit 171eadb952)
(cherry picked from commit 5e81f75ed2)

Conflicts:
	templates/install.tmpl
	templates/post-install.tmpl
	templates/repo/migrate/migrating.tmpl
(cherry picked from commit 641c4a36c5)
(cherry picked from commit f1dbb2dcff)
(cherry picked from commit b66de5e531)
(cherry picked from commit eeccdf21a1)
(cherry picked from commit af37663f4d)
(cherry picked from commit ed3739dccb)
2023-05-23 11:32:26 +02:00
Caesar Schinas 6df6781b42
[BRANDING] Rebrand default config settings for new installs (#140)
Replaces `Gitea` with `Forgejo` in the default config settings for new installs.

This will not affect existing installs.

Co-authored-by: Caesar Schinas <caesar@caesarschinas.com>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/140
Co-authored-by: Caesar Schinas <caesar@noreply.codeberg.org>
Co-committed-by: Caesar Schinas <caesar@noreply.codeberg.org>
(cherry picked from commit ca1319aa16)
(cherry picked from commit 52a4d238a0)
(cherry picked from commit f63536538c)

Conflicts:
	web_src/js/features/install.js
(cherry picked from commit 861cc434e1)
(cherry picked from commit 0e6ea60c80)
(cherry picked from commit 0cbc0ec15d)
(cherry picked from commit 3cc19b0ae2)
(cherry picked from commit 50fcb885fe)
(cherry picked from commit f6039d4df4)
(cherry picked from commit 5ae5c6ba2d)
(cherry picked from commit f0b565e0ed)
(cherry picked from commit adbd4d2015)
(cherry picked from commit d26c540ffd)
2023-05-23 11:32:19 +02:00
Caesar Schinas 5362f7d053
[BRANDING] Add forgejo emoji
(cherry picked from commit ade55ad308)
(cherry picked from commit 107f726618)
(cherry picked from commit f29cf9cfc1)
(cherry picked from commit 0761a41eee)
(cherry picked from commit 2b1fd9565f)
(cherry picked from commit 6a7c82f13b)
(cherry picked from commit 4a56d40494)
(cherry picked from commit b48e3e896d)
(cherry picked from commit bde83340cb)
(cherry picked from commit 74e0603d6b)
(cherry picked from commit 84bd1ddc08)
(cherry picked from commit 62d9acde2a)
(cherry picked from commit 5b84a90913)
2023-05-23 11:28:49 +02:00
Caesar Schinas 6abaa468d5
[BRANDING] Rebrand footer "powered by" links
(cherry picked from commit 8b9237e47e)
(cherry picked from commit 47e5543f33)
(cherry picked from commit 456abff8c0)
(cherry picked from commit 2d2588187e)
(cherry picked from commit a81e4e2588)
(cherry picked from commit 70c4ee8fba)
(cherry picked from commit f12b0577e8)
(cherry picked from commit 025e6e1974)
(cherry picked from commit e051684c83)
(cherry picked from commit ee370f3f3c)
(cherry picked from commit a1b53a8b88)
(cherry picked from commit e01158af9b)
(cherry picked from commit c9f6b6c8a1)
2023-05-23 11:28:49 +02:00
Gusted d6f57409da
[BRANDING] Rebrand systemd service (#137)
- We can rebrand this quite safely, as only new installations would likely look into this file and configure the correct folders(to use forgejo instead of gitea).

Co-authored-by: Gusted <postmaster@gusted.xyz>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/137
(cherry picked from commit fa78e52b5d)
(cherry picked from commit e36d649989)
(cherry picked from commit 37e15a2f41)
(cherry picked from commit a09a4b3ce0)
(cherry picked from commit 3096b37c95)
(cherry picked from commit 187ad96c94)
(cherry picked from commit e15eb31c6e)
(cherry picked from commit e276abe341)
(cherry picked from commit 31223db5e3)
(cherry picked from commit 8ebffe0b71)
(cherry picked from commit 1d19836346)
(cherry picked from commit baaf749ce0)

Conflicts:
	contrib/systemd/forgejo.service
(cherry picked from commit c309b1a1f4)
2023-05-23 11:28:49 +02:00
Caesar Schinas 32ffe2e4f1
[BRANDING] add Forgejo logo
(cherry picked from commit f42622c7d5)
(cherry picked from commit a39e7f2a79)
(cherry picked from commit afa2a31bb9)
(cherry picked from commit 276e8856e5)
(cherry picked from commit 68e3bd469f)
(cherry picked from commit af124b9ccb)
(cherry picked from commit b89ab4874d)
(cherry picked from commit 0f2a2f0d0f)
(cherry picked from commit 80999363c7)
(cherry picked from commit f8880b5463)
(cherry picked from commit 5f4cf4f6e1)
(cherry picked from commit b38e26bc1a)
(cherry picked from commit d839e00332)
2023-05-23 11:28:49 +02:00
Loïc Dachary fd492a03f5
[SECURITY] default to pbkdf2 with 320,000 iterations
(cherry picked from commit 3ea0b287d7)
(cherry picked from commit db8392a8ac)
(cherry picked from commit bd2a5fa292)
(cherry picked from commit 2436acb3d9)
(cherry picked from commit 62f50e1c52)
(cherry picked from commit dba1892521)
(cherry picked from commit 4b58e3b6d4)
(cherry picked from commit 1247056856)
(cherry picked from commit afbaea7009)
(cherry picked from commit dcd4813d96)
(cherry picked from commit b51dc963d1)
(cherry picked from commit 611e895efd)
2023-05-23 09:52:01 +02:00
Earl Warren a9763edaf0
[API] Forgejo API /api/forgejo/v1
(cherry picked from commit 20b5669269)
(cherry picked from commit 1574643a6a)

Update semantic version according to specification

(cherry picked from commit 22510f4130)

Mise à jour de 'Makefile'

(cherry picked from commit c3d85d8409)
(cherry picked from commit 5ea2309851)
(cherry picked from commit ec5217b9d1)
(cherry picked from commit 14f08e364b)
(cherry picked from commit b4465c67b8)

[API] [SEMVER] replace number with version

(cherry picked from commit fba48e6497)
(cherry picked from commit 532ec5d878)

[API] [SEMVER] [v1.20] less is replaced by css

(cherry picked from commit 01ca3a4f42)
(cherry picked from commit 1d928c3ab2)
(cherry picked from commit a39dc804cd)

Conflicts:
	webpack.config.js
(cherry picked from commit adc68578b3)
(cherry picked from commit 9b8d98475f)
(cherry picked from commit 2516103974)
(cherry picked from commit 18e6287963)
(cherry picked from commit e9694e67ab)
2023-05-23 09:52:00 +02:00
Percy Ma ac109696e7
[DOCS] LICENSE: add Forgejo Authors
(cherry picked from commit 7c98a4c54e)
(cherry picked from commit 1ec4a8e6cf)
(cherry picked from commit 79de60a5d8)
(cherry picked from commit e7fbfb34a9)
(cherry picked from commit 7f625d25a3)
(cherry picked from commit 9341e18427)
(cherry picked from commit a03e449c01)
(cherry picked from commit b4c7140bec)
(cherry picked from commit 685c9d4a87)
(cherry picked from commit 48b3594a7d)
(cherry picked from commit 8eefd84d38)
(cherry picked from commit d42f1028eb)
(cherry picked from commit 3bb7f7ed51)
2023-05-23 09:52:00 +02:00
Loïc Dachary d77d7b7be7
[DOCS] RELEASE-NOTES.md
(cherry picked from commit b07123ee7b)
(cherry picked from commit ca85c880b4)
(cherry picked from commit 723ead94cb)
(cherry picked from commit ff148318da)

[DOCS] RELEASE-NOTES: 1.19.0

(cherry picked from commit e84e43887b)

[DOCS] RELEASE-NOTES: add scoped access tokens

(cherry picked from commit 688f831853)

[DOCS] RELEASE-NOTES: Scoped labels

(cherry picked from commit 747479a07b)

[DOCS] RELEASE-NOTES: OIDC groups

(cherry picked from commit 10c505fe89)

[DOCS] RELEASE-NOTES: Copy Link is broken

On firefox it fails with Uncaught TypeError: navigator.clipboard is
   undefined
On chromium it fails with Uncaught TypeError: Cannot read properties of undefined (reading 'writeText')

(cherry picked from commit 148b2ff093)

[DOCS] RELEASE-NOTES: Copy citation

(cherry picked from commit d0f217735f)

[DOCS] RELEASE-NOTES: Support org/user level projects

(cherry picked from commit de845c7bcf)

[DOCS] RELEASE-NOTES: v1.19 has a documentation

(cherry picked from commit 9a5b46da32)

[DOCS] RELEASE-NOTES: do not split webhook section

(cherry picked from commit 00ed020321)

[DOCS] RELEASE-NOTES: Incoming emails

(cherry picked from commit 06c455b33b)

[DOCS] RELEASE-NOTES: secrets are an implementation detail

(cherry picked from commit 8236dc3a57)

[DOCS] RELEASE-NOTES: Prohibit fork if user reached maximum

(cherry picked from commit 0f80b8c696)

[DOCS] RELEASE-NOTES: scoped tokens: do not duplicate the docs

(cherry picked from commit 9bc4793c07)

[DOCS] RELEASE-NOTES: rss feed for tags and releases

(cherry picked from commit 599b36fada)

[DOCS] RELEASE-NOTES: protected branches wildcard

(cherry picked from commit 2b316c4950)

[DOCS] RELEASE-NOTES: disable releases

(cherry picked from commit 9a60773f1d)

[DOCS] RELEASE-NOTES: review box

(cherry picked from commit 09867dd122)

[DOCS] RELEASE-NOTES: asciicast support

(cherry picked from commit ea9658379b)

[DOCS] RELEASE-NOTES: attention blocks

(cherry picked from commit 70b387750b)

[DOCS] RELEASE-NOTES: commit cross reference

(cherry picked from commit fe706dad13)

[DOCS] RELEASE-NOTES: strip user completion border case

(cherry picked from commit 33ca51b4b6)

[DOCS] RELEASE-NOTES: card preview

(cherry picked from commit 626cd78ca6)

[DOCS] RELEASE-NOTES: raw copy button

(cherry picked from commit edfb467d64)

[DOCS] RELEASE-NOTES: allow edits by maintainers by default

(cherry picked from commit 7006405bc6)

[DOCS] RELEASE-NOTES: database auto migration is a little arcane

(cherry picked from commit 78030fa9af)

[DOCS] RELEASE-NOTES: fix typos & minor rewording

(cherry picked from commit ae1d47f656)
(cherry picked from commit ad08ca9955)

[DOCS] RELEASE-NOTES: webhook authorization header

(cherry picked from commit c35e2c4f6f)

[DOCS] RELEASE-NOTES: video element in markdown

(cherry picked from commit bcb0bd51d2)

[DOCS] RELEASE-NOTES: move scoped labels to the documentation

(cherry picked from commit c5eedaf4f3)

[DOCS] RELEASE-NOTES: cosmetic improvements

(cherry picked from commit b93df350d9)

[DOCS] RELEASE-NOTES: 1.19.0-0 is really : 1.19.0-2

(cherry picked from commit 60d770c2c9)

[DOCS] RELEASE-NOTES: relevant repositories

(cherry picked from commit de6ed5b87f)
(cherry picked from commit 71d91fdf22)

[DOCS] RELEASE-NOTES: semantic version

(cherry picked from commit af062d77f0)

[DOCS] RELEASE-NOTES: reflogs

(cherry picked from commit 084713d8aa)
(cherry picked from commit 90ad322a56)

[DOCS] RELEASE-NOTES: fix broken link to OIDC mapping

(cherry picked from commit 802a252eb5)

[DOCS] RELEASE-NOTES: Fix spaces

(cherry picked from commit a605d36ab6)

[DOCS] RELEASE-NOTES: SemVer

(cherry picked from commit 7b29c90035)
(cherry picked from commit 82799195c9)
(cherry picked from commit 5d9c2e9ec6)

[DOCS] RELEASE-NOTES: 1.19.0-3

(cherry picked from commit c599b2947d)
(cherry picked from commit 8a37027ae7)

[DOCS] RELEASE-NOTES: v1.19.1-0

(cherry picked from commit 89b9e96cc7)
(cherry picked from commit 2b4e881a4e)

[DOCS] RELEASE-NOTES: 1.19.2-0

(cherry picked from commit 0c0d2ec46c)
(cherry picked from commit 437b8caae4)

[DOCS] RELEASE-NOTES: 1.19.3-0

(cherry picked from commit 040740917e)

[DOCS] RELEASE-NOTES: 1.19.3-0 (fix typo)

(cherry picked from commit 24516cb22a)
(cherry picked from commit 429c8e6525)
(cherry picked from commit 8247bddb45)
2023-05-23 09:52:00 +02:00
Loïc Dachary 90d3eb2d13
[WORKFLOW] issues & pr templates
(cherry picked from commit 9dd224f00c)
(cherry picked from commit 710af007bc)
(cherry picked from commit 2ccd6e2bd6)
(cherry picked from commit b90dc5fc4f)
(cherry picked from commit bf25d98a98)
(cherry picked from commit d7c71e5985)

[WORKFLOW] Add Forgejo Next and reproducing to issue template

(cherry picked from commit 17a3988fe0)
(cherry picked from commit 9ee5b3a619)
(cherry picked from commit bebdd8d5f3)
(cherry picked from commit be7bb96d5c)
(cherry picked from commit 4ae659d63a)
(cherry picked from commit 82426f376d)
(cherry picked from commit 1cb28e3671)
(cherry picked from commit c6a2db94c4)
2023-05-23 09:52:00 +02:00
Loïc Dachary 464a534a3a
[DOCS] README
(cherry picked from commit a47b474586)
(cherry picked from commit 2fcc61c1d9)
(cherry picked from commit 67debe2247)
(cherry picked from commit b90ffbb309)
(cherry picked from commit 07a7448148)
(cherry picked from commit a7fe270c08)
(cherry picked from commit 2f15389a9c)
(cherry picked from commit 16ba587f5d)
(cherry picked from commit 683a23b2ca)
(cherry picked from commit 3e5de3f656)
(cherry picked from commit 5789005c43)
(cherry picked from commit 75c0f11079)
(cherry picked from commit e78a272e11)
2023-05-23 09:52:00 +02:00
Loïc Dachary 52f2163807
[DOCS] CONTRIBUTING
Refs: https://codeberg.org/forgejo/forgejo/issues/8
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/153
Refs: https://codeberg.org/forgejo/forgejo/issues/123
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/299
(cherry picked from commit 08dcef0c8c)

[DOCS] CONTRIBUTING/RELEASE: https://forgejo.org/docs/admin

Because the version is not displayed on the landing page of Forgejo,
there cannot be a link to a versionned documentation. There must exist
a link that points to the latest version on the website for the
forgejo instance to display.

Better but more complicated approaches could be to:

* Embed the documentation in Forgejo
* Allow the admin to not display the help
* Allow the admin to display a versionned help or not

(cherry picked from commit 83cc389239)
(cherry picked from commit 5df52b8a4f)
(cherry picked from commit 9a66b3d70b)

[DOCS] CONTRIBUTING/RELEASE: reminder to update FORGEJO_VERSION

(cherry picked from commit 2a4d0bd164)
(cherry picked from commit d68576ba67)

[DOCS] CONTRIBUTING: updates

* Remove obsolete description of the well being & moderation team and
  replace them with a link to the moderation email.

* Remove description of the governance process and replace with a link
  to the governance readme that did not exist at the time.

* Add links to the Forgejo documentation

(cherry picked from commit df749da272)
(cherry picked from commit 4da39128c5)
(cherry picked from commit f442ca6f40)
(cherry picked from commit 031928c447)
(cherry picked from commit 1e6ba47216)
(cherry picked from commit 8916a1f8c6)
(cherry picked from commit 663e28c412)
(cherry picked from commit d56b130baa)

[DOCS] CONTRIBUTING (squash)

(cherry picked from commit 0dc4b6e5c9)
2023-05-23 09:51:57 +02:00
Loïc Dachary dc7a859144
delete Gitea specific files that need rewriting for Forgejo
Although it would be possible to modify these files, it would create
conflicts when rebasing. Instead, this commit removes them entirely
and another commit can start from scratch, borrowing content from the
original files.

The drawback of this approach is that some content updates from Gitea
that also need updating in Forgejo will have to be copy/pasted
instead of being merged.

(cherry picked from commit eb85782115)
(cherry picked from commit 34401f2004)
(cherry picked from commit ef43b1c691)
(cherry picked from commit d17fe25e2f)
(cherry picked from commit 3f65dea3e7)
(cherry picked from commit 3cacb64a1b)
(cherry picked from commit b531b014b7)
(cherry picked from commit adf6e7a840)
(cherry picked from commit 68c19d977d)
(cherry picked from commit 31aa8647ec)
(cherry picked from commit be70dd7208)
(cherry picked from commit 7f44bb60b1)
(cherry picked from commit 5098f1224b)
2023-05-23 09:51:24 +02:00
Earl Warren 28d2d9b212
[CI] disable minio test, no minio server yet in CI
(cherry picked from commit 0dd74d09d3)
2023-05-23 09:01:09 +02:00
Earl Warren 91245ca917
[CI] disable redis test, no redis server yet in CI
(cherry picked from commit e1bbfa3619)
2023-05-23 09:01:09 +02:00
Loïc Dachary 15e6485ae1
[CI] tests/pgsql.ini.tmpl: do not use minio
f92e0a4018 added minio to the tests/pgsql.ini.tmpl and Forgejo CI does
not run a minio server. It will if there are external storage related
changes at some point but it is not the case now so it is not worth
the burden.

(cherry picked from commit 4cfbf4718d)
(cherry picked from commit 9bd644d601)
(cherry picked from commit 604636c7c4)
(cherry picked from commit 341cdb8540)
(cherry picked from commit 57bdc91de5)
(cherry picked from commit c6ec6517b4)
(cherry picked from commit 2f03fc1b29)
(cherry picked from commit aaecd10966)
(cherry picked from commit 7025ff7b06)
2023-05-23 09:01:09 +02:00
Loïc Dachary 208498caaa
[CI] set PASSWORD_HASH_ALGO = argon2 for integration tests
(cherry picked from commit 1d7ce2a39c)
(cherry picked from commit 3af8757583)
(cherry picked from commit 0b81815209)
(cherry picked from commit 7180a3222a)
(cherry picked from commit 069044f4a6)
(cherry picked from commit dd1438f389)
(cherry picked from commit 4ae6b5d64d)
(cherry picked from commit c572666d78)
(cherry picked from commit de0a4480bc)
(cherry picked from commit 60272ef4f7)
(cherry picked from commit a68fdde4be)
(cherry picked from commit ff448cf3a6)
2023-05-23 07:30:26 +02:00
Loïc Dachary 043fa6d664
[CI] implementation: forgejo container images
(cherry picked from commit dd1971d4e6)
(cherry picked from commit 3981dbaf8c)
(cherry picked from commit 8dff3cc2d1)
(cherry picked from commit e7673e5d22)
(cherry picked from commit 326174064b)
(cherry picked from commit eb769dbde4)
(cherry picked from commit 335829ade2)
(cherry picked from commit 5e8e4f549d)

Conflicts:
	Dockerfile
	Dockerfile.rootless
(cherry picked from commit b777fc91d0)
(cherry picked from commit 02cda642ec)
(cherry picked from commit 96ef93f3bc)
(cherry picked from commit aa424551f2)

Conflicts:
	Dockerfile
	Dockerfile.rootless
(cherry picked from commit e54fa86e49)
2023-05-23 07:30:26 +02:00
Loïc Dachary 581c3060da
[CI] implementation: Woodpecker based CI
(cherry picked from commit c2a7aaeee8)
(cherry picked from commit 6b6007fbce)
(cherry picked from commit 63608a221e)
(cherry picked from commit 5cfe60baa7)
(cherry picked from commit 2af4c73d12)
(cherry picked from commit 1985959bfe)
(cherry picked from commit 880424c77e)
(cherry picked from commit c78a861d1b)
(cherry picked from commit 25c1227011)
(cherry picked from commit 7195e894ee)
(cherry picked from commit cf15153873)
(cherry picked from commit 9bee773c95)
2023-05-23 07:30:26 +02:00
Loïc Dachary 7ab19ff5e5
[CI] implementation: publish forgejo- binaries instead of gitea-
(cherry picked from commit 6d910daafb)
(cherry picked from commit d447861cc9)
(cherry picked from commit dc6e9d8799)
(cherry picked from commit ef232fa20c)
(cherry picked from commit 290c55517a)
(cherry picked from commit db48af1784)
(cherry picked from commit 85f33237a2)
(cherry picked from commit 76899ee33e)
(cherry picked from commit 148b3ee9cb)
(cherry picked from commit 1f6ad8f465)
(cherry picked from commit c330afdba3)
(cherry picked from commit b1f87075a7)
(cherry picked from commit 7da40992cc)
2023-05-23 07:30:26 +02:00
wxiaoguang abcf5a7b5e
Fix install page context, make the install page tests really test (#24858)
Fix #24856

Rename "context.contextKey" to "context.WebContextKey", this context is
for web context only. But the Context itself is not renamed, otherwise
it would cause a lot of changes (if we really want to rename it, there
could be a separate PR).

The old test code doesn't really test, the "install page" gets broken
not only one time, so use new test code to make sure the "install page"
could work.
2023-05-23 09:29:15 +08:00
yp05327 5c0745c034
Add validations.required check to dropdown field (#24849)
If dropdown is marked as required, we should not provide the `remove`
button.
This will cause user may post empty value which seems like a bug.

Definition:

![image](https://github.com/go-gitea/gitea/assets/18380374/cf48b478-244e-44e0-9a0e-7a0f02bc471a)
Post request form:

![image](https://github.com/go-gitea/gitea/assets/18380374/31d6f823-835f-422a-879c-3b1e18950ac8)
Result:

![image](https://github.com/go-gitea/gitea/assets/18380374/a9944fe9-24d0-4776-9eec-d31b70144eb4)
2023-05-22 21:26:48 +00:00
wxiaoguang 81ce271f78
Use Go 1.20 for next release (#24859) 2023-05-22 16:29:53 +00:00
Brecht Van Lommel 3588edbb08
Add gitea manager reload-templates command (#24843)
This can be useful to update custom templates in production mode, when
they are updated frequently and a full Gitea restart each time is
disruptive.
2023-05-22 23:51:40 +08:00
yp05327 922c83eea3
Remove In your repositories link in milestones dashboard (#24853)
It is unnecessary to it.
2023-05-22 11:42:57 +00:00
yp05327 a3a8594f75
Fix 500 error when select No assignee filter in issue list page (#24854)
Access the issue list page and select `No assignee`, you will get 500
error:

![image](https://github.com/go-gitea/gitea/assets/18380374/a7435fd3-c3d5-4801-894e-9353a8ddc1af)

You can see this page in try.gitea.io:

https://try.gitea.io/yp05327/testrepo/issues?q=&type=all&sort=&state=open&labels=&milestone=0&project=0&assignee=-1&poster=0

Caused by
https://github.com/go-gitea/gitea/pull/24707/files#diff-d7c7dc2da4fcfdc09997648e11a018414dc116472054350b5590ab407adcd44dR1748

Co-authored-by: Giteabot <teabot@gitea.io>
2023-05-22 13:08:27 +02:00
yp05327 bebc3433c5
Add IsErrRepoFilesAlreadyExist check when fork repo (#24678)
Before:

![image](https://github.com/go-gitea/gitea/assets/18380374/e9e3de75-eb6e-418e-9227-ef4e5f448a04)
After:

![image](https://github.com/go-gitea/gitea/assets/18380374/74b1cd6c-c5b1-4ee0-a1d8-6b3fb8d3a8e9)
2023-05-22 18:21:46 +08:00
yp05327 f4ef7eed00
Fix missing yes/no in delete time log modal (#24851)
Before:

![image](https://github.com/go-gitea/gitea/assets/18380374/bcbcddcc-b328-4751-92fe-6e55b7a84671)

After:

![image](https://github.com/go-gitea/gitea/assets/18380374/571ef27a-2411-472e-819d-f694e7be3697)

Co-authored-by: Giteabot <teabot@gitea.io>
2023-05-22 09:46:50 +00:00
wxiaoguang bb9e20e434
Fix document and improve comment (#24844)
* Fix broken doc link:
https://github.com/go-gitea/gitea/actions/runs/5041309438/jobs/9040887385
* Improve comments about how font weight works:
https://github.com/go-gitea/gitea/pull/24827#pullrequestreview-1435584800

---------

Co-authored-by: silverwind <me@silverwind.io>
2023-05-22 08:47:33 +00:00
Brecht Van Lommel 32ec2540cc
Show new pull request button also on subdirectories and files (#24842)
Instead of only on the repository home page. Saves a click and makes
this functionality a bit easier to find when editing files in a
subdirectory.
2023-05-22 07:57:00 +00:00
HesterG da461b5a08
Improvements for action detail page (#24718)
Close #24625 

Main changes:

1. For the left panel, show rerun icon only on hover, and add style when
the job is selected, and removed icon on the "rerun all" button and
modify the text on the button


https://github.com/go-gitea/gitea/assets/17645053/cc437a17-d2e9-4f1b-a8cf-f56e53962767

2. Adjust fonts, and add on hover effects to the log lines. And add
loading effect when the job is done and the job step log is expanded for
the first time. (With reference to github)


https://github.com/go-gitea/gitea/assets/17645053/2808d77d-f402-4fb0-8819-7aa0a018cf0c

3. Add `gt-ellipsis` to `step-summary-msg` and `job-brief-name`

<img width="898" alt="ellipsis"
src="https://github.com/go-gitea/gitea/assets/17645053/e2fb7049-3125-4252-970d-15b0751febc7">

4. Fixed
https://github.com/go-gitea/gitea/issues/24625#issuecomment-1541380010
by adding explicit conditions to `ActionRunStatus.vue` and `status.tmpl`

5. Adjust some css styles

---------

Co-authored-by: silverwind <me@silverwind.io>
2023-05-22 12:17:24 +08:00
KN4CK3R cdb088cec2
Add CRAN package registry (#22331)
This PR adds a [CRAN](https://cran.r-project.org/) package registry.

![grafik](https://user-images.githubusercontent.com/1666336/210450039-d6fa6f77-20cd-4741-89a8-1624def267f7.png)
2023-05-22 10:57:49 +08:00
wxiaoguang ec2a01d1e2
Fix regression: access log template, gitea manager cli command (#24838)
Close #24836

![image](https://github.com/go-gitea/gitea/assets/2114189/95b025d2-f25f-4246-a08a-fe44ecb787a9)

![image](https://github.com/go-gitea/gitea/assets/2114189/c3afe1fa-2a23-420d-a016-3b67dcd04cd5)
2023-05-22 09:38:38 +08:00
Brecht Van Lommel 2d3ebe889e
Merge message template support for rebase without merge commit (#22669)
Use `default_merge_message/REBASE_TEMPLATE.md` for amending the message
of the last commit in the list of commits that was merged. Previously
this template was mentioned in the documentation but not actually used.

In this template additional variables `CommitTitle` and `CommitBody` are
available, for the title and body of the commit.

Ideally the message of every commit would be updated using the template,
but doing an interactive rebase or merging commits one by one is
complicated, so that is left as a future improvement.
2023-05-22 09:01:46 +08:00
GiteaBot 84d93c82cd [skip ci] Updated licenses and gitignores 2023-05-22 00:25:26 +00:00
wxiaoguang 2cb66fff60
Support wildcard in email domain allow/block list (#24831)
Replace #20257 (which is stale and incomplete)

Close #20255

Major changes:

* Deprecate the "WHITELIST", use "ALLOWLIST"
* Add wildcard support for EMAIL_DOMAIN_ALLOWLIST/EMAIL_DOMAIN_BLOCKLIST
* Update example config file and document
* Improve tests
2023-05-22 00:05:44 +00:00
silverwind 19993d8814
Change --font-weight-bold to --font-weight-semibold and 600 value, introduce new font weight variables (#24827)
There was some recent discussion about this in Discord `ui-design`
channel and the conclusion was that
https://github.com/go-gitea/gitea/issues/24305 should have fixed their
OS font installation to have semibold weights.

I have now tested this 601 weight on a Windows 10 machine on Firefox
myself, and I immediately noticed that bold was excessivly bold and
rendering as 700 because browsers are biased towards bolder fonts. So
revert this back to the previous value.
2023-05-21 23:37:32 +00:00
wxiaoguang 4647660776
Rewrite logger system (#24726)
## ⚠️ Breaking

The `log.<mode>.<logger>` style config has been dropped. If you used it,
please check the new config manual & app.example.ini to make your
instance output logs as expected.

Although many legacy options still work, it's encouraged to upgrade to
the new options.

The SMTP logger is deleted because SMTP is not suitable to collect logs.

If you have manually configured Gitea log options, please confirm the
logger system works as expected after upgrading.

## Description

Close #12082 and maybe more log-related issues, resolve some related
FIXMEs in old code (which seems unfixable before)

Just like rewriting queue #24505 : make code maintainable, clear legacy
bugs, and add the ability to support more writers (eg: JSON, structured
log)

There is a new document (with examples): `logging-config.en-us.md`

This PR is safer than the queue rewriting, because it's just for
logging, it won't break other logic.

## The old problems

The logging system is quite old and difficult to maintain:
* Unclear concepts: Logger, NamedLogger, MultiChannelledLogger,
SubLogger, EventLogger, WriterLogger etc
* Some code is diffuclt to konw whether it is right:
`log.DelNamedLogger("console")` vs `log.DelNamedLogger(log.DEFAULT)` vs
`log.DelLogger("console")`
* The old system heavily depends on ini config system, it's difficult to
create new logger for different purpose, and it's very fragile.
* The "color" trick is difficult to use and read, many colors are
unnecessary, and in the future structured log could help
* It's difficult to add other log formats, eg: JSON format
* The log outputer doesn't have full control of its goroutine, it's
difficult to make outputer have advanced behaviors
* The logs could be lost in some cases: eg: no Fatal error when using
CLI.
* Config options are passed by JSON, which is quite fragile.
* INI package makes the KEY in `[log]` section visible in `[log.sub1]`
and `[log.sub1.subA]`, this behavior is quite fragile and would cause
more unclear problems, and there is no strong requirement to support
`log.<mode>.<logger>` syntax.


## The new design

See `logger.go` for documents.


## Screenshot

<details>


![image](https://github.com/go-gitea/gitea/assets/2114189/4462d713-ba39-41f5-bb08-de912e67e1ff)


![image](https://github.com/go-gitea/gitea/assets/2114189/b188035e-f691-428b-8b2d-ff7b2199b2f9)


![image](https://github.com/go-gitea/gitea/assets/2114189/132e9745-1c3b-4e00-9e0d-15eaea495dee)

</details>

## TODO

* [x] add some new tests
* [x] fix some tests
* [x] test some sub-commands (manually ....)

---------

Co-authored-by: Jason Song <i@wolfogre.com>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Giteabot <teabot@gitea.io>
2023-05-21 22:35:11 +00:00
Brecht Van Lommel 65dff8e364
Support Copy Link for video attachments (#24833)
Creating a `<video>` tag with controls and title.
2023-05-21 22:06:17 +00:00
Brecht Van Lommel 268d121f4b
Fix video width overflow in markdown, and other changes to match img (#24834)
This change makes the CSS for `<video>` in markup match that of `<img>`,
and also allows additional attributes to be used. This way the width,
padding, alignment should work equally well for both.
2023-05-21 21:19:37 +00:00
delvh e95b42e187
Improve accessibility when (re-)viewing files (#24817)
Visually, nothing should have changed.
Changes include
- Convert most `<a [no href]>` to `<button>` when (re-)viewing files:
- `<a [no href]>` are, by HTML definition, not a link and hence cannot
be focused
- `<a class="ui button">` can now be clicked (again?) using
<kbd>Enter</kbd>
- Previously, the installed keypress handler on `.ui.button` elements
disabled it for links somehow
- The `(un)escape file`, the `expand section` and the `expand/collapse
file` buttons can now be focused (and subsequently clicked using only
the keyboard)
- You can now press <kbd>Space</kbd> on a focused `View file` checkbox
to mark the file as viewed.
- previously, this was impossible as this checkbox listened on the wrong
event listener

The `add code comment` button has been left inaccessible for now as it
requires quite a bit of extra logic so that it is unhidden when it is
focused (you can otherwise focus it without seeing it as you are not
hovering on the corresponding line).

---------

Co-authored-by: silverwind <me@silverwind.io>
2023-05-21 20:47:41 +00:00
Lunny Xiao c59a057297
Refactor rename user and rename organization (#24052)
This PR is a refactor at the beginning. And now it did 4 things.
- [x] Move renaming organizaiton and user logics into services layer and
merged as one function
- [x] Support rename a user capitalization only. For example, rename the
user from `Lunny` to `lunny`. We just need to change one table `user`
and others should not be touched.
- [x] Before this PR, some renaming were missed like `agit`
- [x] Fix bug the API reutrned from `http.StatusNoContent` to `http.StatusOK`
2023-05-21 23:13:47 +08:00
Lunny Xiao 64f6a5d113
Use CommentList instead of []*Comment (#24828)
As title.
2023-05-21 20:48:28 +08:00
Yarden Shoham edd8ea0b0d
Fix topics deleted via API not being deleted in org page (#24825)
The topics are saved in the `repo_topic` table.
They are also saved directly in the `repository` table.

Before this PR, only `AddTopic` and `SaveTopics` made sure the `topics`
field in the `repository` table was synced with the `repo_topic` table.

This PR makes sure `GenerateTopics` and `DeleteTopic`
also sync the `topics` in the repository table.

`RemoveTopicsFromRepo` doesn't need to sync the data
as it is only used to delete a repository.

Fixes #24820
2023-05-21 11:03:20 +02:00
Yevhen Pavlov 1dfaf83798
Return 404 in the API if the requested webhooks were not found (#24823)
Should resolve first point of the issue
https://github.com/go-gitea/gitea/issues/24574
2023-05-21 10:54:28 +08:00