Skip to content

Commit da129b0

Browse files
authored
Merge branch 'main' into fix-delete-button
2 parents 4a1bb13 + c050826 commit da129b0

File tree

16 files changed

+96
-82
lines changed

16 files changed

+96
-82
lines changed

SECURITY.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ Please **DO NOT** file a public issue, instead send your report privately to `se
1414

1515
Due to the sensitive nature of security information, you can use the below GPG public key to encrypt your mail body.
1616

17-
The PGP key is valid until July 9, 2025.
17+
The PGP key is valid until July 4, 2026.
1818

1919
```
2020
Key ID: 6FCD2D5B
2121
Key Type: RSA
22-
Expires: 7/9/2025
22+
Expires: 7/4/2026
2323
Key Size: 4096/4096
2424
Fingerprint: 3DE0 3D1E 144A 7F06 9359 99DC AAFD 2381 6FCD 2D5B
2525
```
@@ -42,18 +42,18 @@ lzpAjnN9/KLtQroutrm+Ft0mdjDiJUeFVl1cOHDhoyfCsQh62HumoyZoZvqzQd6e
4242
AbN11nq6aViMe2Q3je1AbiBnRnQSHxt1Tc8X4IshO3MQK1Sk7oPI6LA5oQARAQAB
4343
tCJHaXRlYSBTZWN1cml0eSA8c2VjdXJpdHlAZ2l0ZWEuaW8+iQJXBBMBCABBAhsD
4444
BQsJCAcCAiICBhUKCQgLAgQWAgMBAh4HAheAFiEEPeA9HhRKfwaTWZncqv0jgW/N
45-
LVsFAmaMse0FCQW4fW8ACgkQqv0jgW/NLVtXLg/+PF4G9Jhlui15BTNlEBJAV2P/
46-
1QlAV2krk0fP7tykn0FR9RfGIfVV/kwC1f+ouosYPQDDevl9LWdUIM+g94DtNo2o
47-
7ACpcL3morvt5lVGpIZHL8TbX0qmFRXL/pB/cB+K6IwYvh2mrbp2zH+r4SCRyFYq
48-
BjgXYFTI1MylJ1ShAjU6Z+m3oJ+2xs5LzHS0X6zkTjzA2Zl4zQzciQ9T+wJcE7Zi
49-
HXdM1+YMF8KGNP8J9Rpug5oNDJ98lgZirRY7c3A/1xmYBiPnULwuuymdqEZO7l70
50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/LXDTw2OAiSIQlP5
78+
sYA4sFYLQ30OAkgJcmdp/pSgVj/erNtSN07ClrOpDb/uFpQymO6K2h0Pst3feNVK
79+
9M2VbqL9C51z/wyHLg==
80+
=SfZA
8181
-----END PGP PUBLIC KEY BLOCK-----
8282
8383
```

