Skip to content

WIP: Changes and omissions for supporting upstream version v1.24.0 #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: ci
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions patches/0001-BLENDER-Blender-ID-goth-provider.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From e9a48aadbffbb3002311cc6e947053030ee9ecc5 Mon Sep 17 00:00:00 2001
From 2a38c0ff763476a3bfbabe2a9b0431a13bde947e Mon Sep 17 00:00:00 2001
From: Brecht Van Lommel <brecht@blender.org>
Date: Fri, 10 May 2024 13:28:51 +0200
Subject: [PATCH 01/18] BLENDER: Blender ID goth provider
Subject: [PATCH 01/17] BLENDER: Blender ID goth provider

Provider authored by Matti Ranta and Arnd Marijnissen.
---
Expand All @@ -25,22 +25,22 @@ Provider authored by Matti Ranta and Arnd Marijnissen.
create mode 100644 services/auth/source/oauth2/blenderid/session_test.go

diff --git a/go.mod b/go.mod
index 1ca481e073..086701b536 100644
index f6d079dbbb..683ce90aa8 100644
--- a/go.mod
+++ b/go.mod
@@ -257,6 +257,7 @@ require (
github.com/mmcloughlin/avo v0.6.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
+ github.com/mozillazg/go-unidecode v0.2.0 // indirect
github.com/mrjones/oauth v0.0.0-20190623134757-126b35219450 // indirect
github.com/mschoch/smat v0.2.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
diff --git a/go.sum b/go.sum
index ebf40cb628..aed57d8836 100644
index 9b200cc2d9..2bc60270c1 100644
--- a/go.sum
+++ b/go.sum
@@ -589,6 +589,9 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w
@@ -590,6 +590,9 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
From 928a045c583cc4f0c631925e848a81446728f52b Mon Sep 17 00:00:00 2001
From f7e10e1b5bf2cb41fa9423ddfff56ab11431a102 Mon Sep 17 00:00:00 2001
From: Brecht Van Lommel <brecht@blender.org>
Date: Fri, 10 May 2024 13:31:35 +0200
Subject: [PATCH 02/18] BLENDER: Show warning for target branch switching
Subject: [PATCH 02/17] BLENDER: Show warning for target branch switching

---
templates/repo/issue/view_title.tmpl | 1 +
1 file changed, 1 insertion(+)

diff --git a/templates/repo/issue/view_title.tmpl b/templates/repo/issue/view_title.tmpl
index 7bb00ff9a9..19a4331883 100644
index b8f28dfd9b..27be7ed334 100644
--- a/templates/repo/issue/view_title.tmpl
+++ b/templates/repo/issue/view_title.tmpl
@@ -118,6 +118,7 @@
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From e19c11cbfe0e7f278aae17cd512560cfc237c00d Mon Sep 17 00:00:00 2001
From 8d9d04e240a0c42a20c5d96c4f20d15e620f966c Mon Sep 17 00:00:00 2001
From: Brecht Van Lommel <brecht@blender.org>
Date: Fri, 10 May 2024 13:32:53 +0200
Subject: [PATCH 03/18] BLENDER: Workaround LFS files not being available in
Subject: [PATCH 03/17] BLENDER: Workaround LFS files not being available in
pull requests

Patch taken from issue number 17715, associating the LFS pointer when the
Expand All @@ -25,10 +25,10 @@ index bb6361050a..83a2e7883d 100644
return count > 0, err
}
diff --git a/services/lfs/server.go b/services/lfs/server.go
index c4866edaab..1fa2b7a67f 100644
index 0a99287ed9..40456cbbbb 100644
--- a/services/lfs/server.go
+++ b/services/lfs/server.go
@@ -253,6 +253,26 @@ func BatchHandler(ctx *context.Context) {
@@ -254,6 +254,26 @@ func BatchHandler(ctx *context.Context) {
responseObject = buildObjectResponse(rc, p, false, !exists, err)
} else {
var err *lfs_module.ObjectError
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From a0a9521bb42deea2ca46a65f64ddc95a5db795f3 Mon Sep 17 00:00:00 2001
From 7893019d4203913b0e75b0e4debc599054969125 Mon Sep 17 00:00:00 2001
From: Brecht Van Lommel <brecht@blender.org>
Date: Fri, 10 May 2024 13:33:32 +0200
Subject: [PATCH 04/18] BLENDER: Don't allow assigning large teams as reviewers
Subject: [PATCH 04/17] BLENDER: Don't allow assigning large teams as reviewers

To avoid accidentally spamming hundreds of people.
---
Expand All @@ -11,10 +11,10 @@ To avoid accidentally spamming hundreds of people.
3 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/models/organization/team.go b/models/organization/team.go
index fb7f0c0493..be56a0428e 100644
index 7f3a9b3829..f0717faf2e 100644
--- a/models/organization/team.go
+++ b/models/organization/team.go
@@ -272,3 +272,19 @@ func IncrTeamRepoNum(ctx context.Context, teamID int64) error {
@@ -247,3 +247,19 @@ func IncrTeamRepoNum(ctx context.Context, teamID int64) error {
_, err := db.GetEngine(ctx).Incr("num_repos").ID(teamID).Update(new(Team))
return err
}
Expand All @@ -35,10 +35,10 @@ index fb7f0c0493..be56a0428e 100644
+ return smallTeams, nil
+}
diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go
index 5397411b59..abf7f457e9 100644
index a4747964c6..97086a363b 100644
--- a/routers/web/repo/issue.go
+++ b/routers/web/repo/issue.go
@@ -661,13 +661,13 @@ func handleMentionableAssigneesAndTeams(ctx *context.Context, assignees []*user_
@@ -673,13 +673,13 @@ func handleMentionableAssigneesAndTeams(ctx *context.Context, assignees []*user_
}

if isAdmin {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 21206ca6201d4b510cffc0068aabd785f5864850 Mon Sep 17 00:00:00 2001
From a6b1b4b3516ec833c4ebf737b60ab8ff45562921 Mon Sep 17 00:00:00 2001
From: Brecht Van Lommel <brecht@blender.org>
Date: Fri, 10 May 2024 13:58:05 +0200
Subject: [PATCH 05/18] BLENDER: Support both exclusive and non-exclusive scope
Subject: [PATCH 05/17] BLENDER: Support both exclusive and non-exclusive scope
for labels

---
Expand All @@ -13,10 +13,10 @@ Subject: [PATCH 05/18] BLENDER: Support both exclusive and non-exclusive scope
5 files changed, 29 insertions(+), 22 deletions(-)

diff --git a/models/issues/label.go b/models/issues/label.go
index b9d24bbe99..6eb8a888e9 100644
index cfbe100926..cb7726aa71 100644
--- a/models/issues/label.go
+++ b/models/issues/label.go
@@ -183,11 +183,8 @@ func (l *Label) BelongsToRepo() bool {
@@ -184,11 +184,8 @@ func (l *Label) BelongsToRepo() bool {
return l.RepoID > 0
}

Expand All @@ -30,7 +30,7 @@ index b9d24bbe99..6eb8a888e9 100644
lastIndex := strings.LastIndex(l.Name, "/")
if lastIndex == -1 || lastIndex == 0 || lastIndex == len(l.Name)-1 {
return ""
@@ -195,6 +192,14 @@ func (l *Label) ExclusiveScope() string {
@@ -196,6 +193,14 @@ func (l *Label) ExclusiveScope() string {
return l.Name[:lastIndex]
}

Expand All @@ -46,10 +46,10 @@ index b9d24bbe99..6eb8a888e9 100644
func NewLabel(ctx context.Context, l *Label) error {
color, err := label.NormalizeColor(l.Color)
diff --git a/modules/templates/util_render.go b/modules/templates/util_render.go
index 1800747f48..ee1b231f2b 100644
index 8d9ba1000c..53a16944af 100644
--- a/modules/templates/util_render.go
+++ b/modules/templates/util_render.go
@@ -126,7 +126,7 @@ func (ut *RenderUtils) RenderLabel(label *issues_model.Label) template.HTML {
@@ -127,7 +127,7 @@ func (ut *RenderUtils) RenderLabel(label *issues_model.Label) template.HTML {
locale := ut.ctx.Value(translation.ContextKey).(translation.Locale)
var extraCSSClasses string
textColor := util.ContrastColor(label.Color)
Expand Down Expand Up @@ -84,7 +84,7 @@ index 8e2410393d..0d196d1f87 100644
</div>
{{end}}
diff --git a/templates/repo/issue/filter_item_label.tmpl b/templates/repo/issue/filter_item_label.tmpl
index 88e2e43120..ee569b4fd0 100644
index 0883d93804..11a3ddcc6f 100644
--- a/templates/repo/issue/filter_item_label.tmpl
+++ b/templates/repo/issue/filter_item_label.tmpl
@@ -26,19 +26,19 @@
Expand Down Expand Up @@ -113,12 +113,12 @@ index 88e2e43120..ee569b4fd0 100644
{{ctx.RenderUtils.RenderLabel .}}
<p class="tw-ml-auto">{{template "repo/issue/labels/label_archived" .}}</p>
diff --git a/templates/repo/issue/sidebar/label_list.tmpl b/templates/repo/issue/sidebar/label_list.tmpl
index 9b6195a8f4..c8310203c4 100644
index ed514f6725..2b3255371a 100644
--- a/templates/repo/issue/sidebar/label_list.tmpl
+++ b/templates/repo/issue/sidebar/label_list.tmpl
@@ -19,23 +19,25 @@
<div class="scrolling menu">
<a class="item clear-selection" href="#">{{ctx.Locale.Tr "repo.issues.new.clear_labels"}}</a>
<a class="item clear-selection" data-text="" href="#">{{ctx.Locale.Tr "repo.issues.new.clear_labels"}}</a>
<div class="divider"></div>
- {{$previousExclusiveScope := "_no_scope"}}
+ {{$previousScope := "_no_scope"}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
From dc145e6f21466387dde81ce41664c4100ee271bb Mon Sep 17 00:00:00 2001
From d424d073fb21437c7ab2b47716e52ccca1af1ef4 Mon Sep 17 00:00:00 2001
From: Brecht Van Lommel <brecht@blender.org>
Date: Fri, 10 May 2024 14:00:36 +0200
Subject: [PATCH 06/18] BLENDER: Projects: button to show/hide issue details
Subject: [PATCH 06/17] BLENDER: Projects: button to show/hide issue details
and closed issue

Both are off by default. This is implemented fully on the frontend, so
all issues and their details are still always loaded.
---
templates/projects/view.tmpl | 43 ++++++++++++++++++++++++++++++-
templates/repo/issue/card.tmpl | 25 ++++++++++--------
web_src/css/features/projects.css | 2 +-
web_src/css/features/projects.css | 8 ++++++
web_src/css/repo/issue-card.css | 2 ++
4 files changed, 59 insertions(+), 13 deletions(-)
4 files changed, 66 insertions(+), 12 deletions(-)

diff --git a/templates/projects/view.tmpl b/templates/projects/view.tmpl
index 217ffe6355..9640deee94 100644
index 7e89db0005..413f306585 100644
--- a/templates/projects/view.tmpl
+++ b/templates/projects/view.tmpl
@@ -19,6 +19,16 @@
"TextNegativeOne" (ctx.Locale.Tr "repo.issues.filter_assginee_no_assignee")
}}
</div>
@@ -17,6 +17,16 @@
"TextFilterMatchAny" (ctx.Locale.Tr "repo.issues.filter_assignee_any_assignee")
}}
</div>
+ <div class="ui compact mini menu" style="margin-left: auto; margin-right: 1em;">
+ <button class="item btn" onclick="clickDetailsView()">
+ <span class="issue-card-details">Show Details</span>
Expand All @@ -33,8 +33,8 @@ index 217ffe6355..9640deee94 100644
+ </div>
{{if $canWriteProject}}
<div class="ui compact mini menu">
<a class="item" href="{{.Link}}/edit?redirect=project">
@@ -168,7 +178,7 @@
<a class="item screen-full">
@@ -112,7 +122,7 @@
<div class="divider"{{if .Color}} style="color: {{ContrastColor .Color}} !important"{{end}}></div>
<div class="ui cards" data-url="{{$.Link}}/{{.ID}}" data-project="{{$.Project.ID}}" data-board="{{.ID}}" id="board_{{.ID}}">
{{range (index $.IssuesMap .ID)}}
Expand All @@ -43,7 +43,7 @@ index 217ffe6355..9640deee94 100644
{{template "repo/issue/card" (dict "Issue" . "Page" $)}}
</div>
{{end}}
@@ -178,6 +188,37 @@
@@ -122,6 +132,37 @@
</div>
</div>

Expand Down Expand Up @@ -78,11 +78,11 @@ index 217ffe6355..9640deee94 100644
+ }
+</script>
+
{{if .CanWriteProjects}}
<div class="ui g-modal-confirm delete modal">
<div class="header">
{{if $canWriteProject}}
<div class="ui small modal" id="project-column-modal-edit">
<div class="header">edit</div>
diff --git a/templates/repo/issue/card.tmpl b/templates/repo/issue/card.tmpl
index 2e19e86d7a..e27cf1cbb7 100644
index 41fe6cea8f..99d77f4adf 100644
--- a/templates/repo/issue/card.tmpl
+++ b/templates/repo/issue/card.tmpl
@@ -10,6 +10,14 @@
Expand Down Expand Up @@ -124,7 +124,7 @@ index 2e19e86d7a..e27cf1cbb7 100644
{{range index $.Page.LinkedPRs .ID}}
- <div class="meta tw-my-1">
+ <div class="meta tw-my-1 issue-card-details tw-hidden">
<a href="{{$.Issue.Repo.Link}}/pulls/{{.Index}}">
<a href="{{.Repo.Link}}/pulls/{{.Index}}">
<span class="tw-m-0 text {{if .PullRequest.HasMerged}}purple{{else if .IsClosed}}red{{else}}green{{end}}">{{svg "octicon-git-merge" 16 "tw-mr-1 tw-align-middle"}}</span>
<span class="tw-align-middle">{{.Title}} <span class="text light grey">#{{.Index}}</span></span>
@@ -54,25 +62,20 @@
Expand Down Expand Up @@ -157,18 +157,24 @@ index 2e19e86d7a..e27cf1cbb7 100644
{{end}}
{{end}}
diff --git a/web_src/css/features/projects.css b/web_src/css/features/projects.css
index ef3b036217..ca5057118f 100644
index 1d09e9c7ea..b6bd1d250d 100644
--- a/web_src/css/features/projects.css
+++ b/web_src/css/features/projects.css
@@ -16,7 +16,7 @@
padding: 0.5rem !important;
width: 320px;
height: initial;
- min-height: max(calc(100vh - 400px), 300px);
@@ -19,6 +19,14 @@
}

.project-column {
+ background-color: var(--color-project-column-bg) !important;
+ border: 1px solid var(--color-secondary) !important;
+ border-radius: var(--border-radius);
+ margin: 0 0.5rem !important;
+ padding: 0.5rem !important;
+ width: 320px;
+ height: initial;
+ min-height: max(calc(100vh - 225px), 300px);
flex: 0 0 auto;
overflow: visible;
display: flex;
flex-direction: column;
diff --git a/web_src/css/repo/issue-card.css b/web_src/css/repo/issue-card.css
index fb832bd05a..4fb9b42f46 100644
--- a/web_src/css/repo/issue-card.css
Expand Down
Loading