forked from go-gitea/gitea
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main'
* upstream/main: Avoid recursing into sub-sub-sub-docs folders when looking for READMEs. (go-gitea#23695) [skip ci] Updated translations via Crowdin Use auto-updating, natively hoverable, localized time elements (go-gitea#23988) Reserve ".png" suffix for user/org names (go-gitea#23992) Allow adding SSH keys even if SSH server is disabled (go-gitea#24025) Add placeholder and aria attributes to release and wiki edit page (go-gitea#24031) Add --quiet option to gitea dump (go-gitea#22969) Remove "inverted" class on creating new label and cancel buttons (go-gitea#24030) Use actions job link as commit status URL instead of run link (go-gitea#24023) Make label templates have consistent behavior and priority (go-gitea#23749) Add actions support to package auth verification (go-gitea#23729)
- Loading branch information
Showing
71 changed files
with
393 additions
and
517 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright 2023 The Gitea Authors. All rights reserved. | ||
// SPDX-License-Identifier: MIT | ||
|
||
package repository | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestMergeCustomLabels(t *testing.T) { | ||
files := mergeCustomLabelFiles(optionFileList{ | ||
all: []string{"a", "a.yaml", "a.yml"}, | ||
custom: nil, | ||
}) | ||
assert.EqualValues(t, []string{"a.yaml"}, files, "yaml file should win") | ||
|
||
files = mergeCustomLabelFiles(optionFileList{ | ||
all: []string{"a", "a.yaml"}, | ||
custom: []string{"a"}, | ||
}) | ||
assert.EqualValues(t, []string{"a"}, files, "custom file should win") | ||
|
||
files = mergeCustomLabelFiles(optionFileList{ | ||
all: []string{"a", "a.yml", "a.yaml"}, | ||
custom: []string{"a", "a.yml"}, | ||
}) | ||
assert.EqualValues(t, []string{"a.yml"}, files, "custom yml file should win if no yaml") | ||
} |
Oops, something went wrong.