Skip to content

Commit cca6ee7

Browse files
authored
Merge branch 'main' into improve_file_tree
2 parents fbbf2f0 + 796ff26 commit cca6ee7

File tree

32 files changed

+152
-172
lines changed

32 files changed

+152
-172
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ XGO_VERSION := go-1.21.x
2828
AIR_PACKAGE ?= github.com/cosmtrek/[email protected]
2929
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/cmd/[email protected]
3030
GOFUMPT_PACKAGE ?= mvdan.cc/[email protected]
31-
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.1
31+
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.0
3232
GXZ_PACKAGE ?= github.com/ulikunitz/xz/cmd/[email protected]
3333
MISSPELL_PACKAGE ?= github.com/client9/misspell/cmd/[email protected]
3434
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/[email protected]

docs/content/usage/actions/act-runner.zh-cn.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,12 @@ services:
208208

209209
```yaml
210210
cache:
211-
enabled: true
212-
dir: ""
213-
# 使用步骤 1. 获取的 LAN IP
214-
host: "192.168.8.17"
215-
# 使用步骤 2. 获取的端口号
216-
port: 8088
211+
enabled: true
212+
dir: ""
213+
# 使用步骤 1. 获取的 LAN IP
214+
host: "192.168.8.17"
215+
# 使用步骤 2. 获取的端口号
216+
port: 8088
217217
```
218218

219219
- 4.启动容器时, 将 Cache 端口映射至主机。

models/actions/task.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ func CreateTaskForRunner(ctx context.Context, runner *ActionRunner) (*ActionTask
279279
return nil, false, fmt.Errorf("parse workflow of job %d: %w", job.ID, err)
280280
} else if len(gots) != 1 {
281281
return nil, false, fmt.Errorf("workflow of job %d: not single workflow", job.ID)
282-
} else {
282+
} else { //nolint:revive
283283
_, workflowJob = gots[0].Job()
284284
}
285285

models/activities/action.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -713,9 +713,8 @@ func DeleteIssueActions(ctx context.Context, repoID, issueID, issueIndex int64)
713713
break
714714
} else if _, err = db.GetEngine(ctx).In("comment_id", commentIDs).Delete(&Action{}); err != nil {
715715
return err
716-
} else {
717-
lastCommentID = commentIDs[len(commentIDs)-1]
718716
}
717+
lastCommentID = commentIDs[len(commentIDs)-1]
719718
}
720719

721720
_, err := e.Where("repo_id = ?", repoID).

models/issues/review.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,8 @@ func GetReviewByID(ctx context.Context, id int64) (*Review, error) {
213213
return nil, err
214214
} else if !has {
215215
return nil, ErrReviewNotExist{ID: id}
216-
} else {
217-
return review, nil
218216
}
217+
return review, nil
219218
}
220219

221220
// CreateReviewOptions represent the options to create a review. Type, Issue and Reviewer are required.

modules/activitypub/user_settings.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,10 @@ func GetKeyPair(ctx context.Context, user *user_model.User) (pub, priv string, e
2929
return pub, priv, err
3030
}
3131
return pub, priv, err
32-
} else {
33-
priv = settings[user_model.UserActivityPubPrivPem].SettingValue
34-
pub = settings[user_model.UserActivityPubPubPem].SettingValue
35-
return pub, priv, err
3632
}
33+
priv = settings[user_model.UserActivityPubPrivPem].SettingValue
34+
pub = settings[user_model.UserActivityPubPubPem].SettingValue
35+
return pub, priv, err
3736
}
3837

3938
// GetPublicKey function returns a user's public key

modules/git/submodule.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,8 @@ func getRefURL(refURL, urlPrefix, repoFullName, sshDomain string) string {
101101
return ref.Scheme + "://" + ref.Host + ref.Path
102102
} else if urlPrefixHostname == refHostname || refHostname == sshDomain {
103103
return urlPrefix + path.Clean(path.Join("/", ref.Path))
104-
} else {
105-
return "http://" + refHostname + ref.Path
106104
}
105+
return "http://" + refHostname + ref.Path
107106
}
108107
}
109108

modules/lfs/transferadapter_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,9 @@ func TestBasicTransferAdapter(t *testing.T) {
6262
json.NewEncoder(payload).Encode(er)
6363

6464
return &http.Response{StatusCode: http.StatusNotFound, Body: io.NopCloser(payload)}
65-
} else {
66-
t.Errorf("Unknown test case: %s", url)
67-
return nil
6865
}
66+
t.Errorf("Unknown test case: %s", url)
67+
return nil
6968
}
7069

7170
hc := &http.Client{Transport: RoundTripFunc(roundTripHandler)}

0 commit comments

Comments
 (0)