mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 02:38:35 +00:00
Simplify parameter types (#18006)
Remove repeated type declarations in function definitions.
This commit is contained in:
@@ -68,7 +68,7 @@ func TestAPIRepoTags(t *testing.T) {
|
||||
session.MakeRequest(t, req, http.StatusNotFound)
|
||||
}
|
||||
|
||||
func createNewTagUsingAPI(t *testing.T, session *TestSession, token string, ownerName, repoName, name, target, msg string) *api.Tag {
|
||||
func createNewTagUsingAPI(t *testing.T, session *TestSession, token, ownerName, repoName, name, target, msg string) *api.Tag {
|
||||
urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/tags?token=%s", ownerName, repoName, token)
|
||||
req := NewRequestWithJSON(t, "POST", urlStr, &api.CreateTagOption{
|
||||
TagName: name,
|
||||
|
@@ -418,7 +418,7 @@ func doBranchProtectPRMerge(baseCtx *APITestContext, dstPath string) func(t *tes
|
||||
}
|
||||
}
|
||||
|
||||
func doProtectBranch(ctx APITestContext, branch string, userToWhitelist string, unprotectedFilePatterns string) func(t *testing.T) {
|
||||
func doProtectBranch(ctx APITestContext, branch, userToWhitelist, unprotectedFilePatterns string) func(t *testing.T) {
|
||||
// We are going to just use the owner to set the protection.
|
||||
return func(t *testing.T) {
|
||||
csrf := GetCSRF(t, ctx.Session, fmt.Sprintf("/%s/%s/settings/branches", url.PathEscape(ctx.Username), url.PathEscape(ctx.Reponame)))
|
||||
|
@@ -310,7 +310,7 @@ func testIssueWithBean(t *testing.T, user string, repoID int64, title, content s
|
||||
return issueURL, issue
|
||||
}
|
||||
|
||||
func testIssueChangeInfo(t *testing.T, user, issueURL, info string, value string) {
|
||||
func testIssueChangeInfo(t *testing.T, user, issueURL, info, value string) {
|
||||
session := loginUser(t, user)
|
||||
|
||||
req := NewRequest(t, "GET", issueURL)
|
||||
|
Reference in New Issue
Block a user