modules/web/router_path.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ func (g *RouterPathGroup) ServeHTTP(resp http.ResponseWriter, req *http.Request)
2626
path := chiCtx.URLParam(g.pathParam)
2727
for _, m := range g.matchers {
2828
if m.matchPath(chiCtx, path) {
29+
chiCtx.RoutePatterns = append(chiCtx.RoutePatterns, m.pattern)
2930
handler := m.handlerFunc
3031
for i := len(m.middlewares) - 1; i >= 0; i-- {
3132
handler = m.middlewares[i](handler).ServeHTTP
@@ -38,6 +39,7 @@ func (g *RouterPathGroup) ServeHTTP(resp http.ResponseWriter, req *http.Request)
3839
}
3940

4041
type RouterPathGroupPattern struct {
42+
pattern string
4143
re *regexp.Regexp
4244
params []routerPathParam
4345
middlewares []any
@@ -62,6 +64,7 @@ type routerPathParam struct {
6264

6365
type routerPathMatcher struct {
6466
methods container.Set[string]
67+
pattern string
6568
re *regexp.Regexp
6669
params []routerPathParam
6770
middlewares []func(http.Handler) http.Handler
@@ -117,7 +120,7 @@ func newRouterPathMatcher(methods string, patternRegexp *RouterPathGroupPattern,
117120
}
118121
p.methods.Add(method)
119122
}
120-
p.re, p.params = patternRegexp.re, patternRegexp.params
123+
p.pattern, p.re, p.params = patternRegexp.pattern, patternRegexp.re, patternRegexp.params
121124
return p
122125
}
123126

@@ -157,7 +160,7 @@ func patternRegexp(pattern string, h ...any) *RouterPathGroupPattern {
157160
p.params = append(p.params, param)
158161
}
159162
re = append(re, '$')
160-
p.re = regexp.MustCompile(string(re))
163+
p.pattern, p.re = pattern, regexp.MustCompile(string(re))
161164
return p
162165
}
163166

modules/web/router_test.go

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,20 @@ func TestRouter(t *testing.T) {
5656
recorder.Body = buff
5757

5858
type resultStruct struct {
59-
method string
60-
pathParams map[string]string
61-
handlerMarks []string
59+
method string
60+
pathParams map[string]string
61+
handlerMarks []string
62+
chiRoutePattern *string
6263
}
6364

6465
var res resultStruct
6566
h := func(optMark ...string) func(resp http.ResponseWriter, req *http.Request) {
6667
mark := util.OptionalArg(optMark, "")
6768
return func(resp http.ResponseWriter, req *http.Request) {
69+
chiCtx := chi.RouteContext(req.Context())
6870
res.method = req.Method
69-
res.pathParams = chiURLParamsToMap(chi.RouteContext(req.Context()))
71+
res.pathParams = chiURLParamsToMap(chiCtx)
72+
res.chiRoutePattern = util.ToPointer(chiCtx.RoutePattern())
7073
if mark != "" {
7174
res.handlerMarks = append(res.handlerMarks, mark)
7275
}
@@ -125,21 +128,29 @@ func TestRouter(t *testing.T) {
125128
req, err := http.NewRequest(methodPathFields[0], methodPathFields[1], nil)
126129
assert.NoError(t, err)
127130
r.ServeHTTP(recorder, req)
131+
if expected.chiRoutePattern == nil {
132+
res.chiRoutePattern = nil
133+
}
128134
assert.Equal(t, expected, res)
129135
})
130136
}
131137

132138
t.Run("RootRouter", func(t *testing.T) {
133-
testRoute(t, "GET /the-user/the-repo/other", resultStruct{method: "GET", handlerMarks: []string{"not-found:/"}})
139+
testRoute(t, "GET /the-user/the-repo/other", resultStruct{
140+
method: "GET",
141+
handlerMarks: []string{"not-found:/"},
142+
chiRoutePattern: util.ToPointer(""),
143+
})
134144
testRoute(t, "GET /the-user/the-repo/pulls", resultStruct{
135145
method: "GET",
136146
pathParams: map[string]string{"username": "the-user", "reponame": "the-repo", "type": "pulls"},
137147
handlerMarks: []string{"list-issues-b"},
138148
})
139149
testRoute(t, "GET /the-user/the-repo/issues/123", resultStruct{
140-
method: "GET",
141-
pathParams: map[string]string{"username": "the-user", "reponame": "the-repo", "type": "issues", "index": "123"},
142-
handlerMarks: []string{"view-issue"},
150+
method: "GET",
151+
pathParams: map[string]string{"username": "the-user", "reponame": "the-repo", "type": "issues", "index": "123"},
152+
handlerMarks: []string{"view-issue"},
153+
chiRoutePattern: util.ToPointer("/{username}/{reponame}/{type:issues|pulls}/{index}"),
143154
})
144155
testRoute(t, "GET /the-user/the-repo/issues/123?stop=hijack", resultStruct{
145156
method: "GET",
@@ -154,7 +165,10 @@ func TestRouter(t *testing.T) {
154165
})
155166

156167
t.Run("Sub Router", func(t *testing.T) {
157-
testRoute(t, "GET /api/v1/other", resultStruct{method: "GET", handlerMarks: []string{"not-found:/api/v1"}})
168+
testRoute(t, "GET /api/v1/other", resultStruct{
169+
method: "GET",
170+
handlerMarks: []string{"not-found:/api/v1"},
171+
})
158172
testRoute(t, "GET /api/v1/repos/the-user/the-repo/branches", resultStruct{
159173
method: "GET",
160174
pathParams: map[string]string{"username": "the-user", "reponame": "the-repo"},
@@ -211,9 +225,10 @@ func TestRouter(t *testing.T) {
211225
})
212226

213227
testRoute(t, "GET /api/v1/repos/the-user/the-repo/branches/d1/d2/fn?stop=s3", resultStruct{
214-
method: "GET",
215-
pathParams: map[string]string{"username": "the-user", "reponame": "the-repo", "*": "d1/d2/fn", "dir": "d1/d2", "file": "fn"},
216-
handlerMarks: []string{"s1", "s2", "s3"},
228+
method: "GET",
229+
pathParams: map[string]string{"username": "the-user", "reponame": "the-repo", "*": "d1/d2/fn", "dir": "d1/d2", "file": "fn"},
230+
handlerMarks: []string{"s1", "s2", "s3"},
231+
chiRoutePattern: util.ToPointer("/api/v1/repos/{username}/{reponame}/branches/<dir:*>/<file:[a-z]{1,2}>"),
217232
})
218233
})
219234
}

options/locale/locale_en-US.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2334,8 +2334,8 @@ settings.hooks_desc = Webhooks automatically make HTTP POST requests to a server
23342334
settings.webhook_deletion = Remove Webhook
23352335
settings.webhook_deletion_desc = Removing a webhook deletes its settings and delivery history. Continue?
23362336
settings.webhook_deletion_success = The webhook has been removed.
2337-
settings.webhook.test_delivery = Test Delivery
2338-
settings.webhook.test_delivery_desc = Test this webhook with a fake event.
2337+
settings.webhook.test_delivery = Test Push Event
2338+
settings.webhook.test_delivery_desc = Test this webhook with a fake push event.
23392339
settings.webhook.test_delivery_desc_disabled = To test this webhook with a fake event, activate it.
23402340
settings.webhook.request = Request
23412341
settings.webhook.response = Response

routers/api/packages/conda/conda.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func ListOrGetPackages(ctx *context.Context) {
5151
DownloadPackageFile(ctx)
5252
return
5353
}
54-
ctx.NotFound(nil)
54+
http.NotFound(ctx.Resp, ctx.Req)
5555
}
5656

5757
func EnumeratePackages(ctx *context.Context) {

templates/devtest/flex-list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
<a class="text primary" href="{{$.Link}}">
6969
gitea-org / gitea
7070
</a>
71-
<span data-tooltip-content="{{ctx.Locale.Tr "repo.fork"}}">{{svg "octicon-repo-forked"}}</span>
71+
<span class="flex-text-inline" data-tooltip-content="{{ctx.Locale.Tr "repo.fork"}}">{{svg "octicon-repo-forked"}}</span>
7272
</div>
7373
<div class="flex-item-trailing">
7474
<a class="muted" href="{{$.Link}}">

templates/repo/settings/webhook/history.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
{{else}}
2727
<span class="text red">{{svg "octicon-alert"}}</span>
2828
{{end}}
29-
<a class="ui primary sha label toggle button show-panel" data-panel="#info-{{.ID}}">{{.UUID}}</a>
29+
<button class="btn interact-bg tw-p-2 toggle show-panel" data-panel="#info-{{.ID}}">{{.UUID}}</button>
3030
</div>
3131
<span class="text grey">
3232
{{DateUtils.TimeSince .Delivered}}

templates/shared/issuelist.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
</div>
3636
{{end}}
3737
</div>
38-
<div class="flex-item-body tw-mt-1">
38+
<div class="flex-item-body">
3939
<a class="index" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
4040
{{if eq $.listType "dashboard"}}
4141
{{.Repo.FullName}}#{{.Index}}

web_src/css/shared/flex-list.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
.flex-item .flex-item-main {
1818
display: flex;
1919
flex-direction: column;
20+
gap: 0.25em;
2021
flex-grow: 1;
2122
flex-basis: 60%; /* avoid wrapping the "flex-item-trailing" too aggressively */
2223
min-width: 0; /* make the "text truncate" work, otherwise the flex axis is not limited and the text just overflows */

web_src/js/components/DiffCommitSelector.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import {defineComponent} from 'vue';
33
import {SvgIcon} from '../svg.ts';
44
import {GET} from '../modules/fetch.ts';
5-
import {generateAriaId} from '../modules/fomantic/base.ts';
5+
import {generateElemId} from '../utils/dom.ts';
66
77
type Commit = {
88
id: string,
@@ -35,8 +35,8 @@ export default defineComponent({
3535
commits: [] as Array<Commit>,
3636
hoverActivated: false,
3737
lastReviewCommitSha: '',
38-
uniqueIdMenu: generateAriaId(),
39-
uniqueIdShowAll: generateAriaId(),
38+
uniqueIdMenu: generateElemId('diff-commit-selector-menu-'),
39+
uniqueIdShowAll: generateElemId('diff-commit-selector-show-all-'),
4040
};
4141
},
4242
computed: {

0 commit comments

Comments
 (0)