Skip to content

Commit 7777c6c

Browse files
Zettat1234kProgrammer
authored andcommittedAug 20, 2024
[skip ci] Updated translations via Crowdin (+7 squashed commit)
Squashed commit: [e1468e2] Fixes for unreachable project issues when transfer repository from organization (go-gitea#31770) dfhgfdhfghfg When transferring repositories that have issues linked to a project board to another organization, the issues remain associated with the original project board. This causes the columns in the project board to become bugged, making it difficult to move other issues in or out of the affected columns. As a solution, I removed the issue relations since the other organization does not have this project table. Fix for go-gitea#31538 Co-authored-by: Jason Song <i@wolfogre.com> [c39643f] fghfghf [38a09ea] render plain text file if the LFS object doesn't exist (go-gitea#31812)gfgdfg We had an issue where a repo was using LFS to store a file, but the user did not push the file. When trying to view the file, Gitea returned a 500 HTTP status code referencing `ErrLFSObjectNotExist`. It appears the intent was the render this file as plain text, but the conditional was flipped. I've also added a test to verify that the file is rendered as plain text. [2477511] Add spacing to global error message (go-gitea#31826) Fixes go-gitea#31717. Include Typescript files in Tailwind config so they can be pre-processed. ![Screenshot from 2024-08-13 08-44-33](https://github.com/user-attachments/assets/196d7801-e299-4000-8b39-cd9f89917f17) [5bcab0b] [skip ci] Updated translations via Crowdin [fe7c941] Scroll images in project issues separately from the remaining issue (go-gitea#31683) As discussed in go-gitea#31667 & go-gitea#26561, when a card on a Project contains images, they can overflow the card on its containing column. This aims to fix this issue via snapping scrollbars. --- Issue go-gitea#31667 is open to discussion as there should be room for improvement. [8883d99] Support issue template assignees (go-gitea#31083) Resolve go-gitea#13955
1 parent 0470646 commit 7777c6c

Some content is hidden

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

42 files changed

+334
-112
lines changed
 

‎New Text Document.txt

Whitespace-only changes.

‎models/asymkey/ssh_key.go

+7-16
Original file line numberDiff line numberDiff line change
@@ -229,35 +229,26 @@ func UpdatePublicKeyUpdated(ctx context.Context, id int64) error {
229229

230230
// PublicKeysAreExternallyManaged returns whether the provided KeyID represents an externally managed Key
231231
func PublicKeysAreExternallyManaged(ctx context.Context, keys []*PublicKey) ([]bool, error) {
232-
sources := make([]*auth.Source, 0, 5)
232+
sourceCache := make(map[int64]*auth.Source, len(keys))
233233
externals := make([]bool, len(keys))
234-
keyloop:
234+
235235
for i, key := range keys {
236236
if key.LoginSourceID == 0 {
237237
externals[i] = false
238-
continue keyloop
239-
}
240-
241-
var source *auth.Source
242-
243-
sourceloop:
244-
for _, s := range sources {
245-
if s.ID == key.LoginSourceID {
246-
source = s
247-
break sourceloop
248-
}
238+
continue
249239
}
250240

251-
if source == nil {
241+
source, ok := sourceCache[key.LoginSourceID]
242+
if !ok {
252243
var err error
253244
source, err = auth.GetSourceByID(ctx, key.LoginSourceID)
254245
if err != nil {
255246
if auth.IsErrSourceNotExist(err) {
256247
externals[i] = false
257-
sources[i] = &auth.Source{
248+
sourceCache[key.LoginSourceID] = &auth.Source{
258249
ID: key.LoginSourceID,
259250
}
260-
continue keyloop
251+
continue
261252
}
262253
return nil, err
263254
}

0 commit comments

Comments
 (0)