From fba48e64977a75e77c9c6cf8e3f8a679a5e7b733 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Dachary?= Date: Sat, 18 Mar 2023 08:38:14 +0100 Subject: [PATCH 1/5] [API] [SEMVER] replace number with version --- public/forgejo/api.v1.yml | 2 +- routers/api/forgejo/v1/generated.go | 2 +- tests/integration/api_forgejo_version_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/forgejo/api.v1.yml b/public/forgejo/api.v1.yml index 903dd659d0..924ea91d7b 100644 --- a/public/forgejo/api.v1.yml +++ b/public/forgejo/api.v1.yml @@ -35,6 +35,6 @@ components: Version: type: object properties: - number: + version: type: string diff --git a/routers/api/forgejo/v1/generated.go b/routers/api/forgejo/v1/generated.go index afec612e85..725ddf572a 100644 --- a/routers/api/forgejo/v1/generated.go +++ b/routers/api/forgejo/v1/generated.go @@ -12,7 +12,7 @@ import ( // Version defines model for Version. type Version struct { - Number *string `json:"number,omitempty"` + Version *string `json:"version,omitempty"` } // ServerInterface represents all server handlers. diff --git a/tests/integration/api_forgejo_version_test.go b/tests/integration/api_forgejo_version_test.go index cd904338a7..b8b8de8ee1 100644 --- a/tests/integration/api_forgejo_version_test.go +++ b/tests/integration/api_forgejo_version_test.go @@ -21,5 +21,5 @@ func TestAPIForgejoVersion(t *testing.T) { var version v1.Version DecodeJSON(t, resp, &version) - assert.Equal(t, "development", *version.Number) + assert.Equal(t, "development", *version.Version) } From 01ca3a4f4291cf4c62df42cbd12a00638f3cdc70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Dachary?= Date: Sat, 18 Mar 2023 14:21:02 +0100 Subject: [PATCH 2/5] [API] [SEMVER] [v1.20] less is replaced by css --- webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 0761e3ad64..5db6c43d97 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -64,7 +64,7 @@ export default { ], forgejoswagger: [ // Forgejo swagger is OpenAPI 3.0.0 and has specific parameters fileURLToPath(new URL('web_src/js/standalone/forgejo-swagger.js', import.meta.url)), - fileURLToPath(new URL('web_src/less/standalone/swagger.less', import.meta.url)), + fileURLToPath(new URL('web_src/css/standalone/swagger.css', import.meta.url)), ], swagger: [ fileURLToPath(new URL('web_src/js/standalone/swagger.js', import.meta.url)), From 802a252eb5ddb411574cd7a8c9645fffd88de469 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Tue, 21 Mar 2023 09:03:23 +0100 Subject: [PATCH 3/5] [DOCS] RELEASE-NOTES: fix broken link to OIDC mapping --- RELEASE-NOTES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index dc9787c032..e5bae8693b 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -97,7 +97,7 @@ $ git -C forgejo log --oneline --no-merges origin/v1.18/forgejo..origin/v1.19/fo OIDC Group mapping part2 - [Read more about OIDC groups mapping](https://forgejo.org/docs/v1.19/admin/oauth2-provider/#endpoints) + [Read more about OIDC groups mapping](https://forgejo.org/docs/v1.19/user/oauth2-provider/#endpoints) * [RSS feed for releases and tags](https://codeberg.org/forgejo/forgejo/commit/48d71b7d6) From a605d36ab63cba34770b14e0073ee6b9dbb3b511 Mon Sep 17 00:00:00 2001 From: KaKi87 Date: Mon, 20 Mar 2023 17:07:32 +0100 Subject: [PATCH 4/5] [DOCS] RELEASE-NOTES: Fix spaces --- RELEASE-NOTES.md | 180 +++++++++++++++++++++++------------------------ 1 file changed, 90 insertions(+), 90 deletions(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index e5bae8693b..2da2535adf 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -16,13 +16,13 @@ $ git -C forgejo log --oneline --no-merges origin/v1.18/forgejo..origin/v1.19/fo * Breaking changes * [Scoped access tokens](https://codeberg.org/forgejo/forgejo/commit/de484e86bc) - Forgejo access token, used with the [API](https://forgejo.org/docs/v1.19/admin/api-usage/) can now have a "scope" that limits what it can access. Existing tokens stored in the database and created before Forgejo v1.19 had unlimited access. For backward compatibility, their access will remain the same and they will continue to work as before. However, **newly created token that do not specify a scope will now only have read-only access to public user profile and public repositories**. + Forgejo access token, used with the [API](https://forgejo.org/docs/v1.19/admin/api-usage/) can now have a "scope" that limits what it can access. Existing tokens stored in the database and created before Forgejo v1.19 had unlimited access. For backward compatibility, their access will remain the same and they will continue to work as before. However, **newly created token that do not specify a scope will now only have read-only access to public user profile and public repositories**. For instance, the `/users/{username}/tokens` API endpoint will require the `scopes: ['all', 'sudo']` parameter and the `forgejo admin user generate-access-token` will require the `--scopes all,sudo` argument obtain tokens with ulimited access as before for admin users. [Read more about the scoped tokens](https://forgejo.org/docs/v1.19/user/oauth2-provider/#scoped-tokens). - * [Disable all units except code and pulls on forks](https://codeberg.org/forgejo/forgejo/commit/2741546be) + * [Disable all units except code and pulls on forks](https://codeberg.org/forgejo/forgejo/commit/2741546be) When forking a repository, the fork will now have issues, projects, releases, packages and wiki disabled. These can be enabled in the repository settings afterwards. To change back to the previous default behavior, configure `DEFAULT_FORK_REPO_UNITS` to be the same value as `DEFAULT_REPO_UNITS`. @@ -42,157 +42,157 @@ $ git -C forgejo log --oneline --no-merges origin/v1.18/forgejo..origin/v1.19/fo If a Forgejo instance has users or organizations named `forgejo-actions` and `gitea-actions`, they will also need to be renamed before the upgrade. They are now reserved names for the experimental internal CI/CD named `Actions`. * Features - * [Documentation](https://forgejo.org/docs/latest/) - The first version of the [Forgejo documentation](https://forgejo.org/docs/latest/) is available and covers the administration of Forgejo, from installation to troubleshooting. + * [Documentation](https://forgejo.org/docs/latest/) + The first version of the [Forgejo documentation](https://forgejo.org/docs/latest/) is available and covers the administration of Forgejo, from installation to troubleshooting. - * [Semantic version](https://forgejo.org/docs/latest/user/semver) - In addition to the Forgejo release number, a [semantic version](https://semver.org/#semantic-versioning-200) number can be obtained from the - `/api/forgejo/v1/version` and now reflects the Gitea version that Forgejo depends on (e.g. `3.0.0+0-gitea-1.19.0`). + * [Semantic version](https://forgejo.org/docs/latest/user/semver) + In addition to the Forgejo release number, a [semantic version](https://semver.org/#semantic-versioning-200) number can be obtained from the + `/api/forgejo/v1/version` and now reflects the Gitea version that Forgejo depends on (e.g. `3.0.0+0-gitea-1.19.0`). - [Read more about semantic versions](https://forgejo.codeberg.page/docs/v1.19/user/semver) + [Read more about semantic versions](https://forgejo.codeberg.page/docs/v1.19/user/semver) - * [Webhook authorization header](https://codeberg.org/forgejo/forgejo/commit/b6e81357bd6fb80f8ba94c513f89a210beb05313) - Forgejo webhooks can be configured to send an [authorization header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization) to the target. + * [Webhook authorization header](https://codeberg.org/forgejo/forgejo/commit/b6e81357bd6fb80f8ba94c513f89a210beb05313) + Forgejo webhooks can be configured to send an [authorization header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization) to the target. - [Read more about the webhook authorization header](https://forgejo.codeberg.page/docs/v1.19/user/webhooks/#authorization-header) + [Read more about the webhook authorization header](https://forgejo.codeberg.page/docs/v1.19/user/webhooks/#authorization-header) - * [Incoming emails](https://codeberg.org/forgejo/forgejo/commit/fc037b4b825f0501a1489e10d7c822435d825cb7) - You can now set up Forgejo to receive incoming email. When enabled, it is now possible to reply to an email notification from Forgejo and: - * Add a comment to an issue or a pull request - * Unsubscribe to the notifications + * [Incoming emails](https://codeberg.org/forgejo/forgejo/commit/fc037b4b825f0501a1489e10d7c822435d825cb7) + You can now set up Forgejo to receive incoming email. When enabled, it is now possible to reply to an email notification from Forgejo and: + * Add a comment to an issue or a pull request + * Unsubscribe to the notifications - [Read more about incoming emails](https://forgejo.org/docs/v1.19/admin/incoming-email/) + [Read more about incoming emails](https://forgejo.org/docs/v1.19/admin/incoming-email/) - * Packages registries - * Support for [Cargo](https://forgejo.org/docs/v1.19/admin/packages/cargo/), [Conda](https://forgejo.org/docs/v1.19/admin/packages/conda/) and [Chef](https://forgejo.org/docs/v1.19/admin/packages/chef/) - * [Cleanup rules](https://codeberg.org/forgejo/forgejo/commit/32db62515) - * [Quota limits](https://codeberg.org/forgejo/forgejo/commit/20674dd05) + * Packages registries + * Support for [Cargo](https://forgejo.org/docs/v1.19/admin/packages/cargo/), [Conda](https://forgejo.org/docs/v1.19/admin/packages/conda/) and [Chef](https://forgejo.org/docs/v1.19/admin/packages/chef/) + * [Cleanup rules](https://codeberg.org/forgejo/forgejo/commit/32db62515) + * [Quota limits](https://codeberg.org/forgejo/forgejo/commit/20674dd05) - * [Option to prohibit fork if user reached maximum limit of repositories](https://codeberg.org/forgejo/forgejo/commit/7cc7db73b) - It is possible for a user to create as many fork as they want, even when a quota on the number of repositories is imposed. The new `ALLOW_FORK_WITHOUT_MAXIMUM_LIMIT` setting can now be set to `false` so forks are prohibited if that means exceeding the quota. + * [Option to prohibit fork if user reached maximum limit of repositories](https://codeberg.org/forgejo/forgejo/commit/7cc7db73b) + It is possible for a user to create as many fork as they want, even when a quota on the number of repositories is imposed. The new `ALLOW_FORK_WITHOUT_MAXIMUM_LIMIT` setting can now be set to `false` so forks are prohibited if that means exceeding the quota. - [Read more about repository configurations](https://forgejo.org/docs/v1.19/admin/config-cheat-sheet/#repository-repository) + [Read more about repository configurations](https://forgejo.org/docs/v1.19/admin/config-cheat-sheet/#repository-repository) - * [Scoped labels](https://codeberg.org/forgejo/forgejo/commit/6221a6fd5) - Labels that contain a forward slash (**/**) separator are displayed with a slightly different color before and after the separator, as a visual aid. The first part of the label defines its "scope". + * [Scoped labels](https://codeberg.org/forgejo/forgejo/commit/6221a6fd5) + Labels that contain a forward slash (**/**) separator are displayed with a slightly different color before and after the separator, as a visual aid. The first part of the label defines its "scope". - [Read more about scoped labels](https://forgejo.org/docs/v1.19/user/labels/). + [Read more about scoped labels](https://forgejo.org/docs/v1.19/user/labels/). - * [Support org/user level projects](https://codeberg.org/forgejo/forgejo/commit/6fe3c8b39) - It is now possible to create projects (kanban boards) for an organization or a user, in the same way it was possible for an individual repository. + * [Support org/user level projects](https://codeberg.org/forgejo/forgejo/commit/6fe3c8b39) + It is now possible to create projects (kanban boards) for an organization or a user, in the same way it was possible for an individual repository. - * [Map OIDC groups to Orgs/Teams](https://codeberg.org/forgejo/forgejo/commit/e8186f1c0) - When a user logs in Forgejo using an provider such as [Keycloak](https://www.keycloak.org/), they can now automatically be part of a Forgejo team, depending on the OIDC group they belong to. For instance: + * [Map OIDC groups to Orgs/Teams](https://codeberg.org/forgejo/forgejo/commit/e8186f1c0) + When a user logs in Forgejo using an provider such as [Keycloak](https://www.keycloak.org/), they can now automatically be part of a Forgejo team, depending on the OIDC group they belong to. For instance: - ```json - {"Developer": {"MyForgejoOrganization": ["MyForgejoTeam1", "MyForgejoTeam2"]}} - ``` + ```json + {"Developer": {"MyForgejoOrganization": ["MyForgejoTeam1", "MyForgejoTeam2"]}} + ``` - Means that the user who is in the OIDC group `Developer` will automatically be a member of the `MyForgejoTeam1` and `MyForgejoTeam2` teams in the `MyForgejoOrganization` organization. - This mapping is set when adding a new `Authentication Source` in the `Site Administration` panel. + Means that the user who is in the OIDC group `Developer` will automatically be a member of the `MyForgejoTeam1` and `MyForgejoTeam2` teams in the `MyForgejoOrganization` organization. + This mapping is set when adding a new `Authentication Source` in the `Site Administration` panel. - OIDC Group mapping part1 + OIDC Group mapping part1 - ... + ... - OIDC Group mapping part2 + OIDC Group mapping part2 - [Read more about OIDC groups mapping](https://forgejo.org/docs/v1.19/user/oauth2-provider/#endpoints) + [Read more about OIDC groups mapping](https://forgejo.org/docs/v1.19/user/oauth2-provider/#endpoints) - * [RSS feed for releases and tags](https://codeberg.org/forgejo/forgejo/commit/48d71b7d6) + * [RSS feed for releases and tags](https://codeberg.org/forgejo/forgejo/commit/48d71b7d6) - A RSS feed is now available for releases at `/{owner}/{repo}/releases.rss` and tags at `/{owner}/{repo}/tags.rss`. + A RSS feed is now available for releases at `/{owner}/{repo}/releases.rss` and tags at `/{owner}/{repo}/tags.rss`. - * [Supports wildcard protected branch](https://codeberg.org/forgejo/forgejo/commit/2782c1439) + * [Supports wildcard protected branch](https://codeberg.org/forgejo/forgejo/commit/2782c1439) - Instead of selecting a branch to be protected, the name of the branch must be specified and can be a pattern such as `precious*`. + Instead of selecting a branch to be protected, the name of the branch must be specified and can be a pattern such as `precious*`. - [Read more about branch protection](https://forgejo.org/docs/v1.19/user/protection/#protected-branches). + [Read more about branch protection](https://forgejo.org/docs/v1.19/user/protection/#protected-branches). - * [Garbage collect LFS](https://codeberg.org/forgejo/forgejo/commit/651fe4bb7) - Add a doctor command for full garbage collection of LFS: `forgejo doctor --run gc-lfs`. + * [Garbage collect LFS](https://codeberg.org/forgejo/forgejo/commit/651fe4bb7) + Add a doctor command for full garbage collection of LFS: `forgejo doctor --run gc-lfs`. - * Additions to the API + * Additions to the API - * [Management for issue/pull and comment attachments](https://codeberg.org/forgejo/forgejo/commit/3c59d31bc) - * [Get latest release](https://codeberg.org/forgejo/forgejo/commit/4d072a4c4) - * [System hook](https://codeberg.org/forgejo/forgejo/commit/c0015979a) + * [Management for issue/pull and comment attachments](https://codeberg.org/forgejo/forgejo/commit/3c59d31bc) + * [Get latest release](https://codeberg.org/forgejo/forgejo/commit/4d072a4c4) + * [System hook](https://codeberg.org/forgejo/forgejo/commit/c0015979a) - * [Option to disable releases on a repository](https://codeberg.org/forgejo/forgejo/commit/faa96553d) + * [Option to disable releases on a repository](https://codeberg.org/forgejo/forgejo/commit/faa96553d) - It is now possible to disable releases on a repository, in the same way it is possible to disable issues or packages. + It is now possible to disable releases on a repository, in the same way it is possible to disable issues or packages. - * [Git reflog support](https://codeberg.org/forgejo/forgejo/commit/757b4c17e) - The [git reflog](https://git-scm.com/docs/git-reflog) are now active by default on all repositories and - kept around for 90 days. It allows the Forgejo admin to recover the previous tip of a branch after an - accidental force push. + * [Git reflog support](https://codeberg.org/forgejo/forgejo/commit/757b4c17e) + The [git reflog](https://git-scm.com/docs/git-reflog) are now active by default on all repositories and + kept around for 90 days. It allows the Forgejo admin to recover the previous tip of a branch after an + accidental force push. - [Read more about reflog](https://forgejo.org/docs/v1.19/admin/config-cheat-sheet/#git---reflog-settings-gitreflog) + [Read more about reflog](https://forgejo.org/docs/v1.19/admin/config-cheat-sheet/#git---reflog-settings-gitreflog) - * [Actions](https://codeberg.org/forgejo/forgejo/commit/4011821c946e8db032be86266dd9364ccb204118): an experimental CI/CD + * [Actions](https://codeberg.org/forgejo/forgejo/commit/4011821c946e8db032be86266dd9364ccb204118): an experimental CI/CD - It appears for the first time in this Forgejo release but is not yet fit for production. It is not fully implemented and may be insecure. However, as long as it is not enabled, it presents no risk to existing Forgejo instances. + It appears for the first time in this Forgejo release but is not yet fit for production. It is not fully implemented and may be insecure. However, as long as it is not enabled, it presents no risk to existing Forgejo instances. - If a repository has a file such as `.forgejo/workflows/test.yml`, it will be interpreted, for instance to run tests and verify the code in the repository works as expected (Continuous Integration). It can also be used to create HTML pages for a website and publish them (Continous Deployment). The syntax is similar to GitHub Actions and the jobs can be controled from the Forgejo web interface. + If a repository has a file such as `.forgejo/workflows/test.yml`, it will be interpreted, for instance to run tests and verify the code in the repository works as expected (Continuous Integration). It can also be used to create HTML pages for a website and publish them (Continous Deployment). The syntax is similar to GitHub Actions and the jobs can be controled from the Forgejo web interface. - [Read more about Forgejo Actions](https://forgejo.codeberg.page/2023-02-27-forgejo-actions/) + [Read more about Forgejo Actions](https://forgejo.codeberg.page/2023-02-27-forgejo-actions/) - Actions + Actions * User Interface improvements - * [Review box on small screens](https://codeberg.org/forgejo/forgejo/commit/1fcf96ad0) - The rendering of the review box is improved on small screens. + * [Review box on small screens](https://codeberg.org/forgejo/forgejo/commit/1fcf96ad0) + The rendering of the review box is improved on small screens. - * [Video element enabled in markdown](https://codeberg.org/forgejo/forgejo/commit/f8a40dafb) - The `