Skip to content

Commit 7f6c03b

Browse files
authored
Merge branch 'main' into fix-team-permission-when-create-or-edit
2 parents 928b430 + 29194a9 commit 7f6c03b

File tree

7 files changed

+103
-7
lines changed

7 files changed

+103
-7
lines changed

CHANGELOG.md

+90-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,96 @@ 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.19.0](https://github.com/go-gitea/gitea/releases/tag/1.19.0) - 2023-03-19
7+
## [1.19.1](https://github.com/go-gitea/gitea/releases/tag/v1.19.1) - 2023-04-12
8+
9+
* BREAKING
10+
* Rename actions unit to `repo.actions` and add docs for it (#23733) (#23881)
11+
* ENHANCEMENTS
12+
* Add card type to org/user level project on creation, edit and view (#24043) (#24066)
13+
* Refactor commit status for Actions jobs (#23786) (#24060)
14+
* Show errors for KaTeX and mermaid on the preview tab (#24009) (#24019)
15+
* Show protected branch rule names again (#23907) (#24018)
16+
* Adjust sticky PR header to cover background (#23956) (#23999)
17+
* Discolor pull request tab labels (#23950) (#23987)
18+
* Treat PRs with agit flow as fork PRs when triggering actions. (#23884) (#23967)
19+
* Left-align review comments (#23937)
20+
* Fix image border-radius (#23886) (#23930)
21+
* Scroll collapsed file into view (#23702) (#23929)
22+
* Fix code view (diff) broken layout (#23096) (#23918)
23+
* Org pages style fixes (#23901) (#23914)
24+
* Fix user profile description rendering (#23882) (#23902)
25+
* Fix review box viewport overflow issue (#23800) (#23898)
26+
* Prefill input values in OAuth settings as intended (#23829) (#23871)
27+
* CSS color tweaks (#23828) (#23842)
28+
* Fix incorrect visibility dropdown list in add/edit user page (#23804) (#23833)
29+
* Add CSS rules for basic colored labels (#23774) (#23777)
30+
* Add creation time in tag list page (#23693) (#23773)
31+
* Fix br display for packages curls (#23737) (#23764)
32+
* Fix issue due date edit toggle bug (#23723) (#23758)
33+
* Improve commit graph page UI alignment (#23751) (#23754)
34+
* Use GitHub Actions compatible globbing for `branches`, `tag`, `path` filter (#22804) (#23740)
35+
* Redirect to project again after editing it (#23326) (#23739)
36+
* Remove row clicking from notification table (#22695) (#23706)
37+
* Remove conflicting CSS rules on notifications, improve notifications table (#23565) (#23621)
38+
* Fix diff tree height and adjust target file style (#23616)
39+
* BUGFIXES
40+
* Improve error logging for LFS (#24072) (#24082)
41+
* Fix custom mailer template on Windows platform (#24081)
42+
* Update the value of `diffEnd` when clicking the `Show More` button in the DiffFileTree (#24069) (#24078)
43+
* Make label templates have consistent behavior and priority (#23749)
44+
* Fix accidental overwriting of LDAP team memberships (#24050) (#24065)
45+
* Fix branch protection priority (#24045) (#24061)
46+
* Use actions job link as commit status URL instead of run link (#24023) (#24032)
47+
* Add actions support to package auth verification (#23729) (#24028)
48+
* Fix protected branch for API (#24013) (#24027)
49+
* Do not escape space between PyPI repository URL and package name… (#23981) (#24008)
50+
* Fix redirect bug when creating issue from a project (#23971) (#23997)
51+
* Set `ref` to fully-formed of the tag when trigger event is `release` (#23944) (#23989)
52+
* Use Get/Set instead of Rename when regenerating session ID (#23975) (#23983)
53+
* Ensure RSS icon is present on all repo tabs (#23904) (#23973)
54+
* Remove `Repository.getFilesChanged` to fix Actions `paths` and `paths-ignore` filter (#23920) (#23969)
55+
* Delete deleted release attachments immediately from storage (#23913) (#23958)
56+
* Use ghost user if package creator does not exist (#23822) (#23915)
57+
* User/Org Feed render description as per web (#23887) (#23906)
58+
* Fix `cases.Title` crash for concurrency (#23885) (#23903)
59+
* Convert .Source.SkipVerify to $cfg.SkipVerify (#23839) (#23899)
60+
* Support "." char as user name for User/Orgs in RSS/ATOM/GPG/KEYS path ... (#23874) (#23878)
61+
* Fix JS error when changing PR's target branch (#23862) (#23864)
62+
* Fix 500 error if there is a name conflict when editing authentication source (#23832) (#23852)
63+
* Fix closed PR also triggers Webhooks and actions (#23782) (#23834)
64+
* Fix checks for `needs` in Actions (#23789) (#23831)
65+
* Fix "Updating branch by merge" bug in "update_branch_by_merge.tmpl" (#23790) (#23825)
66+
* Fix cancel button in the page of project edit not work (#23655) (#23813)
67+
* Don't apply the group filter when listing LDAP group membership if it is empty (#23745) (#23788)
68+
* Fix profile page email display, respect settings (#23747) (#23756)
69+
* Fix project card preview select and template select (#23684) (#23731)
70+
* Check LFS/Packages settings in dump and doctor command (#23631) (#23730)
71+
* Add git dashes separator to some "log" and "diff" commands (#23606) (#23720)
72+
* Create commit status when event is `pull_request_sync` (#23683) (#23691)
73+
* Fix incorrect `HookEventType` of pull request review comments (#23650) (#23678)
74+
* Fix incorrect `show-modal` and `show-panel` class (#23660) (#23663)
75+
* Improve workflow event triggers (#23613) (#23648)
76+
* Introduce path Clean/Join helper functions, partially backport&refactor (#23495) (#23607)
77+
* Fix pagination on `/notifications/watching` (#23564) (#23603)
78+
* Fix submodule is nil panic (#23588) (#23601)
79+
* Polyfill the window.customElements (#23592) (#23595)
80+
* Avoid too long names for actions (#23162) (#23190)
81+
* TRANSLATION
82+
* Backport locales (with manual fixes) (#23808, #23634, #24083)
83+
* BUILD
84+
* Hardcode the path to docker images (#23955) (#23968)
85+
* DOCS
86+
* Update documentation to explain which projects allow Gitea to host static pages (#23993) (#24058)
87+
* Merge `push to create`, `open PR from push`, and `push options` docs articles into one (#23744) (#23959)
88+
* Fix code blocks in the cheat sheet (#23664) (#23669)
89+
* MISC
90+
* Do not crash when parsing an invalid workflow file (#23972) (#23976)
91+
* Remove assertion debug code for show/hide refactoring (#23576) (#23868)
92+
* Add ONLY_SHOW_RELEVANT_REPOS back, fix explore page bug, make code more strict (#23766) (#23791)
93+
* Make minio package support legacy MD5 checksum (#23768) (#23770)
94+
* Improve template error reporting (#23396) (#23600)
95+
96+
## [1.19.0](https://github.com/go-gitea/gitea/releases/tag/v1.19.0) - 2023-03-19
897

998
* BREAKING
1099
* Add loading yaml label template files (#22976) (#23232)

custom/conf/app.example.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ ROUTER = console
603603
;ACCESS = file
604604
;;
605605
;; Sets the template used to create the access log.
606-
;ACCESS_LOG_TEMPLATE = {{.Ctx.RemoteAddr}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.URL.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}\" \"{{.Ctx.Req.UserAgent}}"
606+
;ACCESS_LOG_TEMPLATE = {{.Ctx.RemoteHost}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.URL.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}" "{{.Ctx.Req.UserAgent}}"
607607
;;
608608
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
609609
;;

docs/content/doc/administration/config-cheat-sheet.en-us.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ Default templates for project boards:
878878

879879
- `ENABLE_ACCESS_LOG`: **false**: Creates an access.log in NCSA common log format, or as per the following template
880880
- `ACCESS`: **file**: Logging mode for the access logger, use a comma to separate values. Configure each mode in per mode log subsections `\[log.modename.access\]`. By default the file mode will log to `$ROOT_PATH/access.log`. (If you set this to `,` it will log to the default Gitea logger.)
881-
- `ACCESS_LOG_TEMPLATE`: **`{{.Ctx.RemoteAddr}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.URL.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}\" \"{{.Ctx.Req.UserAgent}}"`**: Sets the template used to create the access log.
881+
- `ACCESS_LOG_TEMPLATE`: **`{{.Ctx.RemoteHost}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.URL.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}" "{{.Ctx.Req.UserAgent}}"`**: Sets the template used to create the access log.
882882
- The following variables are available:
883883
- `Ctx`: the `context.Context` of the request.
884884
- `Identity`: the SignedUserName or `"-"` if not logged in.

docs/content/doc/administration/config-cheat-sheet.zh-cn.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ test01.xls: application/vnd.ms-excel; charset=binary
265265
- `LEVEL`: 日志级别,默认为 `Trace`
266266
- `DISABLE_ROUTER_LOG`: 关闭日志中的路由日志。
267267
- `ENABLE_ACCESS_LOG`: 是否开启 Access Log, 默认为 false。
268-
- `ACCESS_LOG_TEMPLATE`: `access.log` 输出内容的模板,默认模板:**`{{.Ctx.RemoteAddr}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.URL.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}\" \"{{.Ctx.Req.UserAgent}}"`**
268+
- `ACCESS_LOG_TEMPLATE`: `access.log` 输出内容的模板,默认模板:**`{{.Ctx.RemoteHost}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.URL.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}" "{{.Ctx.Req.UserAgent}}"`**
269269
模板支持以下参数:
270270
- `Ctx`: 请求上下文。
271271
- `Identity`: 登录用户名,默认: “`-`”。

docs/content/doc/administration/logging-documentation.en-us.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ log using the value: `ACCESS = ,`
304304

305305
This value represent a go template. It's default value is:
306306

307-
`{{.Ctx.RemoteAddr}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.URL.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}\" \"{{.Ctx.Req.UserAgent}}"`
307+
`{{.Ctx.RemoteHost}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.URL.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}" "{{.Ctx.Req.UserAgent}}"`
308308

309309
The template is passed following options:
310310

modules/context/access_log.go

+8-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"bytes"
88
"context"
99
"fmt"
10+
"net"
1011
"net/http"
1112
"strings"
1213
"text/template"
@@ -67,17 +68,23 @@ func AccessLogger() func(http.Handler) http.Handler {
6768
requestID = parseRequestIDFromRequestHeader(req)
6869
}
6970

71+
reqHost, _, err := net.SplitHostPort(req.RemoteAddr)
72+
if err != nil {
73+
reqHost = req.RemoteAddr
74+
}
75+
7076
next.ServeHTTP(w, r)
7177
rw := w.(ResponseWriter)
7278

7379
buf := bytes.NewBuffer([]byte{})
74-
err := logTemplate.Execute(buf, routerLoggerOptions{
80+
err = logTemplate.Execute(buf, routerLoggerOptions{
7581
req: req,
7682
Identity: &identity,
7783
Start: &start,
7884
ResponseWriter: rw,
7985
Ctx: map[string]interface{}{
8086
"RemoteAddr": req.RemoteAddr,
87+
"RemoteHost": reqHost,
8188
"Req": req,
8289
},
8390
RequestID: &requestID,

modules/setting/log.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ func loadLogFrom(rootCfg ConfigProvider) {
152152
Log.EnableSSHLog = sec.Key("ENABLE_SSH_LOG").MustBool(false)
153153
Log.EnableAccessLog = sec.Key("ENABLE_ACCESS_LOG").MustBool(false)
154154
Log.AccessLogTemplate = sec.Key("ACCESS_LOG_TEMPLATE").MustString(
155-
`{{.Ctx.RemoteAddr}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.URL.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}\" \"{{.Ctx.Req.UserAgent}}"`,
155+
`{{.Ctx.RemoteHost}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.URL.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}" "{{.Ctx.Req.UserAgent}}"`,
156156
)
157157
Log.RequestIDHeaders = sec.Key("REQUEST_ID_HEADERS").Strings(",")
158158
// the `MustString` updates the default value, and `log.ACCESS` is used by `generateNamedLogger("access")` later

0 commit comments

Comments
 (0)