Commit graph

16863 commits

Author SHA1 Message Date
Earl Warren 079d4fdca1
[DOCS] RELEASE-NOTES.md (squash) v1.21.1-0 2023-11-26 13:36:10 +01:00
Earl Warren 6a8fdd0dce Merge pull request '[DOCS] RELEASE-NOTES.md (squash) v1.20.6-0' (#1815) from earl-warren/forgejo:wip-release-notes-1.20 into forgejo-development
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/1815
2023-11-26 09:21:44 +00:00
Earl Warren 90ddda3413
[DOCS] RELEASE-NOTES.md (squash) v1.20.6-0 2023-11-26 09:01:46 +01:00
Earl Warren 669aafa2fe Merge pull request '[DOCS] RELEASE-NOTES.md (squash) v1.21.0-9' (#1799) from earl-warren/forgejo:wip-release-notes-1.21 into forgejo-development
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/1799
2023-11-25 14:34:55 +00:00
Earl Warren fd672635b2
proofread 2023-11-25 14:59:07 +01:00
Earl Warren da3afde806 Merge pull request '[DOCS] RELEASE-NOTES.md (squash) v1.20.5-1' (#1780) from earl-warren/forgejo:wip-release-notes-1.20 into forgejo-development
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/1780
2023-11-25 13:11:02 +00:00
Gusted 48dfa935bc Merge pull request '[CLEANUP] Remove deadcode' (#1804) from Gusted/forgejo:forgejo-remove-aes into forgejo-development
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/1804
2023-11-25 10:12:36 +00:00
Earl Warren ab1556628d
[DOCS] RELEASE-NOTES.md (squash) v1.20.5-1 2023-11-24 15:33:00 +01:00
Gusted d840b9923e [CLEANUP] Remove deadcode
- This is deadcode since https://codeberg.org/forgejo/forgejo/pulls/1802
removed the usage of it.
2023-11-23 20:47:09 +00:00
Gusted 1d0056c293 Merge pull request '[GITEA] Fix cancelled migration deletion modal' (#1805) from Gusted/forgejo:forgejo-fix-confirmation into forgejo-development
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/1805
2023-11-23 20:46:47 +00:00
Gusted c38dbd6f88
[GITEA] Fix cancelled migration deletion modal
- https://codeberg.org/forgejo/forgejo/pulls/1473 made that dangerous
actions such as deletion also would need to type in the owner's name.
This was apparently not reflected to the deletion modal for migrations
that failed or were cancelled.
2023-11-23 20:26:51 +01:00
Gusted dd879dac00 Merge pull request '[SECURITY] Rework long-term authentication' (#1802) from Gusted/forgejo:forgejo-rework-lta into forgejo-development
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/1802
2023-11-23 18:17:40 +00:00
Gusted e3d6622a63
[SECURITY] Rework long-term authentication
- This is a 'front-port' of the already existing patch on v1.21 and
v1.20, but applied on top of what Gitea has done to rework the LTA
mechanism. Forgejo will stick with the reworked mechanism by the Forgejo
Security team for the time being. The removal of legacy code (AES-GCM) has been
left out.
- The current architecture is inherently insecure, because you can
construct the 'secret' cookie value with values that are available in
the database. Thus provides zero protection when a database is
dumped/leaked.
- This patch implements a new architecture that's inspired from: [Paragonie Initiative](https://paragonie.com/blog/2015/04/secure-authentication-php-with-long-term-persistence#secure-remember-me-cookies).
- Integration testing is added to ensure the new mechanism works.
- Removes a setting, because it's not used anymore.
2023-11-22 20:40:00 +01:00
Earl Warren 8657a6d421 Merge pull request '[DOCS] RELEASE-NOTES.md (squash) v1.21.0-9' (#1496) from earl-warren/forgejo:wip-release-notes-1.21 into forgejo-development
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/1496
2023-11-21 16:11:15 +00:00
Earl Warren deb7645550
links to go-enry & chroma releases to measure the gap 2023-11-21 16:19:05 +01:00
Earl Warren afed47fa40
v1.21.0-9 will be the release number 2023-11-21 15:54:37 +01:00
Earl Warren ab0ff5d2d0
add links to documentation for new features 2023-11-21 11:20:52 +01:00
Earl Warren 1e72c0608f
new features go-enry/linguist update from v7.25.0 to v7.27.0
go-enry 2.8.6
2023-11-15 17:53:43 +01:00
Earl Warren ffd249070a
new features chroma update from 2.7.0 to 2.9.1 2023-11-15 17:53:43 +01:00
Earl Warren ac6defb515
RSA keylength 3072 is a breaking change 2023-11-15 17:53:43 +01:00
Earl Warren cd0fbfc8ed
[DOCS] RELEASE-NOTES.md (squash) v1.21.0-0
[DOCS] RELEASE-NOTES.md (squash) v1.21.0-0 new features (UI split)

[DOCS] RELEASE-NOTES.md (squash) v1.21.0-0 complete release notes.
2023-11-15 17:53:43 +01:00
Earl Warren 7eb7bdd34c Merge pull request '[TEST] Fork with different name and open PR using api' (#1719) from zareck/forgejo:pr-api-test into forgejo-development
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/1719
2023-11-13 23:03:54 +00:00
zareck ed34138915 changing format to %s 2023-11-13 19:00:58 -03:00
Gusted 029cfa34de
[CLEANUP] Reuse ForgejoVersion variable
- Resolves https://codeberg.org/forgejo/forgejo/issues/1226

(cherry picked from commit e383b70109)
2023-11-13 12:21:09 +01:00
Gusted 5915f3643c
[LINT] Add deadcode linter
- Add the experimental
[deacode](https://pkg.go.dev/golang.org/x/tools/internal/cmd/deadcode)
linter to Forgejo.
- To deal with false positives that can happen due to build tags or with code
that's currently only referenced by test code, the output of the tool is
compared against a known-good output.
- This commit doesn't make any attempt to remove any deadcode.

(cherry picked from commit ac462279e9)
(cherry picked from commit b5ea6e85ac)
2023-11-13 12:21:09 +01:00
Earl Warren 77ba6be1da
[FEAT] allow setting the update date on issues and comments
This field adds the possibility to set the update date when modifying
an issue through the API.

A 'NoAutoDate' in-memory field is added in the Issue struct.
If the update_at field is set, NoAutoDate is set to true and the
Issue's UpdatedUnix field is filled.

That information is passed down to the functions that actually updates
the database, which have been modified to not auto update dates if
requested.

A guard is added to the 'EditIssue' API call, to checks that the
udpate_at date is between the issue's creation date and the current
date (to avoid 'malicious' changes). It also limits the new feature
to project's owners and admins.

(cherry picked from commit c524d33402)

Add a SetIssueUpdateDate() function in services/issue.go

That function is used by some API calls to set the NoAutoDate and
UpdatedUnix fields of an Issue if an updated_at date is provided.

(cherry picked from commit f061caa655)

Add an updated_at field to the API calls related to Issue's Labels.

The update date is applied to the issue's comment created to inform
about the modification of the issue's labels.

(cherry picked from commit ea36cf80f5)

Add an updated_at field to the API call for issue's attachment creation

The update date is applied to the issue's comment created to inform
about the modification of the issue's content, and is set as the
asset creation date.

(cherry picked from commit 96150971ca)

Checking Issue changes, with and without providing an updated_at date

Those unit tests are added:

- TestAPIEditIssueWithAutoDate
- TestAPIEditIssueWithNoAutoDate

- TestAPIAddIssueLabelsWithAutoDate
- TestAPIAddIssueLabelsWithNoAutoDate

- TestAPICreateIssueAttachmentWithAutoDate
- TestAPICreateIssueAttachmentWithNoAutoDate

(cherry picked from commit 4926a5d7a2)

Add an updated_at field to the API call for issue's comment creation

The update date is used as the comment creation date, and is applied to
the issue as the update creation date.

(cherry picked from commit 76c8faecdc)

Add an updated_at field to the API call for issue's comment edition

The update date is used as the comment update date, and is applied to
the issue as an update date.

(cherry picked from commit cf787ad7fd)

Add an updated_at field to the API call for comment's attachment creation

The update date is applied to the comment, and is set as the asset
creation date.

(cherry picked from commit 1e4ff424d3)

Checking Comment changes, with and without providing an updated_at date

Those unit tests are added:

- TestAPICreateCommentWithAutoDate
- TestAPICreateCommentWithNoAutoDate

- TestAPIEditCommentWithAutoDate
- TestAPIEditCommentWithNoAutoDate

- TestAPICreateCommentAttachmentWithAutoDate
- TestAPICreateCommentAttachmentWithNoAutoDate

(cherry picked from commit da932152f1)

Pettier code to set the update time of comments

Now uses sess.AllCols().NoAutoToime().SetExpr("updated_unix", ...)

XORM is smart enough to compose one single SQL UPDATE which all
columns + updated_unix.

(cherry picked from commit 1f6a42808d)

Issue edition: Keep the max of the milestone and issue update dates.

When editing an issue via the API, an updated_at date can be provided.
If the EditIssue call changes the issue's milestone, the milestone's
update date is to be changed accordingly, but only with a greater
value.

This ensures that a milestone's update date is the max of all issue's
update dates.

(cherry picked from commit 8f22ea182e)

Rewrite the 'AutoDate' tests using subtests

Also add a test to check the permissions to set a date, and a test
to check update dates on milestones.

The tests related to 'AutoDate' are:
- TestAPIEditIssueAutoDate
- TestAPIAddIssueLabelsAutoDate
- TestAPIEditIssueMilestoneAutoDate
- TestAPICreateIssueAttachmentAutoDate
- TestAPICreateCommentAutoDate
- TestAPIEditCommentWithDate
- TestAPICreateCommentAttachmentAutoDate

(cherry picked from commit 961fd13c55)
(cherry picked from commit d52f4eea44)
(cherry picked from commit 3540ea2a43)

Conflicts:
	services/issue/issue.go
	https://codeberg.org/forgejo/forgejo/pulls/1415
(cherry picked from commit 56720ade00)

Conflicts:
	routers/api/v1/repo/issue_label.go
	https://codeberg.org/forgejo/forgejo/pulls/1462
(cherry picked from commit 47c78927d6)
(cherry picked from commit 2030f3b965)
(cherry picked from commit f02aeb7698)

Conflicts:
	routers/api/v1/repo/issue_attachment.go
	routers/api/v1/repo/issue_comment_attachment.go
	https://codeberg.org/forgejo/forgejo/pulls/1575
(cherry picked from commit d072525b35)
(cherry picked from commit 8424d0ab3d)
(cherry picked from commit 5cc62caec7)
(cherry picked from commit d6300d5dcd)

[FEAT] allow setting the update date on issues and comments (squash) apply the 'update_at' value to the cross-ref comments (#1676)

[this is a follow-up to PR #764]

When a comment of issue A referencing issue B is added with a forced 'updated_at' date, that date has to be applied to the comment created in issue B.

-----

Comment:

While trying my 'RoundUp migration script', I found that this case was forgotten in PR #764 - my apologies...

I'll try to write a functional test, base on models/issues/issue_xref_test.go

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/1676
Co-authored-by: fluzz <fluzz@freedroid.org>
Co-committed-by: fluzz <fluzz@freedroid.org>
(cherry picked from commit ac4f727f63)
(cherry picked from commit 5110476ee9)
2023-11-13 12:21:09 +01:00
Earl Warren 740943d6b0
[UPGRADE] run sanity checks before the database is upgraded
https://codeberg.org/forgejo/forgejo/pulls/1543
(cherry picked from commit fbb71f464b)
(cherry picked from commit 650f849c84)
(cherry picked from commit 25e0d33dfe)
(cherry picked from commit 222b70e504)
(cherry picked from commit 4be04627a7)
(cherry picked from commit 64fcb25de3)
2023-11-13 12:21:09 +01:00
Earl Warren 6f5c2f902e
[SEMVER] store SemVer in ForgejoSemVer after a database upgrade
https://codeberg.org/forgejo/forgejo/pulls/1543
(cherry picked from commit 6146ef6263)
(cherry picked from commit 45b9005ad9)
(cherry picked from commit 4622cc5cc4)
(cherry picked from commit ed39cdc54c)
(cherry picked from commit b837dbd434)
(cherry picked from commit a0abe20b1b)
2023-11-13 12:21:09 +01:00
Earl Warren 5a4d56e77b
[TESTS] tests.AddFixtures helper loads additional per-test fixtures
(cherry picked from commit 93a844dd13)
(cherry picked from commit 6d6d1a121c)
(cherry picked from commit 8b101f2860)
(cherry picked from commit 3e56212d6d)
(cherry picked from commit 4f619bc585)
(cherry picked from commit 06a47ea56e)
2023-11-13 12:21:09 +01:00
Gusted fa7cdefa9d
[GITEA] Make confirmation clearer for dangerous actions
- Currently the confirmation for dangerous actions such as transferring
the repository or deleting it only requires the user to ~~copy paste~~
type the repository name.
- This can be problematic when the user has a fork or another repository
with the same name as an organization's repository, and the confirmation
doesn't make clear that it could be deleting the wrong repository. While
it's mentioned in the dialog, it's better to be on the safe side and
also add the owner's name to be an element that has to be typed for
these dangerous actions.
- Added integration tests.

(cherry picked from commit bf679b24dd)
(cherry picked from commit 1963085dd9)
(cherry picked from commit fb94095d19)
(cherry picked from commit e1d1e46afe)
(cherry picked from commit 93993029e4)
(cherry picked from commit df3b058179)
(cherry picked from commit 8ccc6b9cba)
(cherry picked from commit 9fbe28fca3)
2023-11-13 12:21:09 +01:00
Gusted 7c8d754ac6
[META] Add CODEOWNERS files
- As per https://codeberg.org/forgejo/discussions/issues/53#issuecomment-1070207
- Using the `CODEOWNERS` feature it should speed up the development
process for contributors as for the most common PRs the right reviewers
will be added by Forgejo automatically. They can be added very
precisely according to the changed files of the PR.
- This feature is implemented in v1.21, which means it's not available
on Codeberg.

(cherry picked from commit 1511ef1c80)
(cherry picked from commit 99999e3a03)
(cherry picked from commit 0b0dd6f7a9)
(cherry picked from commit d42940034f)
(cherry picked from commit 5be6e7d254)
(cherry picked from commit d12d6e8633)
(cherry picked from commit d3b3e691bf)
(cherry picked from commit 2a13f95551)
(cherry picked from commit 6d882ede35)
2023-11-13 12:21:09 +01:00
Caesar Schinas aeb6f7a5fc
[WORKFLOW] yaml issue templates
(cherry picked from commit 28c0f327cf)
(cherry picked from commit 1b532f16c7)
(cherry picked from commit 6e35d3ffb1)
(cherry picked from commit 3e6ba3b3b7)
(cherry picked from commit d47d8dd966)
(cherry picked from commit 2716166cd4)
(cherry picked from commit 50c67cb906)
(cherry picked from commit ba0049afc1)
(cherry picked from commit 09c596b3c3)
(cherry picked from commit b761117258)
(cherry picked from commit 45c9dc8f20)
(cherry picked from commit 861fb8ee61)
2023-11-13 12:21:09 +01:00
cassiozareck 4edda1f389
[FEAT] add Forgero Git Service
Signed-off-by: cassiozareck <cassiomilczareck@gmail.com>
(cherry picked from commit a878adfe62)

Adding description and Forgejo SVG

(cherry picked from commit 13738c0380)

Undo reordering and tmpl redirection

(cherry picked from commit 9ae51c46f4)
(cherry picked from commit 70fffdc61d)
(cherry picked from commit c0ebfa9da3)
(cherry picked from commit 9922c92787)
(cherry picked from commit 00c0effbc7)
(cherry picked from commit e4c9525b13)
(cherry picked from commit 09d7b83211)
(cherry picked from commit bbcd5975c9)
(cherry picked from commit 55c70a0e18)
(cherry picked from commit 76596410c0)
(cherry picked from commit 1308043931)
(cherry picked from commit 919d6aedfe)

[FEAT] add Forgero Git Service (squash) more tests

Previously only Gitea service was being tested under self-hosted migrations. Since Forgejo is also self-hosted and in fact use the same downloader/migrator we can add to this suite another test that will do the same, migrating the same repository under the same local instance but for the Forgejo service (represented by 9)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/1709
Co-authored-by: zareck <cassiomilczareck@gmail.com>
Co-committed-by: zareck <cassiomilczareck@gmail.com>
(cherry picked from commit 40a4b8f1a8)
(cherry picked from commit 3198b4a642)
2023-11-13 12:21:09 +01:00
Earl Warren b57ea4bdcd
[UPGRADE] add sanity check for v1.20.5-0
See https://forgejo.org/2023-10-release-v1-20-5-0/

(cherry picked from commit 7d619f79a0)
(cherry picked from commit ce5c75e153)
(cherry picked from commit 7b9eddf494)
(cherry picked from commit 200b6cdbdb)
(cherry picked from commit 860b18393d)
(cherry picked from commit 358386fab7)
2023-11-13 12:21:09 +01:00
Earl Warren 2f9dc0b4cc
[TESTS] upgrade tests for storage
(cherry picked from commit 884ca63738)
(cherry picked from commit 0a45d9c37b)

[TESTS] upgrade tests for storage (squash) relative paths

(cherry picked from commit 3bb19285f3)
(cherry picked from commit c640c09e61)
(cherry picked from commit 40ffe2d226)

[UPGRADE] S3 storage and fixtures

(cherry picked from commit c466c9c657)
(cherry picked from commit e80abbe2cd)
(cherry picked from commit 50a47df1d1)

[UPGRADE]  add sanity checks for [storage*] (squash) speedup upgrade tests

(cherry picked from commit f578279cfe)
(cherry picked from commit 6dd677f151)
(cherry picked from commit ee7e7eca27)
(cherry picked from commit 879ffca697)
(cherry picked from commit 60b33cc5af)
(cherry picked from commit a75b450c7b)
(cherry picked from commit 4e8712c523)
(cherry picked from commit f6447567a4)
(cherry picked from commit e0ab67536b)
2023-11-13 12:21:09 +01:00
Earl Warren 2817ce027c
[UPGRADE] add sanity checks for [storage*]
Refs: https://forgejo.org/2023-08-release-v1-20-3-0/
(cherry picked from commit a266dd0ce3)
(cherry picked from commit b9eb5eccd8)
(cherry picked from commit 7fc2028ede)
(cherry picked from commit 0c988e6120)
(cherry picked from commit 7ba05e8c2b)
(cherry picked from commit 2ed5068abe)
(cherry picked from commit 353913a26d)
(cherry picked from commit 4e63a01a8b)
(cherry picked from commit 99f612aed3)
(cherry picked from commit b4fe189cae)
(cherry picked from commit bd35e3b7bc)
(cherry picked from commit f59d9f7088)
(cherry picked from commit 0b2a93e044)
(cherry picked from commit 8c5d8bfea0)
2023-11-13 12:21:09 +01:00
Earl Warren db22d61eb4
[UPGRADE] run sanity checks before the database is upgraded
(cherry picked from commit 69741e4e66)
(cherry picked from commit 2a3c7b09cb)
(cherry picked from commit a1554c1168)
(cherry picked from commit edae2c6d2d)
(cherry picked from commit 49737cf009)
(cherry picked from commit ec53704c34)
(cherry picked from commit 7a1c5c0f32)
(cherry picked from commit e658c20c0f)
(cherry picked from commit baf575468f)
(cherry picked from commit 40cb14eff4)
(cherry picked from commit 25ab4d0713)
(cherry picked from commit 5a29005215)
(cherry picked from commit fef1260e99)
(cherry picked from commit eadbbb1afe)
2023-11-13 12:21:09 +01:00
Earl Warren b70f3e0fa5
[GITEA] add GetFile to config provider
(cherry picked from commit 88d1b53eea)
(cherry picked from commit f63f71afad)
(cherry picked from commit 1f774145fc)
(cherry picked from commit 53e637693b)
(cherry picked from commit 4974cbf10a)
(cherry picked from commit 554bca7fae)
(cherry picked from commit 61b8cf83b9)
(cherry picked from commit d8bcc6f68c)
(cherry picked from commit ee04c34072)
(cherry picked from commit 713153a6d6)
(cherry picked from commit 4e18c4f8bb)
(cherry picked from commit 32be9db12d)
(cherry picked from commit fd50e9b9b4)
(cherry picked from commit 11717b864b)
2023-11-13 12:21:09 +01:00
Earl Warren 0527bb20db
[TESTS] verify facts for the admin storage documentation
(cherry picked from commit 57e597bf7e)
(cherry picked from commit 643a2b0e81)
(cherry picked from commit f10faffb4f)
(cherry picked from commit b440c5767e)

[TESTS] verify facts for the admin storage documentation (squash)

(cherry picked from commit d83d8ce57b)
(cherry picked from commit d8855ef27c)
(cherry picked from commit 11230466ec)
(cherry picked from commit b2cdd9d971)
(cherry picked from commit a0a5e78524)
(cherry picked from commit 846413110f)
(cherry picked from commit 72b92d5a78)
(cherry picked from commit 7e039a9427)
(cherry picked from commit 227d42a1b6)
(cherry picked from commit 6488950a9b)
(cherry picked from commit 0285c99774)
2023-11-13 12:21:08 +01:00
Earl Warren fd1c3a6d09
[SEMVER] store SemVer in ForgejoSemVer after a database upgrade
(cherry picked from commit b7fe7cf401)
(cherry picked from commit cf339eed4f)
(cherry picked from commit 4f3a16168b)
(cherry picked from commit 6f5bbc53fc)
(cherry picked from commit aca42b422e)
(cherry picked from commit 5a7f7580e5)
(cherry picked from commit 06c383c807)
(cherry picked from commit fe831dcb53)
(cherry picked from commit cd12cd0dbc)
(cherry picked from commit cc79163703)
(cherry picked from commit 0102a5715e)
(cherry picked from commit 403f7520b3)
(cherry picked from commit a3b61510a2)
(cherry picked from commit f83f0f9feb)
2023-11-13 12:21:08 +01:00
Gusted ac56c7a202
[DB] forgejo migration v1: add blocked user migration
(cherry picked from commit 66afddd511)
(cherry picked from commit 19da0dee9d)
(cherry picked from commit 0b725af693)
(cherry picked from commit 64d4de2b66)
(cherry picked from commit 05bc9d3b7f)
(cherry picked from commit 5958553066)
(cherry picked from commit c4f77e26c9)
(cherry picked from commit 3034832c66)
(cherry picked from commit d48931ec5b)
(cherry picked from commit b1e0d53c28)
(cherry picked from commit e3de35fe15)
(cherry picked from commit 3b2712c3d6)
(cherry picked from commit 00c6940851)
2023-11-13 12:21:08 +01:00
Earl Warren 10e8a4f8b8
[DB] forgejo migration v2: create the forgejo_sem_ver table
(cherry picked from commit 86b26436af)
(cherry picked from commit 479cba59ac)
(cherry picked from commit 4765f9a889)
(cherry picked from commit af771410bf)
(cherry picked from commit d1ea9305d8)
(cherry picked from commit f77e1bb7ab)
(cherry picked from commit 0b95f8fe89)
(cherry picked from commit 4f8fb2390a)
(cherry picked from commit 8ea0e22ff6)
(cherry picked from commit 43ac19ac59)
(cherry picked from commit 0d2f63df4f)
(cherry picked from commit d02a8036fd)
(cherry picked from commit 1fe4c7db94)
(cherry picked from commit d641cdeaf0)
2023-11-13 12:21:08 +01:00
Earl Warren 8ed3f3f86b
[DB] run all Forgejo migrations in integration tests
The tests at tests/integration/migration-test/migration_test.go will
not run any Forgejo migration when using the gitea-*.sql.gz files
because they do not contain a ForgejoVersion row which is interpreted
as a new Forgejo installation for which there is no need for migration.

Create a situation by which the ForgejoVersion table exists and has a
version of 0 in tests/integration/migration-test/forgejo-v1.19.0.*.sql.gz
thus ensuring all Forgejo migrations are run.

The forgejo*.sql.gz files do not have any Gitea related records, which
will be interpreted by the Gitea migrations as a new installation that
does not need any migration. As a consequence the migration tests run
when using forgejo-v1.19.0.*.sql.gz are exclusively about Forgejo
migrations.

(cherry picked from commit ec8003859c)
(cherry picked from commit 697570ff39)
(cherry picked from commit f041aec172)
(cherry picked from commit 60463e3bab)
(cherry picked from commit b2fc2a7c13)
(cherry picked from commit fb2759b6af)
(cherry picked from commit 37cfc3b227)
(cherry picked from commit 832607500a)
(cherry picked from commit 143d4007b1)
(cherry picked from commit a17e803fbf)
(cherry picked from commit 72ffd49bc3)
(cherry picked from commit 9b92a5fd72)
(cherry picked from commit 0a334d0a9b)
(cherry picked from commit 3add683c94)
2023-11-13 12:21:08 +01:00
Gusted 6c0aa7dd4f
[DB] Forgejo database migrations
- Implements https://codeberg.org/forgejo/discussions/issues/32#issuecomment-918737
- Allows to add Forgejo-specific migrations that don't interfere with Gitea's migration logic. Please do note that we cannot liberally add migrations for Gitea tables, as they might do their own migrations in a future version on that table, and that could undo our migrations. Luckily,  we don't have a scenario where that's needed and thus not taken into account.

Co-authored-by: Gusted <postmaster@gusted.xyz>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/795
(cherry picked from commit 8ee32978c0)
(cherry picked from commit c240b34f59)
(cherry picked from commit 03936c6492)
(cherry picked from commit a20ed852f8)
(cherry picked from commit 1dfa82676f)
(cherry picked from commit c39ae0bf8a)
(cherry picked from commit cfaff08996)
(cherry picked from commit 94a458835a)
(cherry picked from commit 61a3cf77df)
(cherry picked from commit abb350fde8)
(cherry picked from commit 5194829d6b)
(cherry picked from commit 89239a60f2)
(cherry picked from commit 683cfd86ef)
(cherry picked from commit f4546cfed9)
(cherry picked from commit 86614d5826)
(cherry picked from commit e4b9c32187)
(cherry picked from commit 8c253719af)
(cherry picked from commit 857365d6c1)
(cherry picked from commit a488b3952f)
(cherry picked from commit 98313c4910)
(cherry picked from commit 430d95e824)
(cherry picked from commit 08bf9d918f)
(cherry picked from commit f8a170e2d0)
(cherry picked from commit d20e325378)
2023-11-13 12:21:08 +01:00
Panagiotis "Ivory" Vasilopoulos 8779d505f2
[FEAT] Use OpenStreetMap in USER_LOCATION_MAP_URL by default
Follow-up to d58c542579 for Forgejo.

By default, Gitea does not select any map service that can be used
to introduce a 'Show this place on a map' button in the location
field of a user profile. Before I tried upstreaming this change to
Gitea, this was the case in Forgejo. This patch essentially recovers
this functionality, which is nice for public-facing instances and
communities.

Links to original PRs:
- https://codeberg.org/forgejo/forgejo/pulls/1076
- https://github.com/go-gitea/gitea/pull/26214

(cherry picked from commit bb187d5f61)
(cherry picked from commit ce02ef9078)
(cherry picked from commit 6b75c40e25)
(cherry picked from commit 6bc8e9f573)
(cherry picked from commit 063f8afdf7)
(cherry picked from commit c5cc736b72)
(cherry picked from commit 7b1bb4bedc)
(cherry picked from commit 2a022dceb4)
(cherry picked from commit a946c142d2)
(cherry picked from commit 8a4ea0c7ab)
(cherry picked from commit 37bfb05b34)
(cherry picked from commit 12fbbb1754)
(cherry picked from commit abe9de2cd9)
(cherry picked from commit 84db578717)
(cherry picked from commit 1beab7af46)
2023-11-13 12:21:08 +01:00
Gusted 9fd13853df
[META] Use correct language for .tmpl
- Upstream chosen `Handlebars` as language for the templates, presumenly
because Github doesn't have an syntax highlighter for Go.
- Forgejo does have syntax highlighting support for Go templates, so use that.

(cherry picked from commit a79718522d)
(cherry picked from commit 380d847e5c)
(cherry picked from commit 4126a9672d)
(cherry picked from commit afde0ed822)
(cherry picked from commit 6ddaca0061)
(cherry picked from commit 454b2f6b35)
(cherry picked from commit 58c10e1f93)
(cherry picked from commit 19ec0a5536)
(cherry picked from commit c3717ae4de)
(cherry picked from commit 6c74bbe575)
(cherry picked from commit 9cb48db780)
(cherry picked from commit 19cb774553)
(cherry picked from commit ac35eb83cd)
(cherry picked from commit 986a306d22)
(cherry picked from commit cd841848ee)
2023-11-13 12:21:08 +01:00
Earl Warren 29119a870f
[SEMVER] 6.0.0+0-gitea-1.21.0
(cherry picked from commit 4107d99f25)
(cherry picked from commit 7e097b945c)
(cherry picked from commit 431edaac36)
(cherry picked from commit 51ecd89e31)
(cherry picked from commit 734d7f5bc7)
(cherry picked from commit f34e88d00c)
(cherry picked from commit cd882a75f9)
(cherry picked from commit 7dfa28db3f)
(cherry picked from commit 4bdaeeb686)
(cherry picked from commit a0e8285914)
(cherry picked from commit 72991a99f3)
(cherry picked from commit c99949bbf7)
(cherry picked from commit d4dd7df8e7)
(cherry picked from commit 1fe5c1e81e)
(cherry picked from commit 969b727c50)
(cherry picked from commit f2061a87c0)
(cherry picked from commit 2d75f86f0e)
2023-11-13 12:21:08 +01:00
Earl Warren 059f067a98
[TESTS] increase test-sqlite log level to Trace
It does not pollute the output because they go to sqlite-log/gitea.log
and it may provide clues for debugging. When trying to figure out a
problem in production, Debug is likely to be used but in a development
environment a very fine grain log is the most useful. If that's really
too much noise, the lines can be trimmed by removing all those with [T].

(cherry picked from commit 666b02eb9d)
(cherry picked from commit b69e4d3058)
(cherry picked from commit 0c1aecd7ec)
(cherry picked from commit 0304e41345)
(cherry picked from commit 4bcc7e02ce)
(cherry picked from commit 98364235f2)
(cherry picked from commit ca465e97c1)
(cherry picked from commit 653045ade1)
(cherry picked from commit 9ca2e644ab)
(cherry picked from commit 47c8a05b37)
(cherry picked from commit 4235d929ed)
(cherry picked from commit 10541c4b1c)
(cherry picked from commit c1a0e1eb2f)
(cherry picked from commit 1c20bf30b2)
(cherry picked from commit d4b372db31)
(cherry picked from commit fe3e434299)
(cherry picked from commit d2b544847f)
2023-11-13 12:21:08 +01:00
Earl Warren a4194c29ff
[TESTS] coverage for SignInOAuthCallback
(cherry picked from commit f8e1619b99)
(cherry picked from commit 46d8bc9bdf)
(cherry picked from commit e0c7b7055f)
(cherry picked from commit faab747f8e)
(cherry picked from commit 46acb6a9a7)
(cherry picked from commit 22d964e744)
(cherry picked from commit 4c8a6031ac)
(cherry picked from commit 032e8c7a9a)
(cherry picked from commit 7a17a3b0fb)
(cherry picked from commit 8ea71c2a31)
(cherry picked from commit 4b027e2d37)
(cherry picked from commit d787089a5d)
(cherry picked from commit 7b9999357a)
(cherry picked from commit 80eb531c38)
(cherry picked from commit 373b198bfb)
(cherry picked from commit 15781eedf7)
(cherry picked from commit 46bdb17a2f)
(cherry picked from commit 22ec6c11ee)
(cherry picked from commit 3f94b9a111)
2023-11-13 12:21:08 +01:00
Earl Warren 02b16875cf
[TESTS] oauth2: make it possible to use an alternate http.Client
(cherry picked from commit aea4ab25a9)
(cherry picked from commit d386b212c4)
(cherry picked from commit c4935f08ad)
(cherry picked from commit dc6ca7cd25)
(cherry picked from commit 25296d5a3c)
(cherry picked from commit 3d54c64c5f)
(cherry picked from commit 6ece0b9d01)
(cherry picked from commit 3b39962033)
(cherry picked from commit 5e2167cd03)
(cherry picked from commit e676d7b265)
(cherry picked from commit 9cd258e865)
(cherry picked from commit 0a8d58c159)
(cherry picked from commit b66d06823a)
(cherry picked from commit 4fbe2a0047)
(cherry picked from commit a225e0c9b4)
(cherry picked from commit 21b670b927)
(cherry picked from commit d586e335d5)
(cherry picked from commit 7ab21549a3)
(cherry picked from commit eb3235039f)
2023-11-13 12:21:08 +01:00