Skip to content

Commit fd8a3e0

Browse files
authored
Merge branch 'main' into fix-datetime
2 parents 7f6220c + ec2d159 commit fd8a3e0

File tree

77 files changed

+3412
-3018
lines changed

Some content is hidden

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

77 files changed

+3412
-3018
lines changed

.eslintrc.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ plugins:
2727
- "@stylistic/eslint-plugin-js"
2828
- "@typescript-eslint/eslint-plugin"
2929
- eslint-plugin-array-func
30-
- eslint-plugin-deprecation
3130
- eslint-plugin-github
3231
- eslint-plugin-i
3332
- eslint-plugin-no-jquery
@@ -248,6 +247,7 @@ rules:
248247
"@typescript-eslint/no-base-to-string": [0]
249248
"@typescript-eslint/no-confusing-non-null-assertion": [2]
250249
"@typescript-eslint/no-confusing-void-expression": [0]
250+
"@typescript-eslint/no-deprecated": [2]
251251
"@typescript-eslint/no-dupe-class-members": [0]
252252
"@typescript-eslint/no-duplicate-enum-values": [2]
253253
"@typescript-eslint/no-duplicate-type-constituents": [2, {ignoreUnions: true}]
@@ -359,7 +359,6 @@ rules:
359359
default-case-last: [2]
360360
default-case: [0]
361361
default-param-last: [0]
362-
deprecation/deprecation: [2]
363362
dot-notation: [0]
364363
eqeqeq: [2]
365364
for-direction: [2]
@@ -816,6 +815,7 @@ rules:
816815
unicorn/catch-error-name: [0]
817816
unicorn/consistent-destructuring: [2]
818817
unicorn/consistent-empty-array-spread: [2]
818+
unicorn/consistent-existence-index-check: [0]
819819
unicorn/consistent-function-scoping: [2]
820820
unicorn/custom-error-definition: [0]
821821
unicorn/empty-brace-spaces: [2]
@@ -892,10 +892,12 @@ rules:
892892
unicorn/prefer-dom-node-text-content: [2]
893893
unicorn/prefer-event-target: [2]
894894
unicorn/prefer-export-from: [0]
895+
unicorn/prefer-global-this: [0]
895896
unicorn/prefer-includes: [2]
896897
unicorn/prefer-json-parse-buffer: [0]
897898
unicorn/prefer-keyboard-event-key: [2]
898899
unicorn/prefer-logical-operator-over-ternary: [2]
900+
unicorn/prefer-math-min-max: [2]
899901
unicorn/prefer-math-trunc: [2]
900902
unicorn/prefer-modern-dom-apis: [0]
901903
unicorn/prefer-modern-math-apis: [2]

assets/go-licenses.json

Lines changed: 11 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/generate-emoji.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ func (e Emoji) MarshalJSON() ([]byte, error) {
5353
}
5454

