Skip to content

Commit e6754a1

Browse files
authored
Merge branch 'master' into fix-access-tests
2 parents c186797 + a97fe76 commit e6754a1

File tree

9 files changed

+40
-17
lines changed

9 files changed

+40
-17
lines changed

docs/config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ menu:
5858
weight: 60
5959
pre: github
6060
- name: Discord Chat
61-
url: https://discord.gg/NsatcWJ
61+
url: https://discord.gg/Gitea
6262
weight: 70
6363
pre: comment
6464
- name: Forum
@@ -106,7 +106,7 @@ languages:
106106
weight: 60
107107
pre: github
108108
- name: Discord Chat
109-
url: https://discord.gg/NsatcWJ
109+
url: https://discord.gg/Gitea
110110
weight: 70
111111
pre: comment
112112
- name: Forum
@@ -149,7 +149,7 @@ languages:
149149
weight: 60
150150
pre: github
151151
- name: Discord Chat
152-
url: https://discord.gg/NsatcWJ
152+
url: https://discord.gg/Gitea
153153
weight: 70
154154
pre: comment
155155
- name: Forum
@@ -192,7 +192,7 @@ languages:
192192
weight: 60
193193
pre: github
194194
- name: Chat no Discord
195-
url: https://discord.gg/NsatcWJ
195+
url: https://discord.gg/Gitea
196196
weight: 70
197197
pre: comment
198198
- name: Forum
@@ -235,7 +235,7 @@ languages:
235235
weight: 60
236236
pre: github
237237
- name: Discord Chat
238-
url: https://discord.gg/NsatcWJ
238+
url: https://discord.gg/Gitea
239239
weight: 70
240240
pre: comment
241241
- name: Forum
@@ -278,7 +278,7 @@ languages:
278278
weight: 60
279279
pre: github
280280
- name: Discord Chat
281-
url: https://discord.gg/NsatcWJ
281+
url: https://discord.gg/Gitea
282282
weight: 70
283283
pre: comment
284284
- name: Forum

models/fixtures/repository.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
owner_name: user2
55
lower_name: repo1
66
name: repo1
7+
is_empty: false
78
is_private: false
89
num_issues: 2
910
num_closed_issues: 1

