Skip to content

Commit

Permalink
Merge branch 'master' into rebase-merge-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed Dec 11, 2018
2 parents a910dbb + 205a533 commit b387fc1
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 8 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ This changelog goes through all the changes that have been made in each release
without substantial changes to our git log; to see the highlights of what has
been added to each release, please refer to the [blog](https://blog.gitea.io).

## [1.6.1](https://github.com/go-gitea/gitea/releases/tag/v1.6.1) - 2018-12-08
* BUGFIXES
* Fix dependent issue searching when gitea is run in subpath (#5392) (#5400)
* API: '/orgs/:org/repos': return private repos with read access (#5393)
* Fix repository deletion when there is large number of issues in it (#5426) (#5434)
* Word-break the WebHook url to prevent a ui-break (#5445)
* Admin should be able to delete repos via the API even if they are not a member of the organization (#5443) (#5447)
* Ensure that the `closed_at` is set for closed (#5450)
* Fix topic name length on database (#5493) (#5495)

## [1.6.0](https://github.com/go-gitea/gitea/releases/tag/v1.6.0) - 2018-11-22
* BREAKING
* Respect email privacy option in user search via API (#4512)
Expand Down
1 change: 1 addition & 0 deletions models/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -1771,6 +1771,7 @@ func DeleteRepository(doer *User, uid, repoID int64) error {
&RepoRedirect{RedirectRepoID: repoID},
&Webhook{RepoID: repoID},
&HookTask{RepoID: repoID},
&Notification{RepoID: repoID},
); err != nil {
return fmt.Errorf("deleteBeans: %v", err)
}
Expand Down
26 changes: 19 additions & 7 deletions models/review.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/util"
"github.com/go-xorm/core"
"github.com/go-xorm/xorm"

"github.com/go-xorm/builder"
Expand Down Expand Up @@ -266,13 +267,24 @@ type PullReviewersWithType struct {
// GetReviewersByPullID gets all reviewers for a pull request with the statuses
func GetReviewersByPullID(pullID int64) (issueReviewers []*PullReviewersWithType, err error) {
irs := []*PullReviewersWithType{}
err = x.Select("`user`.*, review.type, max(review.updated_unix) as review_updated_unix").
Table("review").
Join("INNER", "`user`", "review.reviewer_id = `user`.id").
Where("review.issue_id = ? AND (review.type = ? OR review.type = ?)", pullID, ReviewTypeApprove, ReviewTypeReject).
GroupBy("`user`.id, review.type").
OrderBy("review_updated_unix DESC").
Find(&irs)
if x.Dialect().DBType() == core.MSSQL {
err = x.SQL(`SELECT [user].*, review.type, review.review_updated_unix FROM
(SELECT review.id, review.type, review.reviewer_id, max(review.updated_unix) as review_updated_unix
FROM review WHERE review.issue_id=? AND (review.type = ? OR review.type = ?)
GROUP BY review.id, review.type, review.reviewer_id) as review
INNER JOIN [user] ON review.reviewer_id = [user].id ORDER BY review_updated_unix DESC`,
pullID, ReviewTypeApprove, ReviewTypeReject).
Find(&irs)
} else {
err = x.Select("`user`.*, review.type, max(review.updated_unix) as review_updated_unix").
Table("review").
Join("INNER", "`user`", "review.reviewer_id = `user`.id").
Where("review.issue_id = ? AND (review.type = ? OR review.type = ?)",
pullID, ReviewTypeApprove, ReviewTypeReject).
GroupBy("`user`.id, review.type").
OrderBy("review_updated_unix DESC").
Find(&irs)
}

// We need to group our results by user id _and_ review type, otherwise the query fails when using postgresql.
// But becaus we're doing this, we need to manually filter out multiple reviews of different types by the
Expand Down
1 change: 1 addition & 0 deletions options/locale/locale_ja-JP.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1327,6 +1327,7 @@ teams.add_team_repository=チームのリポジトリを追加
teams.remove_repo=削除
teams.add_nonexistent_repo=追加しようとしているリポジトリは存在しません。 先にリポジトリを作成してください。
teams.add_duplicate_users=ユーザーは既にチームのメンバーです。
teams.members.none=このチームにはメンバーがいません。

[admin]
dashboard=ダッシュボード
Expand Down
6 changes: 6 additions & 0 deletions options/locale/locale_lv-LV.ini
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ openid_register_title=Izveidot jaunu kontu
openid_register_desc=Izvēlētais OpenID konts sistēmā netika atpazīts, bet Jūs to varat piesaistīt esošam kontam.
openid_signin_desc=Ievadiet savu OpenID URI, piemēram: https://anna.me, peteris.openid.org.lv, gnusocial.net/janis.
disable_forgot_password_mail=Paroles atjaunošana nav pieejama. Sazinieties ar sistēmas administratoru.
email_domain_blacklisted=Nav atļauts reģistrēties ar šādu e-pasta adresi.

[mail]
activate_account=Lūdzu, aktivizējiet savu kontu
Expand Down Expand Up @@ -524,6 +525,7 @@ create_repo=Izveidot repozitoriju
default_branch=Noklusējuma atzars
mirror_prune=Izmest
mirror_prune_desc=Izdzēst visas ārējās atsauces, kas ārējā repozitorijā vairs neeksistē
mirror_interval=Spoguļošanas biežums (atļautās laika vienības 'h', 'm' un 's'). Ievadiet 0, lai atslēgtu automātisko spoguļošanu.
mirror_interval_invalid=Nekorekts spoguļošanas intervāls.
mirror_address=Spoguļa adrese
mirror_address_desc=Lūdzu iekļaujiet adresē, ja nepieciešams, arī lietotājvārdu un paroli.
Expand Down Expand Up @@ -830,6 +832,7 @@ issues.review.content.empty=Nepieciešams norādīt komentāru par prasītajām
issues.review.reject=noraidīja šīs izmaiņas %s
issues.review.pending=Nav iesūtīts
issues.review.review=Recenzija
issues.review.reviewers=Recenzenti
issues.review.show_outdated=Rādīt novecojušu
issues.review.hide_outdated=Paslēpt novecojušu

Expand Down Expand Up @@ -876,6 +879,7 @@ milestones.no_due_date=Bez termiņa
milestones.open=Atvērta
milestones.close=Aizvērt
milestones.new_subheader=Atskaites punkti, ļauj organizēt problēmas un sekot to progresam.
milestones.completeness=%d%% pabeigti
milestones.create=Izveidot atskaites punktu
milestones.title=Virsraksts
milestones.desc=Apraksts
Expand Down Expand Up @@ -1323,6 +1327,8 @@ teams.add_team_repository=Pievienot komandas repozitoriju
teams.remove_repo=Noņemt
teams.add_nonexistent_repo=Repozitorijs, kuram Jūs mēģinat pievienot neeksistē, sākumā izveidojiet to.
teams.add_duplicate_users=Lietotājs jau ir šajā komandā.
teams.repos.none=Šai komandai nav piekļuves nevienam repozitorijam.
teams.members.none=Šajā komandā nav pievienots neviens lietotājs.

[admin]
dashboard=Infopanelis
Expand Down
2 changes: 2 additions & 0 deletions options/locale/locale_pt-BR.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1327,6 +1327,8 @@ teams.add_team_repository=Adicionar repositório da equipe
teams.remove_repo=Remover
teams.add_nonexistent_repo=O repositório que você está tentando adicionar não existe, por favor, crie-o primeiro.
teams.add_duplicate_users=Usuário já é um membro da equipe.
teams.repos.none=Nenhum repositório pode ser acessado por essa equipe.
teams.members.none=Nenhum membro nesta equipe.

[admin]
dashboard=Painel
Expand Down
4 changes: 3 additions & 1 deletion routers/repo/wiki.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ func findWikiRepoCommit(ctx *context.Context) (*git.Repository, *git.Commit, err

commit, err := wikiRepo.GetBranchCommit("master")
if err != nil {
ctx.ServerError("GetBranchCommit", err)
return wikiRepo, nil, err
}
return wikiRepo, commit, nil
Expand Down Expand Up @@ -112,6 +111,9 @@ func wikiContentsByName(ctx *context.Context, commit *git.Commit, wikiName strin
func renderWikiPage(ctx *context.Context, isViewPage bool) (*git.Repository, *git.TreeEntry) {
wikiRepo, commit, err := findWikiRepoCommit(ctx)
if err != nil {
if !git.IsErrNotExist(err) {
ctx.ServerError("GetBranchCommit", err)
}
return nil, nil
}

Expand Down

0 comments on commit b387fc1

Please sign in to comment.