5555
func main() {
56-
var err error
57-
5856
flag.Parse()
5957

6058
// generate data
@@ -83,8 +81,6 @@ var replacer = strings.NewReplacer(
8381
var emojiRE = regexp.MustCompile(`\{Emoji:"([^"]*)"`)
8482

8583
func generate() ([]byte, error) {
86-
var err error
87-
8884
// load gemoji data
8985
res, err := http.Get(gemojiURL)
9086
if err != nil {

go.mod

Lines changed: 94 additions & 97 deletions
Large diffs are not rendered by default.

go.sum

Lines changed: 226 additions & 236 deletions
Large diffs are not rendered by default.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
-
2+
id: 1
3+
run_id: 791
4+
runner_id: 1
5+
repo_id: 4
6+
owner_id: 1
7+
commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0
8+
storage_path: "26/1/1712166500347189545.chunk"
9+
file_size: 1024
10+
file_compressed_size: 1024
11+
content_encoding: ""
12+
artifact_path: "abc.txt"
13+
artifact_name: "artifact-download"
14+
status: 1
15+
created_unix: 1712338649
16+
updated_unix: 1712338649
17+
expired_unix: 1720114649
18+
19+
-
20+
id: 19
21+
run_id: 791
22+
runner_id: 1
23+
repo_id: 4
24+
owner_id: 1
25+
commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0
26+
storage_path: "26/19/1712348022422036662.chunk"
27+
file_size: 1024
28+
file_compressed_size: 1024
29+
content_encoding: ""
30+
artifact_path: "abc.txt"
31+
artifact_name: "multi-file-download"
32+
status: 2
33+
created_unix: 1712348022
34+
updated_unix: 1712348022
35+
expired_unix: 1720124022
36+
37+
-
38+
id: 20
39+
run_id: 791
40+
runner_id: 1
41+
repo_id: 4
42+
owner_id: 1
43+
commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0
44+
storage_path: "26/20/1712348022423431524.chunk"
45+
file_size: 1024
46+
file_compressed_size: 1024
47+
content_encoding: ""
48+
artifact_path: "xyz/def.txt"
49+
artifact_name: "multi-file-download"
50+
status: 2
51+
created_unix: 1712348022
52+
updated_unix: 1712348022
53+
expired_unix: 1720124022
54+
55+
-
56+
id: 22
57+
run_id: 792
58+
runner_id: 1
59+
repo_id: 4
60+
owner_id: 1
61+
commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0
62+
storage_path: "27/5/1730330775594233150.chunk"
63+
file_size: 1024
64+
file_compressed_size: 1024
65+
content_encoding: "application/zip"
66+
artifact_path: "artifact-v4-download.zip"
67+
artifact_name: "artifact-v4-download"
68+
status: 2
69+
created_unix: 1730330775
70+
updated_unix: 1730330775
71+
expired_unix: 1738106775

models/git/lfs.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,6 @@ var ErrLFSObjectNotExist = db.ErrNotExist{Resource: "LFS Meta object"}
136136
// NewLFSMetaObject stores a given populated LFSMetaObject structure in the database
137137
// if it is not already present.
138138
func NewLFSMetaObject(ctx context.Context, repoID int64, p lfs.Pointer) (*LFSMetaObject, error) {
139-
var err error
140-
141139
ctx, committer, err := db.TxContext(ctx)
142140
if err != nil {
143141
return nil, err

models/issues/label_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,7 @@ func TestGetLabelsByOrgID(t *testing.T) {
229229
testSuccess(3, "reversealphabetically", []int64{4, 3})
230230
testSuccess(3, "default", []int64{3, 4})
231231

232-
var err error
233-
_, err = issues_model.GetLabelsByOrgID(db.DefaultContext, 0, "leastissues", db.ListOptions{})
232+
_, err := issues_model.GetLabelsByOrgID(db.DefaultContext, 0, "leastissues", db.ListOptions{})
234233
assert.True(t, issues_model.IsErrOrgLabelNotExist(err))
235234

236235
_, err = issues_model.GetLabelsByOrgID(db.DefaultContext, -1, "leastissues", db.ListOptions{})

modules/charset/charset_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,12 @@ func TestMaybeRemoveBOM(t *testing.T) {
4040

4141
func TestToUTF8(t *testing.T) {
4242
resetDefaultCharsetsOrder()
43-
var res string
44-
var err error
4543

4644
// Note: golang compiler seems so behave differently depending on the current
4745
// locale, so some conversions might behave differently. For that reason, we don't
4846
// depend on particular conversions but in expected behaviors.
4947

50-
res, err = ToUTF8([]byte{0x41, 0x42, 0x43}, ConvertOpts{})
48+
res, err := ToUTF8([]byte{0x41, 0x42, 0x43}, ConvertOpts{})
5149
assert.NoError(t, err)
5250
assert.Equal(t, "ABC", res)
5351

modules/indexer/internal/meilisearch/indexer.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

1313
// Indexer represents a basic meilisearch indexer implementation
1414
type Indexer struct {
15-
Client *meilisearch.Client
15+
Client meilisearch.ServiceManager
1616

1717
url, apiKey string
1818
indexName string
@@ -40,11 +40,7 @@ func (i *Indexer) Init(_ context.Context) (bool, error) {
4040
return false, fmt.Errorf("indexer is already initialized")
4141
}
4242

43-
i.Client = meilisearch.NewClient(meilisearch.ClientConfig{
44-
Host: i.url,
45-
APIKey: i.apiKey,
46-
})
47-
43+
i.Client = meilisearch.New(i.url, meilisearch.WithAPIKey(i.apiKey))
4844
_, err := i.Client.GetIndex(i.VersionedIndexName())
4945
if err == nil {
5046
return true, nil

0 commit comments

Comments
 (0)