models/repo_indexer.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ func GetUnindexedRepos(indexerType RepoIndexerType, maxRepoID int64, page, pageS
3434
ids := make([]int64, 0, 50)
3535
cond := builder.Cond(builder.IsNull{
3636
"repo_indexer_status.id",
37+
}).And(builder.Eq{
38+
"repository.is_empty": false,
3739
})
3840
sess := x.Table("repository").Join("LEFT OUTER", "repo_indexer_status", "repository.id = repo_indexer_status.repo_id AND repo_indexer_status.indexer_type = ?", indexerType)
3941
if maxRepoID > 0 {
@@ -66,11 +68,11 @@ func (repo *Repository) getIndexerStatus(e Engine, indexerType RepoIndexerType)
6668
return repo.StatsIndexerStatus, nil
6769
}
6870
}
69-
status := &RepoIndexerStatus{RepoID: repo.ID, IndexerType: indexerType}
70-
has, err := e.Get(status)
71-
if err != nil {
71+
status := &RepoIndexerStatus{RepoID: repo.ID}
72+
if has, err := e.Where("`indexer_type` = ?", indexerType).Get(status); err != nil {
7273
return nil, err
7374
} else if !has {
75+
status.IndexerType = indexerType
7476
status.CommitSha = ""
7577
}
7678
switch indexerType {

models/repo_language_stats.go

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,19 @@ func (repo *Repository) UpdateLanguageStats(commitID string, stats map[string]fl
125125
}
126126
}
127127
// Delete old languages
128-
if _, err := sess.Where("`id` IN (SELECT `id` FROM `language_stat` WHERE `repo_id` = ? AND `commit_id` != ?)", repo.ID, commitID).Delete(&LanguageStat{}); err != nil {
129-
return err
128+
statsToDelete := make([]int64, 0, len(oldstats))
129+
for _, s := range oldstats {
130+
if s.CommitID != commitID {
131+
statsToDelete = append(statsToDelete, s.ID)
132+
}
133+
}
134+
if len(statsToDelete) > 0 {
135+
if _, err := sess.In("`id`", statsToDelete).Delete(&LanguageStat{}); err != nil {
136+
return err
137+
}
130138
}
131139

140+
// Update indexer status
132141
if err = repo.updateIndexerStatus(sess, RepoIndexerTypeStats, commitID); err != nil {
133142
return err
134143
}

modules/indexer/stats/queue.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
)
1515

1616
// statsQueue represents a queue to handle repository stats updates
17-
var statsQueue queue.Queue
17+
var statsQueue queue.UniqueQueue
1818

1919
// handle passed PR IDs and test the PRs
2020
func handle(data ...queue.Data) {
@@ -27,7 +27,7 @@ func handle(data ...queue.Data) {
2727
}
2828

2929
func initStatsQueue() error {
30-
statsQueue = queue.CreateQueue("repo_stats_update", handle, int64(0)).(queue.Queue)
30+
statsQueue = queue.CreateUniqueQueue("repo_stats_update", handle, int64(0)).(queue.UniqueQueue)
3131
if statsQueue == nil {
3232
return fmt.Errorf("Unable to create repo_stats_update Queue")
3333
}

options/locale/locale_es-ES.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ issues.label_templates.use=Utilice la etiqueta
833833
issues.label_templates.fail_to_load_file=Error al cargar el archivo de plantilla de etiqueta '%s': %v
834834
issues.add_label_at=ha añadido la etiqueta <div class="ui label has-emoji" style="color: %s\; background-color: %s">%s</div> %s
835835
issues.remove_label_at=ha eliminado la etiqueta <div class="ui label has-emoji" style="color: %s\; background-color: %s">%s</div> %s
836-
issues.add_milestone_at=`ha añadido esto al hito <b>%s</b> %s '
836+
issues.add_milestone_at=`ha añadido esto al hito <b>%s</b> %s`
837837
issues.change_milestone_at=`modificó el hito de <b>%s</b> a <b>%s</b> %s`
838838
issues.remove_milestone_at=`eliminado esto del <b>%s</b> hito %s '
839839
issues.deleted_milestone=`(eliminado)`
@@ -902,7 +902,7 @@ issues.reopen_comment_issue=Comentar y reabrir
902902
issues.create_comment=Comentar
903903
issues.closed_at=`cerró <a id="%[1]s" href="#%[1]s">%[2]s</a>`
904904
issues.reopened_at=`reabrió <a id="%[1]s" href="#%[1]s">%[2]s</a>`
905-
issues.commit_ref_at=`mencionada esta incidencia en un commit <a id="%[1]s" href="#%[1]s">%[2]s</a>`
905+
issues.commit_ref_at=`referenció esta incidencia en un commit <a id="%[1]s" href="#%[1]s">%[2]s</a>`
906906
issues.ref_issue_from=`<a href="%[3]s">referenció esta incidencia %[4]s</a> <a id="%[1]s" href="#%[1]s">%[2]s</a>`
907907
issues.ref_pull_from=`<a href="%[3]s">referenció este pull request %[4]s</a> <a id="%[1]s" href="#%[1]s">%[2]s</a>`
908908
issues.ref_closing_from=`<a href="%[3]s">referenció un pull request %[4]s que cerrará esta incidencia</a> <a id="%[1]s" href="#%[1]s">%[2]s</a>`

options/locale/locale_ja-JP.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ write=書き込み
7979
preview=プレビュー
8080
loading=読み込み中…
8181

82+
error404=アクセスしようとしたページは<strong>存在しない</strong>か、閲覧が<strong>許可されていません</strong>。
8283

8384
[startpage]
8485
app_desc=痛みのない、自己ホスト型のGitサービス
@@ -1396,6 +1397,7 @@ settings.add_discord_hook_desc=<a href="%s">Discord</a>をリポジトリと組
13961397
settings.add_dingtalk_hook_desc=<a href="%s">Dingtalk</a>をリポジトリと組み合わせます。
13971398
settings.add_telegram_hook_desc=<a href="%s">Telegram</a>をリポジトリと組み合わせます。
13981399
settings.add_msteams_hook_desc=<a href="%s">Microsoft Teams</a>をリポジトリと組み合わせます。
1400+
settings.add_feishu_hook_desc=<a href="%s">Feishu</a>をリポジトリと組み合わせます。
13991401
settings.deploy_keys=デプロイキー
14001402
settings.add_deploy_key=デプロイキーを追加
14011403
settings.deploy_key_desc=デプロイキーには、リポジトリの読み取り専用プルアクセス権が与えられます。

options/locale/locale_lv-LV.ini

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ user=Lietotāja vārds
103103
password=Parole
104104
db_name=Datu bāzes nosaukums
105105
db_helper=Piezīme MySQL lietotājiem: izmantojiet InnoDB glabāšanas programmu, un ja izmantojat "utf8mb4", tad InnoDB versijai ir jābūt lielākai par 5.6.
106+
db_schema=Shēma
106107
ssl_mode=SSL
107108
charset=Rakstzīmju kopa
108109
path=Ceļš
@@ -635,6 +636,7 @@ stargazers=Zvaigžņdevēji
635636
forks=Atdalītie repozitoriji
636637
pick_reaction=Izvēlieties reakciju
637638
reactions_more=un vēl %d
639+
language_other=Citas
638640

639641
template.items=Sagataves ieraksti
640642
template.git_content=Git saturs (noklusētais atzars)
@@ -1074,6 +1076,7 @@ pulls.open_unmerged_pull_exists=`Jūs nevarat veikt atkārtotas atvēršanas dar
10741076
pulls.status_checking=Dažas pārbaudes vēl tiek veiktas
10751077
pulls.status_checks_success=Visas pārbaudes ir veiksmīgas
10761078
pulls.status_checks_error=Dažas pārbaudes bija neveiksmīgas
1079+
pulls.update_branch=Atjaunot atzaru
10771080

10781081
milestones.new=Jauns atskaites punkts
10791082
milestones.open_tab=%d atvērti
@@ -1534,6 +1537,7 @@ release.deletion_success=Laidiens tika izdzēsts.
15341537
release.tag_name_already_exist=Laidiens ar šādu taga nosaukumu jau eksistē.
15351538
release.tag_name_invalid=Nekorekts taga nosaukums.
15361539
release.downloads=Lejupielādes
1540+
release.download_count=Lejupielādes: %s
15371541
15381542
branch.name=Atzara nosaukums
15391543
branch.search=Meklēt atzarus
@@ -1585,6 +1589,7 @@ team_desc_helper=Aprakstiet komandas mērķi vai lomu.
15851589
team_access_desc=Piekļuve repozitorijiem
15861590
team_permission_desc=Atļauja
15871591
team_unit_desc=Atļaut piekļuvi repozitorija sadaļām
1592+
team_unit_disabled=(Atspējots)
15881593
15891594
form.name_reserved=Organizācijas nosaukums '%s' ir rezervēts.
15901595
form.name_pattern_not_allowed=Organizācijas nosaukums '%s' nav atļauts.
@@ -1747,6 +1752,7 @@ users.new_account=Izveidot lietotāja kontu
17471752
users.name=Lietotājvārds
17481753
users.activated=Aktivizēts
17491754
users.admin=Administrators
1755+
users.restricted=Ierobežots
17501756
users.repos=Repozitoriji
17511757
users.created=Izveidots
17521758
users.last_login=Pēdējā autorizācija
@@ -1765,6 +1771,7 @@ users.max_repo_creation_desc=(Ievadiet -1 lai izmantotu noklusēto globālo iero
17651771
users.is_activated=Lietotāja konts ir aktivizēts
17661772
users.prohibit_login=Atspējota pieslēgšanās
17671773
users.is_admin=Administratora tiesības
1774+
users.is_restricted=Ir ierobežots
17681775
users.allow_git_hook=Atļaut veidot git āķus
17691776
users.allow_import_local=Atļauts importēt lokālus repozitorijus
17701777
users.allow_create_organization=Atļauts veidot organizācijas
@@ -1819,6 +1826,7 @@ auths.attribute_surname=Uzvārda atribūts
18191826
auths.attribute_mail=E-pasta atribūts
18201827
auths.attribute_ssh_public_key=Publiskās SSH atslēgas atribūts
18211828
auths.attributes_in_bind=Nolasīt atribūtus no saistīšanas DN konteksta
1829+
auths.allow_deactivate_all=Atļaut tukšam datu izgūšanas rezultātam deaktivizēt visus lietotājus
18221830
auths.use_paged_search=Izmantot, dalīto pa lapām, meklēšanu
18231831
auths.search_page_size=Lapas izmērs
18241832
auths.filter=Lietotāju filts
@@ -1920,6 +1928,7 @@ config.db_type=Veids
19201928
config.db_host=Resursdators
19211929
config.db_name=Nosaukums
19221930
config.db_user=Lietotājvārds
1931+
config.db_schema=Shēma
19231932
config.db_ssl_mode=SSL
19241933
config.db_path=Ceļš
19251934

options/locale/locale_pl-PL.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1521,7 +1521,7 @@ branch.name=Nazwa gałęzi
15211521
branch.search=Szukaj gałęzi
15221522
branch.already_exists=Gałąź z nazwą '%s' już istnieje.
15231523
branch.delete_head=Usuń
1524-
branch.delete=Usuń branch "%s"
1524+
branch.delete=Usuń gałąź '%s'
15251525
branch.delete_html=Usuń gałąź
15261526
branch.delete_desc=Usunięcie gałęzi jest trwałe i <strong>NIE MOŻE</strong> zostać cofnięte. Kontynuować?
15271527
branch.deletion_success=Gałąź '%s' została usunięta.
@@ -2026,7 +2026,7 @@ notices.delete_success=Powiadomienia systemu zostały usunięte.
20262026
[action]
20272027
create_repo=tworzy repozytorium <a href="%s">%s</a>
20282028
rename_repo=zmienia nazwę repozytorium <code>%[1]s</code> na <a href="%[2]s">%[3]s</a>
2029-
commit_repo=wypycha do <a href="%[1]s/src/branch/%[2]s">%[3]s</a> w<a href="%[1]s">%[4]s</a>
2029+
commit_repo=wypycha do <a href="%[1]s/src/branch/%[2]s">%[3]s</a> w <a href="%[1]s">%[4]s</a>
20302030
create_issue=`otwiera zgłoszenie <a href="%s/issues/%s">%s#%[2]s</a>`
20312031
close_issue=`zamyka zgłoszenie <a href="%s/issues/%s">%s#%[2]s</a>`
20322032
reopen_issue=`ponownie otwiera zgłoszenie <a href="%s/issues/%s">%s#%[2]s</a>`

0 commit comments

Comments
 (0)