Skip to content

Commit d6b4a01

Browse files
committed
Merge remote-tracking branch 'upstream/main'
* upstream/main: Simplify the error message when `index.js` couldn't be loaded (go-gitea#22354) Support asciicast files as new markup (go-gitea#22448) Support scoped access tokens (go-gitea#20908) some refactor about code comments (go-gitea#20821) docs: add swagger.json file location to FAQ (go-gitea#22489) docs: bump Gitea version (go-gitea#22490) chore: changelog 1.18.1 (go-gitea#22471) (go-gitea#22487) Fixed lint warnings in Grafana raised by Mixtool (go-gitea#22486) Set disable_gravatar/enable_federated_avatar when offline mode is true (go-gitea#22479) Fix pull request API field `closed_at` always being `null` (go-gitea#22482) Fix migration from gitbucket (repost) (go-gitea#22477)
2 parents a78e77c + 7ddc11d commit d6b4a01

File tree

105 files changed

+1760
-644
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+1760
-644
lines changed

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,47 @@ This changelog goes through all the changes that have been made in each release
44
without substantial changes to our git log; to see the highlights of what has
55
been added to each release, please refer to the [blog](https://blog.gitea.io).
66

7+
## [1.18.1](https://github.com/go-gitea/gitea/releases/tag/v1.18.1) - 2023-01-17
8+
9+
* API
10+
* Add `sync_on_commit` option for push mirrors api (#22271) (#22292)
11+
* BUGFIXES
12+
* Update `github.com/zeripath/zapx/v15` (#22485)
13+
* Fix pull request API field `closed_at` always being `null` (#22482) (#22483)
14+
* Fix container blob mount (#22226) (#22476)
15+
* Fix error when calculating repository size (#22392) (#22474)
16+
* Fix Operator does not exist bug on explore page with ONLY_SHOW_RELEVANT_REPOS (#22454) (#22472)
17+
* Fix environments for KaTeX and error reporting (#22453) (#22473)
18+
* Remove the netgo tag for Windows build (#22467) (#22468)
19+
* Fix migration from GitBucket (#22477) (#22465)
20+
* Prevent panic on looking at api "git" endpoints for empty repos (#22457) (#22458)
21+
* Fix PR status layout on mobile (#21547) (#22441)
22+
* Fix wechatwork webhook sends empty content in PR review (#21762) (#22440)
23+
* Remove duplicate "Actions" label in mobile view (#21974) (#22439)
24+
* Fix leaving organization bug on user settings -> orgs (#21983) (#22438)
25+
* Fixed colour transparency regex matching in project board sorting (#22092) (#22437)
26+
* Correctly handle select on multiple channels in Queues (#22146) (#22428)
27+
* Prepend refs/heads/ to issue template refs (#20461) (#22427)
28+
* Restore function to "Show more" buttons (#22399) (#22426)
29+
* Continue GCing other repos on error in one repo (#22422) (#22425)
30+
* Allow HOST has no port (#22280) (#22409)
31+
* Fix omit avatar_url in discord payload when empty (#22393) (#22394)
32+
* Don't display stop watch top bar icon when disabled and hidden when click other place (#22374) (#22387)
33+
* Don't lookup mail server when using sendmail (#22300) (#22383)
34+
* Fix gravatar disable bug (#22337)
35+
* Fix update settings table on install (#22326) (#22327)
36+
* Fix sitemap (#22272) (#22320)
37+
* Fix code search title translation (#22285) (#22316)
38+
* Fix due date rendering the wrong date in issue (#22302) (#22306)
39+
* Fix get system setting bug when enabled redis cache (#22298)
40+
* Fix bug of DisableGravatar default value (#22297)
41+
* Fix key signature error page (#22229) (#22230)
42+
* TESTING
43+
* Remove test session cache to reduce possible concurrent problem (#22199) (#22429)
44+
* MISC
45+
* Restore previous official review when an official review is deleted (#22449) (#22460)
46+
* Log STDERR of external renderer when it fails (#22442) (#22444)
47+
748
## [1.18.0](https://github.com/go-gitea/gitea/releases/tag/v1.18.0) - 2022-12-29
849

950
* SECURITY

contrib/gitea-monitoring-mixin/dashboards/overview.libsonnet

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ local addIssueLabelsOverrides(labels) =
2929

3030
grafanaDashboards+:: {
3131

32-
local giteaSelector = 'job="$job", instance="$instance"',
32+
local giteaSelector = 'job=~"$job", instance=~"$instance"',
3333
local giteaStatsPanel =
3434
grafana.statPanel.new(
3535
'Gitea stats',
@@ -399,25 +399,31 @@ local addIssueLabelsOverrides(labels) =
399399
.addTemplate(
400400
{
401401
hide: 0,
402-
label: null,
402+
label: 'job',
403403
name: 'job',
404404
options: [],
405+
datasource: '$datasource',
405406
query: 'label_values(gitea_organizations, job)',
406407
refresh: 1,
407408
regex: '',
408409
type: 'query',
410+
multi: true,
411+
allValue: '.+'
409412
},
410413
)
411414
.addTemplate(
412415
{
413416
hide: 0,
414-
label: null,
417+
label: 'instance',
415418
name: 'instance',
416419
options: [],
420+
datasource: '$datasource',
417421
query: 'label_values(gitea_organizations{job="$job"}, instance)',
418422
refresh: 1,
419423
regex: '',
420424
type: 'query',
425+
multi: true,
426+
allValue: '.+'
421427
},
422428
)
423429
.addTemplate(

docs/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ params:
1818
description: Git with a cup of tea
1919
author: The Gitea Authors
2020
website: https://docs.gitea.io
21-
version: 1.18.0
21+
version: 1.18.1
2222
minGoVersion: 1.18
2323
goVersion: 1.19
2424
minNodeVersion: 16

docs/content/doc/developers/oauth2-provider.en-us.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,41 @@ To use the Authorization Code Grant as a third party application it is required
4242

4343
## Scopes
4444

45-
Currently Gitea does not support scopes (see [#4300](https://github.com/go-gitea/gitea/issues/4300)) and all third party applications will be granted access to all resources of the user and their organizations.
45+
Gitea supports the following scopes for tokens:
46+
47+
| Name | Description |
48+
| ---- | ----------- |
49+
| **(no scope)** | Grants read-only access to public user profile and public repositories. |
50+
| **repo** | Full control over all repositories. |
51+
|     **repo:status** | Grants read/write access to commit status in all repositories. |
52+
|     **public_repo** | Grants read/write access to public repositories only. |
53+
| **admin:repo_hook** | Grants access to repository hooks of all repositories. This is included in the `repo` scope. |
54+
|     **write:repo_hook** | Grants read/write access to repository hooks |
55+
|     **read:repo_hook** | Grants read-only access to repository hooks |
56+
| **admin:org** | Grants full access to organization settings |
57+
|     **write:org** | Grants read/write access to organization settings |
58+
|     **read:org** | Grants read-only access to organization settings |
59+
| **admin:public_key** | Grants full access for managing public keys |
60+
|     **write:public_key** | Grant read/write access to public keys |
61+
|     **read:public_key** | Grant read-only access to public keys |
62+
| **admin:org_hook** | Grants full access to organizational-level hooks |
63+
| **notification** | Grants full access to notifications |
64+
| **user** | Grants full access to user profile info |
65+
|     **read:user** | Grants read access to user's profile |
66+
|     **user:email** | Grants read access to user's email addresses |
67+
|     **user:follow** | Grants access to follow/un-follow a user |
68+
| **delete_repo** | Grants access to delete repositories as an admin |
69+
| **package** | Grants full access to hosted packages |
70+
|     **write:package** | Grants read/write access to packages |
71+
|     **read:package** | Grants read access to packages |
72+
|     **delete:package** | Grants delete access to packages |
73+
| **admin:gpg_key** | Grants full access for managing GPG keys |
74+
|     **write:gpg_key** | Grants read/write access to GPG keys |
75+
|     **read:gpg_key** | Grants read-only access to GPG keys |
76+
| **admin:application** | Grants full access to manage applications |
77+
|     **write:application** | Grants read/write access for managing applications |
78+
|     **read:application** | Grants read access for managing applications |
79+
| **sudo** | Allows to perform actions as the site admin. |
4680

4781
## Client types
4882

docs/content/doc/help/faq.en-us.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ For more information, refer to Gitea's [API docs]({{< relref "doc/developers/api
138138

139139
You can see the latest API (for example) on <https://try.gitea.io/api/swagger>.
140140

141+
You can also see an example of the `swagger.json` file at <https://try.gitea.io/swagger.v1.json>.
142+
141143
## Adjusting your server for public/private use
142144

143145
### Preventing spammers

main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import (
1717
"code.gitea.io/gitea/modules/setting"
1818

1919
// register supported doc types
20+
_ "code.gitea.io/gitea/modules/markup/asciicast"
2021
_ "code.gitea.io/gitea/modules/markup/console"
2122
_ "code.gitea.io/gitea/modules/markup/csv"
2223
_ "code.gitea.io/gitea/modules/markup/markdown"

models/auth/token.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ type AccessToken struct {
6565
TokenHash string `xorm:"UNIQUE"` // sha256 of token
6666
TokenSalt string
6767
TokenLastEight string `xorm:"INDEX token_last_eight"`
68+
Scope AccessTokenScope
6869

6970
CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
7071
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`

0 commit comments

Comments
 (0)