Skip to content

Commit 89dcfcf

Browse files
authored
Merge branch 'main' into api_user-settings
2 parents f692f16 + 8fa3bbc commit 89dcfcf

File tree

13 files changed

+154
-65
lines changed

13 files changed

+154
-65
lines changed

CHANGELOG.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,56 @@ This changelog goes through all the changes that have been made in each release
44
without substantial changes to our git log; to see the highlights of what has
55
been added to each release, please refer to the [blog](https://blog.gitea.io).
66

7+
## [1.14.3](https://github.com/go-gitea/gitea/releases/tag/v1.14.3) - 2021-06-18
8+
9+
* SECURITY
10+
* Encrypt migration credentials at rest (#15895) (#16187)
11+
* Only check access tokens if they are likely to be tokens (#16164) (#16171)
12+
* Add missing SameSite settings for the i_like_gitea cookie (#16037) (#16039)
13+
* Fix setting of SameSite on cookies (#15989) (#15991)
14+
* API
15+
* Repository object only count releases as releases (#16184) (#16190)
16+
* EditOrg respect RepoAdminChangeTeamAccess option (#16184) (#16190)
17+
* Fix overly strict edit pr permissions (#15900) (#16081)
18+
* BUGFIXES
19+
* Run processors on whole of text (#16155) (#16185)
20+
* Class `issue-keyword` is being incorrectly stripped off spans (#16163) (#16172)
21+
* Fix language switch for install page (#16043) (#16128)
22+
* Fix bug on getIssueIDsByRepoID (#16119) (#16124)
23+
* Set self-adjusting deadline for connection writing (#16068) (#16123)
24+
* Fix http path bug (#16117) (#16120)
25+
* Fix data URI scramble (#16098) (#16118)
26+
* Merge all deleteBranch as one function and also fix bug when delete branch don't close related PRs (#16067) (#16097)
27+
* git migration: don't prompt interactively for clone credentials (#15902) (#16082)
28+
* Fix case change in ownernames (#16045) (#16050)
29+
* Don't manipulate input params in email notification (#16011) (#16033)
30+
* Remove branch URL before IssueRefURL (#15968) (#15970)
31+
* Fix layout of milestone view (#15927) (#15940)
32+
* GitHub Migration, migrate draft releases too (#15884) (#15888)
33+
* Close the gitrepo when deleting the repository (#15876) (#15887)
34+
* Upgrade xorm to v1.1.0 (#15869) (#15885)
35+
* Fix blame row height alignment (#15863) (#15883)
36+
* Fix error message when saving generated LOCAL_ROOT_URL config (#15880) (#15882)
37+
* Backport Fix LFS commit finder not working (#15856) (#15874)
38+
* Stop calling WriteHeader in Write (#15862) (#15873)
39+
* Add timeout to writing to responses (#15831) (#15872)
40+
* Return go-get info on subdirs (#15642) (#15871)
41+
* Restore PAM user autocreation functionality (#15825) (#15867)
42+
* Fix truncate utf8 string (#15828) (#15854)
43+
* Fix bound address/port for caddy's certmagic library (#15758) (#15848)
44+
* Upgrade unrolled/render to v1.1.1 (#15845) (#15846)
45+
* Queue manager FlushAll can loop rapidly - add delay (#15733) (#15840)
46+
* Tagger can be empty, as can Commit and Author - tolerate this (#15835) (#15839)
47+
* Set autocomplete off on branches selector (#15809) (#15833)
48+
* Add missing error to Doctor log (#15813) (#15824)
49+
* Move restore repo to internal router and invoke from command to avoid open the same db file or queues files (#15790) (#15816)
50+
* ENHANCEMENTS
51+
* Removable media support to snap package (#16136) (#16138)
52+
* Move sans-serif fallback font higher than emoji fonts (#15855) (#15892)
53+
* DOCKER
54+
* Only write config in environment-to-ini if there are changes (#15861) (#15868)
55+
* Only offer hostcertificates if they exist (#15849) (#15853)
56+
757
## [1.14.2](https://github.com/go-gitea/gitea/releases/tag/v1.14.2) - 2021-05-09
858

959
* API

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,11 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
9494
- `REOPEN_KEYWORDS`: **reopen**, **reopens**, **reopened**: List of keywords used in Pull Request comments to automatically reopen
9595
a related issue
9696
- `DEFAULT_MERGE_MESSAGE_COMMITS_LIMIT`: **50**: In the default merge message for squash commits include at most this many commits. Set to `-1` to include all commits
97-
- `DEFAULT_MERGE_MESSAGE_SIZE`: **5120**: In the default merge message for squash commits limit the size of the commit messages. Set to `-1` to have no limit.
97+
- `DEFAULT_MERGE_MESSAGE_SIZE`: **5120**: In the default merge message for squash commits limit the size of the commit messages. Set to `-1` to have no limit. Only used if `POPULATE_SQUASH_COMMENT_WITH_COMMIT_MESSAGES` is `true`.
9898
- `DEFAULT_MERGE_MESSAGE_ALL_AUTHORS`: **false**: In the default merge message for squash commits walk all commits to include all authors in the Co-authored-by otherwise just use those in the limited list
9999
- `DEFAULT_MERGE_MESSAGE_MAX_APPROVERS`: **10**: In default merge messages limit the number of approvers listed as `Reviewed-by:`. Set to `-1` to include all.
100100
- `DEFAULT_MERGE_MESSAGE_OFFICIAL_APPROVERS_ONLY`: **true**: In default merge messages only include approvers who are officially allowed to review.
101+
- `POPULATE_SQUASH_COMMENT_WITH_COMMIT_MESSAGES`: **false**: In default squash-merge messages include the commit message of all commits comprising the pull request.
101102

102103
### Repository - Issue (`repository.issue`)
103104

integrations/org_count_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,12 @@ func doCheckOrgCounts(username string, orgCounts map[string]int, strict bool, ca
114114
Name: username,
115115
}).(*models.User)
116116

117-
user.GetOrganizations(&models.SearchOrganizationsOptions{All: true})
117+
orgs, err := models.GetOrgsByUserID(user.ID, true)
118+
assert.NoError(t, err)
118119

119120
calcOrgCounts := map[string]int{}
120121

121-
for _, org := range user.Orgs {
122+
for _, org := range orgs {
122123
calcOrgCounts[org.LowerName] = org.NumRepos
123124
count, ok := canonicalCounts[org.LowerName]
124125
if ok {

models/user.go

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ type User struct {
112112
LoginName string
113113
Type UserType
114114
OwnedOrgs []*User `xorm:"-"`
115-
Orgs []*User `xorm:"-"`
116115
Repos []*Repository `xorm:"-"`
117116
Location string
118117
Website string
@@ -603,58 +602,6 @@ func (u *User) GetOwnedOrganizations() (err error) {
603602
return err
604603
}
605604

606-
// GetOrganizations returns paginated organizations that user belongs to.
607-
// TODO: does not respect All and show orgs you privately participate
608-
func (u *User) GetOrganizations(opts *SearchOrganizationsOptions) error {
609-
sess := x.NewSession()
610-
defer sess.Close()
611-
612-
schema, err := x.TableInfo(new(User))
613-
if err != nil {
614-
return err
615-
}
616-
groupByCols := &strings.Builder{}
617-
for _, col := range schema.Columns() {
618-
fmt.Fprintf(groupByCols, "`%s`.%s,", schema.Name, col.Name)
619-
}
620-
groupByStr := groupByCols.String()
621-
groupByStr = groupByStr[0 : len(groupByStr)-1]
622-
623-
sess.Select("`user`.*, count(repo_id) as org_count").
624-
Table("user").
625-
Join("INNER", "org_user", "`org_user`.org_id=`user`.id").
626-
Join("LEFT", builder.
627-
Select("id as repo_id, owner_id as repo_owner_id").
628-
From("repository").
629-
Where(accessibleRepositoryCondition(u)), "`repository`.repo_owner_id = `org_user`.org_id").
630-
And("`org_user`.uid=?", u.ID).
631-
GroupBy(groupByStr)
632-
if opts.PageSize != 0 {
633-
sess = opts.setSessionPagination(sess)
634-
}
635-
type OrgCount struct {
636-
User `xorm:"extends"`
637-
OrgCount int
638-
}
639-
orgCounts := make([]*OrgCount, 0, 10)
640-
641-
if err := sess.
642-
Asc("`user`.name").
643-
Find(&orgCounts); err != nil {
644-
return err
645-
}
646-
647-
orgs := make([]*User, len(orgCounts))
648-
for i, orgCount := range orgCounts {
649-
orgCount.User.NumRepos = orgCount.OrgCount
650-
orgs[i] = &orgCount.User
651-
}
652-
653-
u.Orgs = orgs
654-
655-
return nil
656-
}
657-
658605
// DisplayName returns full name if it's not empty,
659606
// returns username otherwise.
660607
func (u *User) DisplayName() string {

modules/setting/repository.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ var (
7878
DefaultMergeMessageAllAuthors bool
7979
DefaultMergeMessageMaxApprovers int
8080
DefaultMergeMessageOfficialApproversOnly bool
81+
PopulateSquashCommentWithCommitMessages bool
8182
} `ini:"repository.pull-request"`
8283

8384
// Issue Setting
@@ -199,6 +200,7 @@ var (
199200
DefaultMergeMessageAllAuthors bool
200201
DefaultMergeMessageMaxApprovers int
201202
DefaultMergeMessageOfficialApproversOnly bool
203+
PopulateSquashCommentWithCommitMessages bool
202204
}{
203205
WorkInProgressPrefixes: []string{"WIP:", "[WIP]"},
204206
// Same as GitHub. See
@@ -210,6 +212,7 @@ var (
210212
DefaultMergeMessageAllAuthors: false,
211213
DefaultMergeMessageMaxApprovers: 10,
212214
DefaultMergeMessageOfficialApproversOnly: true,
215+
PopulateSquashCommentWithCommitMessages: false,
213216
},
214217

215218
// Issue settings

options/locale/locale_de-DE.ini

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,10 @@ loading=Laden…
9191
step1=Schritt 1:
9292
step2=Schritt 2:
9393

94+
error=Fehler
9495
error404=Die Seite, die du gerade versuchst aufzurufen, <strong>existiert entweder nicht</strong> oder <strong>du bist nicht berechtigt</strong>, diese anzusehen.
9596

97+
never=Niemals
9698

9799
[error]
98100
occurred=Ein Fehler ist aufgetreten
@@ -724,13 +726,17 @@ mirror_prune_desc=Entferne veraltete remote-tracking Referenzen
724726
mirror_interval=Spiegel-Intervall (gültige Zeiteinheiten sind 'h', 'm', 's'). 0 schaltet die automatische Synchronisierung aus.
725727
mirror_interval_invalid=Das Spiegel-Intervall ist ungültig.
726728
mirror_address=Klonen via URL
729+
mirror_address_desc=Gib alle erforderlichen Anmeldedaten im Abschnitt "Authentifizierung" ein.
727730
mirror_address_url_invalid=Die angegebene URL ist ungültig. Achte darauf, alle URL-Komponenten korrekt zu maskieren.
728731
mirror_address_protocol_invalid=Die angegebene URL ist ungültig. Nur Pfade beginnend mit http(s):// oder git:// können gespiegelt werden.
729732
mirror_lfs=Großdatei-Speicher (LFS)
730733
mirror_lfs_desc=Mirroring von LFS-Dateien aktivieren.
731734
mirror_lfs_endpoint=LFS-Endpunkt
732735
mirror_lfs_endpoint_desc=Sync wird versuchen, die Klon-URL zu verwenden, um <a target="_blank" rel="noopener noreferrer" href="%s">den LFS-Server zu bestimmen</a>. Du kannst auch einen eigenen Endpunkt angeben, wenn die LFS-Dateien woanders gespeichert werden.
733736
mirror_last_synced=Zuletzt synchronisiert
737+
mirror_password_placeholder=(unverändert)
738+
mirror_password_blank_placeholder=(Nicht gesetzt)
739+
mirror_password_help=Ändere den Benutzernamen, um ein gespeichertes Passwort zu löschen.
734740
watchers=Beobachter
735741
stargazers=Favorisiert von
736742
forks=Forks
@@ -783,6 +789,7 @@ form.reach_limit_of_creation_n=Du hast bereits dein Limit von %d Repositories er
783789
form.name_reserved=Der Repository-Name „%s“ ist reserviert.
784790
form.name_pattern_not_allowed='%s' ist nicht erlaubt für Repository-Namen.
785791
792+
need_auth=Authentifizierung
786793
migrate_options=Migrationsoptionen
787794
migrate_service=Migrationsdienst
788795
migrate_options_mirror_helper=Dieses Repository wird ein <span class="text blue">Mirror</span> sein
@@ -816,11 +823,17 @@ migrated_from_fake=Migriert von %[1]s
816823
migrate.migrate=Migrieren von %s
817824
migrate.migrating=Migriere von <b>%s</b> ...
818825
migrate.migrating_failed=Migrieren von <b>%s</b> fehlgeschlagen.
826+
migrate.migrating_failed.error=Fehler: %s
819827
migrate.github.description=Migriere Daten von Github.com oder Github Enterprise.
820828
migrate.git.description=Migriere oder spiegele git-Daten von Git-Services
821829
migrate.gitlab.description=Migriere Daten von GitLab.com oder einem selbst gehostetem gitlab Server.
822830
migrate.gitea.description=Migriere Daten von Gitea.com oder einem selbst gehostetem Gitea Server.
823831
migrate.gogs.description=Migriere Daten von notabug.org oder einem anderen, selbst gehosteten Gogs Server.
832+
migrate.migrating_milestones=Meilensteine werden migriert
833+
migrate.migrating_labels=Labels werden migriert
834+
migrate.migrating_releases=Releases werden migriert
835+
migrate.migrating_issues=Issues werden migriert
836+
migrate.migrating_pulls=Pull Requests werden migriert
824837
825838
mirror_from=Mirror von
826839
forked_from=geforkt von
@@ -1314,6 +1327,10 @@ pulls.manually_merged_as=Dieser Pull Request wurde manuell als <a rel="nofollow"
13141327
pulls.is_closed=Der Pull-Request wurde geschlossen.
13151328
pulls.has_merged=Der Pull-Request wurde gemergt.
13161329
pulls.title_wip_desc=`<a href="#">Beginne den Titel mit <strong>%s</strong></a> um zu verhindern, dass der Pull Request versehentlich gemergt wird.`
1330+
pulls.cannot_merge_work_in_progress=Dieser Pull Request ist als Work in Progress markiert.
1331+
pulls.still_in_progress=Noch in Bearbeitung?
1332+
pulls.add_prefix=<strong>%s</strong> Präfix hinzufügen
1333+
pulls.remove_prefix=<strong>%s</strong> Präfix entfernen
13171334
pulls.data_broken=Dieser Pull-Requests ist kaputt, da Fork-Informationen gelöscht wurden.
13181335
pulls.files_conflicted=Dieser Pull-Request hat Änderungen, die im Widerspruch zum Ziel-Branch stehen.
13191336
pulls.is_checking=Die Konfliktprüfung läuft noch. Bitte aktualisiere die Seite in wenigen Augenblicken.
@@ -1539,6 +1556,11 @@ settings.hooks=Webhooks
15391556
settings.githooks=Git-Hooks
15401557
settings.basic_settings=Grundeinstellungen
15411558
settings.mirror_settings=Mirror-Einstellungen
1559+
settings.mirror_settings.direction=Richtung
1560+
settings.mirror_settings.direction.pull=Pull
1561+
settings.mirror_settings.direction.push=Push
1562+
settings.mirror_settings.last_update=Letzte Aktualisierung
1563+
settings.mirror_settings.push_mirror.none=Keine Push-Mirrors konfiguriert
15421564
settings.sync_mirror=Jetzt synchronisieren
15431565
settings.mirror_sync_in_progress=Mirror-Synchronisierung wird zurzeit ausgeführt. Komm in ein paar Minuten zurück.
15441566
settings.email_notifications.enable=E-Mail Benachrichtigungen aktivieren

options/locale/locale_es-ES.ini

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,10 @@ loading=Cargando…
9191
step1=Paso 1:
9292
step2=Paso 2:
9393

94+
error=Error
9495
error404=La página a la que está intentando acceder o <strong>no existe</strong> o <strong>no está autorizado</strong> para verla.
9596

97+
never=Nunca
9698

9799
[error]
98100
occurred=Se ha producido un error
@@ -731,6 +733,7 @@ mirror_lfs_desc=Activar la reproducción de datos LFS.
731733
mirror_lfs_endpoint=Punto final de LFS
732734
mirror_lfs_endpoint_desc=Sync intentará usar la url del clon para <a target="_blank" rel="noopener noreferrer" href="%s">determinar el servidor LFS</a>. También puede especificar un punto final personalizado si los datos LFS del repositorio se almacenan en otro lugar.
733735
mirror_last_synced=Sincronizado por última vez
736+
mirror_password_placeholder=(Sin cambios)
734737
watchers=Seguidores
735738
stargazers=Fans
736739
forks=Forks
@@ -783,6 +786,7 @@ form.reach_limit_of_creation_n=Ya han alcanzado su límite de repositorios de %d
783786
form.name_reserved=El nombre de repositorio '%s' está reservado.
784787
form.name_pattern_not_allowed=El patrón '%s' no está permitido en un nombre de repositorio.
785788

789+
need_auth=Autorización
786790
migrate_options=Opciones de migración
787791
migrate_service=Servicio de Migración
788792
migrate_options_mirror_helper=Este repositorio será uno <span class="text blue">replicado</span>
@@ -1314,6 +1318,7 @@ pulls.manually_merged_as=El Pull Request se ha fusionado manualmente como <a rel
13141318
pulls.is_closed=El pull request ha sido cerrado.
13151319
pulls.has_merged=El pull request ha sido fusionado.
13161320
pulls.title_wip_desc=`<a href="#">Comience el título con <strong>%s</strong></a> para prevenir que el pull request se fusione accidentalmente.`
1321+
pulls.still_in_progress=¿Aún en curso?
13171322
pulls.data_broken=Este pull request está rota debido a que falta información del fork.
13181323
pulls.files_conflicted=Este pull request tiene cambios en conflicto con la rama de destino.
13191324
pulls.is_checking=La comprobación de conflicto de fusión está en progreso. Inténtalo de nuevo en unos momentos.
@@ -1539,6 +1544,11 @@ settings.hooks=Webhooks
15391544
settings.githooks=Git Hooks
15401545
settings.basic_settings=Configuración Básica
15411546
settings.mirror_settings=Configuración de réplica
1547+
settings.mirror_settings.docs=Configure su proyecto para insertar y/o extraer automáticamente los cambios hacia/desde otro repositorio. Las ramas, etiquetas y commits se sincronizarán automáticamente. <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/repo-mirror/">¿Cómo replico los repositorios?</a>
1548+
settings.mirror_settings.direction=Dirección
1549+
settings.mirror_settings.direction.pull=Pull
1550+
settings.mirror_settings.last_update=Última actualización
1551+
settings.mirror_settings.push_mirror.remote_url=URL del repositorio remoto de Git
15421552
settings.sync_mirror=Sincronizar ahora
15431553
settings.mirror_sync_in_progress=La sincronización del repositorio replicado está en curso. Vuelva a intentarlo más tarde.
15441554
settings.email_notifications.enable=Habilitar las notificaciones por correo electrónico
@@ -1604,6 +1614,7 @@ settings.transfer_form_title=Escriba el nombre del repositorio como confirmació
16041614
settings.transfer_in_progress=Actualmente hay una transferencia en curso. Por favor, cancela si quieres transferir este repositorio a otro usuario.
16051615
settings.transfer_notices_1=- Perderá el acceso al repositorio si lo transfiere a un usuario individual.
16061616
settings.transfer_notices_2=- Mantendrá el acceso al repositorio si lo transfiere a una organización que usted (co-)posee.
1617+
settings.transfer_notices_3=- Si el repositorio es privado y se transfiere a un usuario individual, esta acción se asegura de que el usuario tenga al menos permisos de lectura (y cambie los permisos si es necesario).
16071618
settings.transfer_owner=Nuevo Propietario
16081619
settings.transfer_perform=Realizar transferencia
16091620
settings.transfer_started=Este repositorio ha sido marcado para transferencia y espera confirmación de "%s"
@@ -1974,6 +1985,10 @@ branch.restore=Restaurar rama '%s'
19741985
branch.download=Descargar rama '%s'
19751986
branch.included_desc=Esta rama forma parte de la predeterminada
19761987
branch.included=Incluida
1988+
branch.create_new_branch=Crear rama desde la rama:
1989+
branch.confirm_create_branch=Crear rama
1990+
branch.new_branch=Crear nueva rama
1991+
branch.new_branch_from=Crear nueva rama desde '%s'
19771992

19781993
tag.create_tag=Crear etiqueta <strong>%s</strong>
19791994
tag.create_success=La etiqueta '%s' ha sido creada.

options/locale/locale_fr-FR.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,8 +1263,8 @@ issues.review.dismissed_label=Rejeté
12631263
issues.review.left_comment=laisser un commentaire
12641264
issues.review.content.empty=Vous devez laisser un commentaire indiquant le(s) changement(s) demandé(s).
12651265
issues.review.reject=a requis les changements %s
1266-
issues.review.wait=a demandé une révision pour %s
1267-
issues.review.add_review_request=demande de révision de %s %s
1266+
issues.review.wait=a été sollicité pour une révision %s
1267+
issues.review.add_review_request=a demandé une révision de %s %s
12681268
issues.review.remove_review_request=a supprimé la demande de révision pour %s %s
12691269
issues.review.remove_review_request_self=a refusé la revue %s
12701270
issues.review.pending=En attente

options/locale/locale_ru-RU.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1995,7 +1995,7 @@ settings.visibility.public=Публичный
19951995
settings.visibility.limited=Ограничено (Видно только для авторизованных пользователей)
19961996
settings.visibility.limited_shortname=Ограничить
19971997
settings.visibility.private=Частный (Видимый только для участников организации)
1998-
settings.visibility.private_shortname=Приватизировать
1998+
settings.visibility.private_shortname=Приватный
19991999

20002000
settings.update_settings=Обновить настройки
20012001
settings.update_setting_success=Настройки организации обновлены.

0 commit comments

Comments
 (0)