Skip to content

Commit 6a0e8a0

Browse files
authored
Merge branch 'main' into fix_push_message_behavior
2 parents 0646fc1 + cfc6e21 commit 6a0e8a0

File tree

12 files changed

+595
-471
lines changed

12 files changed

+595
-471
lines changed

.eslintrc.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ module.exports = {
403403
'github/a11y-svg-has-accessible-name': [0],
404404
'github/array-foreach': [0],
405405
'github/async-currenttarget': [2],
406-
'github/async-preventdefault': [2],
406+
'github/async-preventdefault': [0], // https://github.com/github/eslint-plugin-github/issues/599
407407
'github/authenticity-token': [0],
408408
'github/get-attribute': [0],
409409
'github/js-class-name': [0],

options/locale/locale_en-US.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,16 +1685,16 @@ issues.timetracker_timer_manually_add = Add Time
16851685
16861686
issues.time_estimate_set = Set estimated time
16871687
issues.time_estimate_display = Estimate: %s
1688-
issues.change_time_estimate_at = changed time estimate to <b>%s</b> %s
1688+
issues.change_time_estimate_at = changed time estimate to <b>%[1]s</b> %[2]s
16891689
issues.remove_time_estimate_at = removed time estimate %s
16901690
issues.time_estimate_invalid = Time estimate format is invalid
16911691
issues.start_tracking_history = started working %s
16921692
issues.tracker_auto_close = Timer will be stopped automatically when this issue gets closed
16931693
issues.tracking_already_started = `You have already started time tracking on <a href="%s">another issue</a>!`
1694-
issues.stop_tracking_history = worked for <b>%s</b> %s
1694+
issues.stop_tracking_history = worked for <b>%[1]s</b> %[2]s
16951695
issues.cancel_tracking_history = `canceled time tracking %s`
16961696
issues.del_time = Delete this time log
1697-
issues.add_time_history = added spent time <b>%s</b> %s
1697+
issues.add_time_history = added spent time <b>%[1]s</b> %[2]s
16981698
issues.del_time_history= `deleted spent time %s`
16991699
issues.add_time_manually = Manually Add Time
17001700
issues.add_time_hours = Hours

package-lock.json

Lines changed: 508 additions & 400 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55
},
66
"dependencies": {
77
"@citation-js/core": "0.7.14",
8-
"@citation-js/plugin-bibtex": "0.7.16",
8+
"@citation-js/plugin-bibtex": "0.7.17",
99
"@citation-js/plugin-csl": "0.7.14",
1010
"@citation-js/plugin-software-formats": "0.6.1",
1111
"@github/markdown-toolbar-element": "2.2.3",
12-
"@github/relative-time-element": "4.4.4",
12+
"@github/relative-time-element": "4.4.5",
1313
"@github/text-expander-element": "2.8.0",
1414
"@mcaptcha/vanilla-glue": "0.1.0-alpha-3",
1515
"@primer/octicons": "19.14.0",
1616
"@silverwind/vue3-calendar-heatmap": "2.0.6",
1717
"add-asset-webpack-plugin": "3.0.0",
1818
"ansi_up": "6.0.2",
19-
"asciinema-player": "3.8.1",
19+
"asciinema-player": "3.8.2",
2020
"chart.js": "4.4.7",
2121
"chartjs-adapter-dayjs-4": "1.0.4",
2222
"chartjs-plugin-zoom": "2.2.0",
@@ -28,11 +28,11 @@
2828
"easymde": "2.18.0",
2929
"esbuild-loader": "4.2.2",
3030
"escape-goat": "4.0.0",
31-
"fast-glob": "3.3.2",
31+
"fast-glob": "3.3.3",
3232
"htmx.org": "2.0.4",
33-
"idiomorph": "0.3.0",
33+
"idiomorph": "0.4.0",
3434
"jquery": "3.7.1",
35-
"katex": "0.16.18",
35+
"katex": "0.16.20",
3636
"license-checker-webpack-plugin": "0.2.1",
3737
"mermaid": "11.4.1",
3838
"mini-css-extract-plugin": "2.9.2",
@@ -41,7 +41,7 @@
4141
"monaco-editor-webpack-plugin": "7.1.0",
4242
"pdfobject": "2.3.0",
4343
"perfect-debounce": "1.0.0",
44-
"postcss": "8.4.49",
44+
"postcss": "8.5.1",
4545
"postcss-loader": "8.1.1",
4646
"postcss-nesting": "13.0.1",
4747
"sortablejs": "1.15.6",
@@ -52,22 +52,22 @@
5252
"tippy.js": "6.3.7",
5353
"toastify-js": "1.12.0",
5454
"tributejs": "5.1.3",
55-
"typescript": "5.7.2",
55+
"typescript": "5.7.3",
5656
"uint8-to-base64": "0.2.0",
5757
"vanilla-colorful": "0.7.2",
5858
"vue": "3.5.13",
5959
"vue-bar-graph": "2.2.0",
6060
"vue-chartjs": "5.3.2",
6161
"vue-loader": "17.4.2",
6262
"webpack": "5.97.1",
63-
"webpack-cli": "5.1.4",
63+
"webpack-cli": "6.0.1",
6464
"wrap-ansi": "9.0.0"
6565
},
6666
"devDependencies": {
6767
"@eslint-community/eslint-plugin-eslint-comments": "4.4.1",
6868
"@playwright/test": "1.49.1",
6969
"@stoplight/spectral-cli": "6.14.2",
70-
"@stylistic/eslint-plugin-js": "2.12.1",
70+
"@stylistic/eslint-plugin-js": "2.13.0",
7171
"@stylistic/stylelint-plugin": "3.1.1",
7272
"@types/dropzone": "5.7.9",
7373
"@types/jquery": "3.5.32",
@@ -79,8 +79,8 @@
7979
"@types/throttle-debounce": "5.0.2",
8080
"@types/tinycolor2": "1.4.6",
8181
"@types/toastify-js": "1.12.3",
82-
"@typescript-eslint/eslint-plugin": "8.18.1",
83-
"@typescript-eslint/parser": "8.18.1",
82+
"@typescript-eslint/eslint-plugin": "8.20.0",
83+
"@typescript-eslint/parser": "8.20.0",
8484
"@vitejs/plugin-vue": "5.2.1",
8585
"eslint": "8.57.0",
8686
"eslint-import-resolver-typescript": "3.7.0",
@@ -98,16 +98,16 @@
9898
"eslint-plugin-vue": "9.32.0",
9999
"eslint-plugin-vue-scoped-css": "2.9.0",
100100
"eslint-plugin-wc": "2.2.0",
101-
"happy-dom": "15.11.7",
101+
"happy-dom": "16.6.0",
102102
"markdownlint-cli": "0.43.0",
103103
"nolyfill": "1.0.43",
104-
"postcss-html": "1.7.0",
105-
"stylelint": "16.12.0",
104+
"postcss-html": "1.8.0",
105+
"stylelint": "16.13.2",
106106
"stylelint-declaration-block-no-ignored-properties": "2.8.0",
107-
"stylelint-declaration-strict-value": "1.10.6",
107+
"stylelint-declaration-strict-value": "1.10.7",
108108
"stylelint-value-no-unknown-custom-properties": "6.0.1",
109109
"svgo": "3.3.2",
110-
"type-fest": "4.30.2",
110+
"type-fest": "4.32.0",
111111
"updates": "16.4.1",
112112
"vite-string-plugin": "1.3.4",
113113
"vitest": "2.1.8",

poetry.lock

Lines changed: 43 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ package-mode = false
55
python = "^3.10"
66

77
[tool.poetry.group.dev.dependencies]
8-
djlint = "1.36.3"
8+
djlint = "1.36.4"
99
yamllint = "1.35.1"
1010

1111
[tool.djlint]

routers/web/repo/branch.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ const (
3737
// Branches render repository branch page
3838
func Branches(ctx *context.Context) {
3939
ctx.Data["Title"] = "Branches"
40-
ctx.Data["IsRepoToolbarBranches"] = true
4140
ctx.Data["AllowsPulls"] = ctx.Repo.Repository.AllowsPulls(ctx)
4241
ctx.Data["IsWriter"] = ctx.Repo.CanWrite(unit.TypeCode)
4342
ctx.Data["IsMirror"] = ctx.Repo.Repository.IsMirror

routers/web/repo/commit.go

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,7 @@ func Commits(ctx *context.Context) {
6262
}
6363
ctx.Data["PageIsViewCode"] = true
6464

65-
commitsCount, err := ctx.Repo.GetCommitsCount()
66-
if err != nil {
67-
ctx.ServerError("GetCommitsCount", err)
68-
return
69-
}
65+
commitsCount := ctx.Repo.CommitsCount
7066

7167
page := ctx.FormInt("page")
7268
if page <= 1 {
@@ -129,12 +125,6 @@ func Graph(ctx *context.Context) {
129125
ctx.Data["SelectedBranches"] = realBranches
130126
files := ctx.FormStrings("file")
131127

132-
commitsCount, err := ctx.Repo.GetCommitsCount()
133-
if err != nil {
134-
ctx.ServerError("GetCommitsCount", err)
135-
return
136-
}
137-
138128
graphCommitsCount, err := ctx.Repo.GetCommitGraphsCount(ctx, hidePRRefs, realBranches, files)
139129
if err != nil {
140130
log.Warn("GetCommitGraphsCount error for generate graph exclude prs: %t branches: %s in %-v, Will Ignore branches and try again. Underlying Error: %v", hidePRRefs, branches, ctx.Repo.Repository, err)
@@ -171,7 +161,6 @@ func Graph(ctx *context.Context) {
171161

172162
ctx.Data["Username"] = ctx.Repo.Owner.Name
173163
ctx.Data["Reponame"] = ctx.Repo.Repository.Name
174-
ctx.Data["CommitCount"] = commitsCount
175164

176165
paginator := context.NewPagination(int(graphCommitsCount), setting.UI.GraphMaxCommitNum, page, 5)
177166
paginator.AddParamFromRequest(ctx.Req)

routers/web/web.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,7 +1332,7 @@ func registerRoutes(m *web.Router) {
13321332

13331333
m.Group("/{username}/{reponame}", func() { // repo tags
13341334
m.Group("/tags", func() {
1335-
m.Get("", repo.TagsList)
1335+
m.Get("", context.RepoRefByDefaultBranch() /* for the "commits" tab */, repo.TagsList)
13361336
m.Get(".rss", feedEnabled, repo.TagsListFeedRSS)
13371337
m.Get(".atom", feedEnabled, repo.TagsListFeedAtom)
13381338
m.Get("/list", repo.GetTagList)
@@ -1522,8 +1522,8 @@ func registerRoutes(m *web.Router) {
15221522

15231523
m.Group("/branches", func() {
15241524
m.Get("/list", repo.GetBranchesList)
1525-
m.Get("", repo.Branches)
1526-
}, repo.MustBeNotEmpty, context.RepoRef())
1525+
m.Get("", context.RepoRefByDefaultBranch() /* for the "commits" tab */, repo.Branches)
1526+
}, repo.MustBeNotEmpty)
15271527

15281528
m.Group("/media", func() {
15291529
m.Get("/blob/{sha}", repo.DownloadByIDOrLFS)
@@ -1567,8 +1567,10 @@ func registerRoutes(m *web.Router) {
15671567
m.Get("/graph", repo.Graph)
15681568
m.Get("/commit/{sha:([a-f0-9]{7,64})$}", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.SetWhitespaceBehavior, repo.Diff)
15691569
m.Get("/commit/{sha:([a-f0-9]{7,64})$}/load-branches-and-tags", repo.LoadBranchesAndTags)
1570-
m.Get("/cherry-pick/{sha:([a-f0-9]{7,64})$}", repo.SetEditorconfigIfExists, repo.CherryPick)
1571-
}, repo.MustBeNotEmpty, context.RepoRef())
1570+
1571+
// FIXME: this route `/cherry-pick/{sha}` doesn't seem useful or right, the new code always uses `/_cherrypick/` which could handle branch name correctly
1572+
m.Get("/cherry-pick/{sha:([a-f0-9]{7,64})$}", repo.SetEditorconfigIfExists, context.RepoRefByDefaultBranch(), repo.CherryPick)
1573+
}, repo.MustBeNotEmpty)
15721574

15731575
m.Get("/rss/branch/*", context.RepoRefByType(git.RefTypeBranch), feedEnabled, feed.RenderBranchFeed)
15741576
m.Get("/atom/branch/*", context.RepoRefByType(git.RefTypeBranch), feedEnabled, feed.RenderBranchFeed)

services/context/repo.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,18 @@ func repoRefFullName(typ git.RefType, shortName string) git.RefName {
777777
}
778778
}
779779

780+
func RepoRefByDefaultBranch() func(*Context) {
781+
return func(ctx *Context) {
782+
ctx.Repo.RefFullName = git.RefNameFromBranch(ctx.Repo.Repository.DefaultBranch)
783+
ctx.Repo.BranchName = ctx.Repo.Repository.DefaultBranch
784+
ctx.Repo.Commit, _ = ctx.Repo.GitRepo.GetBranchCommit(ctx.Repo.BranchName)
785+
ctx.Repo.CommitsCount, _ = ctx.Repo.GetCommitsCount()
786+
ctx.Data["RefFullName"] = ctx.Repo.RefFullName
787+
ctx.Data["BranchName"] = ctx.Repo.BranchName
788+
ctx.Data["CommitsCount"] = ctx.Repo.CommitsCount
789+
}
790+
}
791+
780792
// RepoRefByType handles repository reference name for a specific type
781793
// of repository reference
782794
func RepoRefByType(detectRefType git.RefType) func(*Context) {

0 commit comments

Comments
 (0)