Skip to content

Commit de4db89

Browse files
Merge branch 'main' into feat-version-arch
2 parents ffab002 + e9b98ae commit de4db89

Some content is hidden

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

44 files changed

+789
-385
lines changed

.github/workflows/cron-licenses.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: cron-licenses
22

33
on:
4-
#schedule:
5-
# - cron: "7 0 * * 1" # every Monday at 00:07 UTC
4+
# schedule:
5+
# - cron: "7 0 * * 1" # every Monday at 00:07 UTC
66
workflow_dispatch:
77

88
jobs:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ lint-templates: .venv node_modules ## lint template files
393393

394394
.PHONY: lint-yaml
395395
lint-yaml: .venv ## lint yaml files
396-
@poetry run yamllint .
396+
@poetry run yamllint -s .
397397

398398
.PHONY: watch
399399
watch: ## watch everything and continuously rebuild

models/actions/runner.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ func init() {
167167

168168
type FindRunnerOptions struct {
169169
db.ListOptions
170+
IDs []int64
170171
RepoID int64
171172
OwnerID int64 // it will be ignored if RepoID is set
172173
Sort string
@@ -178,6 +179,14 @@ type FindRunnerOptions struct {
178179
func (opts FindRunnerOptions) ToConds() builder.Cond {
179180
cond := builder.NewCond()
180181

182+
if len(opts.IDs) > 0 {
183+
if len(opts.IDs) == 1 {
184+
cond = cond.And(builder.Eq{"id": opts.IDs[0]})
185+
} else {
186+
cond = cond.And(builder.In("id", opts.IDs))
187+
}
188+
}
189+
181190
if opts.RepoID > 0 {
182191
c := builder.NewCond().And(builder.Eq{"repo_id": opts.RepoID})
183192
if opts.WithAvailable {

models/actions/variable.go

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,23 @@ func InsertVariable(ctx context.Context, ownerID, repoID int64, name, data strin
5858

5959
type FindVariablesOpts struct {
6060
db.ListOptions
61+
IDs []int64
6162
RepoID int64
6263
OwnerID int64 // it will be ignored if RepoID is set
6364
Name string
6465
}
6566

6667
func (opts FindVariablesOpts) ToConds() builder.Cond {
6768
cond := builder.NewCond()
69+
70+
if len(opts.IDs) > 0 {
71+
if len(opts.IDs) == 1 {
72+
cond = cond.And(builder.Eq{"id": opts.IDs[0]})
73+
} else {
74+
cond = cond.And(builder.In("id", opts.IDs))
75+
}
76+
}
77+
6878
// Since we now support instance-level variables,
6979
// there is no need to check for null values for `owner_id` and `repo_id`
7080
cond = cond.And(builder.Eq{"repo_id": opts.RepoID})
@@ -85,12 +95,12 @@ func FindVariables(ctx context.Context, opts FindVariablesOpts) ([]*ActionVariab
8595
return db.Find[ActionVariable](ctx, opts)
8696
}
8797

88-
func UpdateVariable(ctx context.Context, variable *ActionVariable) (bool, error) {
89-
count, err := db.GetEngine(ctx).ID(variable.ID).Cols("name", "data").
90-
Update(&ActionVariable{
91-
Name: variable.Name,
92-
Data: variable.Data,
93-
})
98+
func UpdateVariableCols(ctx context.Context, variable *ActionVariable, cols ...string) (bool, error) {
99+
variable.Name = strings.ToUpper(variable.Name)
100+
count, err := db.GetEngine(ctx).
101+
ID(variable.ID).
102+
Cols(cols...).
103+
Update(variable)
94104
return count != 0, err
95105
}
96106

options/locale/locale_cs-CZ.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,7 @@ show_only_public=Zobrazeny pouze veřejné
385385

386386
issues.in_your_repos=Ve vašich repozitářích
387387

388+
388389
[explore]
389390
repos=Repozitáře
390391
users=Uživatelé

options/locale/locale_de-DE.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ show_only_public=Nur öffentliche anzeigen
384384

385385
issues.in_your_repos=Eigene Repositories
386386

387+
387388
[explore]
388389
repos=Repositories
389390
users=Benutzer

options/locale/locale_el-GR.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ show_only_public=Εμφανίζονται μόνο δημόσια
335335

336336
issues.in_your_repos=Στα αποθετήρια σας
337337

338+
338339
[explore]
339340
repos=Αποθετήρια
340341
users=Χρήστες

options/locale/locale_es-ES.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ show_only_public=Mostrar sólo repositorios públicos
333333

334334
issues.in_your_repos=En tus repositorios
335335

336+
336337
[explore]
337338
repos=Repositorios
338339
users=Usuarios

options/locale/locale_fa-IR.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ show_only_public=نمایش دادن موارد عمومی
256256

257257
issues.in_your_repos=در مخازن شما
258258

259+
259260
[explore]
260261
repos=مخازن
261262
users=کاربران

options/locale/locale_fi-FI.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ show_only_public=Näytetään vain julkiset
266266

267267
issues.in_your_repos=Repoissasi
268268

269+
269270
[explore]
270271
repos=Repot
271272
users=Käyttäjät

0 commit comments

Comments
 (0)