mirror of
https://gitea.com/gitea/tea.git
synced 2026-08-05 23:07:39 +02:00
feat(assignees): add set, add, and remove assignees APIs (#1045)
Implemented set, add, and remove assignees APIs. Closes https://gitea.com/gitea/tea/issues/965 and https://gitea.com/gitea/tea/issues/966Reviewed-on: https://gitea.com/gitea/tea/pulls/1045 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Minjie Fang <wingsallen@gmail.com>
This commit is contained in:
@@ -80,7 +80,7 @@ func TestResolveLabelNames_ReturnsRepoAndOrgLabels(t *testing.T) {
|
||||
runGit("commit", "--allow-empty", "-m", "Initial commit")
|
||||
runGit("push", "-u", "origin", "HEAD:branch-with-labels")
|
||||
|
||||
waitForBranches(t, orgRepo.FullName)
|
||||
waitForBranches(t, orgRepo.FullName, "branch-with-labels")
|
||||
_ = runTeaCommand(
|
||||
t, "pr", "create", "--repo", orgRepo.FullName,
|
||||
"--login", login.Name, "--base", "main", "--head", "branch-with-labels",
|
||||
@@ -94,7 +94,7 @@ func TestResolveLabelNames_ReturnsRepoAndOrgLabels(t *testing.T) {
|
||||
require.ElementsMatch(t, labels, []*gitea.Label{orgLabel, repoLabel})
|
||||
}
|
||||
|
||||
func waitForBranches(t *testing.T, repoFullName string) {
|
||||
func waitForBranches(t *testing.T, repoFullName string, branchName string) {
|
||||
t.Helper()
|
||||
url := fmt.Sprintf("%s/api/v1/repos/%s/branches", os.Getenv("GITEA_TEA_TEST_URL"), repoFullName)
|
||||
|
||||
@@ -112,7 +112,7 @@ func waitForBranches(t *testing.T, repoFullName string) {
|
||||
for _, b := range branches {
|
||||
have[b.Name] = true
|
||||
}
|
||||
if have["main"] && have["branch-with-labels"] {
|
||||
if have["main"] && have[branchName] {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user