mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-19 00:01:16 -04:00
Compare commits
8 Commits
14731a34ff
...
383edf2fd7
Author | SHA1 | Date | |
---|---|---|---|
|
383edf2fd7 | ||
|
28f9b313ba | ||
|
7520cd678c | ||
|
1f026bcb7e | ||
|
c2cabe7b28 | ||
|
2f8e1604f8 | ||
|
218e719ea8 | ||
|
e46274b5b4 |
@ -321,3 +321,20 @@
|
|||||||
created_unix: 946684830
|
created_unix: 946684830
|
||||||
updated_unix: 978307200
|
updated_unix: 978307200
|
||||||
is_locked: false
|
is_locked: false
|
||||||
|
|
||||||
|
-
|
||||||
|
id: 20
|
||||||
|
repo_id: 23
|
||||||
|
index: 1
|
||||||
|
poster_id: 2
|
||||||
|
original_author_id: 0
|
||||||
|
name: issue for pr
|
||||||
|
content: content
|
||||||
|
milestone_id: 0
|
||||||
|
priority: 0
|
||||||
|
is_closed: false
|
||||||
|
is_pull: true
|
||||||
|
num_comments: 0
|
||||||
|
created_unix: 978307210
|
||||||
|
updated_unix: 978307210
|
||||||
|
is_locked: false
|
||||||
|
@ -89,3 +89,12 @@
|
|||||||
base_branch: main
|
base_branch: main
|
||||||
merge_base: cbff181af4c9c7fee3cf6c106699e07d9a3f54e6
|
merge_base: cbff181af4c9c7fee3cf6c106699e07d9a3f54e6
|
||||||
has_merged: false
|
has_merged: false
|
||||||
|
|
||||||
|
-
|
||||||
|
id: 8
|
||||||
|
type: 0 # gitea pull request
|
||||||
|
status: 2 # mergable
|
||||||
|
issue_id: 20
|
||||||
|
index: 1
|
||||||
|
head_repo_id: 23
|
||||||
|
base_repo_id: 23
|
@ -679,7 +679,7 @@
|
|||||||
num_forks: 0
|
num_forks: 0
|
||||||
num_issues: 0
|
num_issues: 0
|
||||||
num_closed_issues: 0
|
num_closed_issues: 0
|
||||||
num_pulls: 0
|
num_pulls: 1
|
||||||
num_closed_pulls: 0
|
num_closed_pulls: 0
|
||||||
num_milestones: 0
|
num_milestones: 0
|
||||||
num_closed_milestones: 0
|
num_closed_milestones: 0
|
||||||
|
@ -132,3 +132,41 @@
|
|||||||
content: "singular review from org6 and final review for this pr"
|
content: "singular review from org6 and final review for this pr"
|
||||||
updated_unix: 946684831
|
updated_unix: 946684831
|
||||||
created_unix: 946684831
|
created_unix: 946684831
|
||||||
|
|
||||||
|
-
|
||||||
|
id: 16
|
||||||
|
type: 4
|
||||||
|
reviewer_id: 20
|
||||||
|
issue_id: 20
|
||||||
|
content: "review request for user20"
|
||||||
|
updated_unix: 946684832
|
||||||
|
created_unix: 946684832
|
||||||
|
|
||||||
|
-
|
||||||
|
id: 17
|
||||||
|
type: 1
|
||||||
|
reviewer_id: 20
|
||||||
|
issue_id: 20
|
||||||
|
content: "review approved by user20"
|
||||||
|
updated_unix: 946684833
|
||||||
|
created_unix: 946684833
|
||||||
|
-
|
||||||
|
id: 18
|
||||||
|
type: 4
|
||||||
|
reviewer_id: 0
|
||||||
|
reviewer_team_id: 5
|
||||||
|
issue_id: 20
|
||||||
|
content: "review request for team5"
|
||||||
|
updated_unix: 946684834
|
||||||
|
created_unix: 946684834
|
||||||
|
|
||||||
|
-
|
||||||
|
id: 19
|
||||||
|
type: 4
|
||||||
|
reviewer_id: 15
|
||||||
|
reviewer_team_id: 0
|
||||||
|
issue_id: 20
|
||||||
|
content: "review request for user15"
|
||||||
|
updated_unix: 946684835
|
||||||
|
created_unix: 946684835
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@
|
|||||||
name: review_team
|
name: review_team
|
||||||
authorize: 1 # read
|
authorize: 1 # read
|
||||||
num_repos: 1
|
num_repos: 1
|
||||||
num_members: 2
|
num_members: 3
|
||||||
includes_all_repositories: false
|
includes_all_repositories: false
|
||||||
can_create_org_repo: false
|
can_create_org_repo: false
|
||||||
|
|
||||||
|
@ -123,3 +123,9 @@
|
|||||||
org_id: 36
|
org_id: 36
|
||||||
team_id: 20
|
team_id: 20
|
||||||
uid: 5
|
uid: 5
|
||||||
|
|
||||||
|
-
|
||||||
|
id: 22
|
||||||
|
org_id: 17
|
||||||
|
team_id: 9
|
||||||
|
uid: 15
|
||||||
|
@ -315,6 +315,11 @@ type WhitelistOptions struct {
|
|||||||
// This function also performs check if whitelist user and team's IDs have been changed
|
// This function also performs check if whitelist user and team's IDs have been changed
|
||||||
// to avoid unnecessary whitelist delete and regenerate.
|
// to avoid unnecessary whitelist delete and regenerate.
|
||||||
func UpdateProtectBranch(ctx context.Context, repo *repo_model.Repository, protectBranch *ProtectedBranch, opts WhitelistOptions) (err error) {
|
func UpdateProtectBranch(ctx context.Context, repo *repo_model.Repository, protectBranch *ProtectedBranch, opts WhitelistOptions) (err error) {
|
||||||
|
err = repo.MustNotBeArchived()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
if err = repo.LoadOwner(ctx); err != nil {
|
if err = repo.LoadOwner(ctx); err != nil {
|
||||||
return fmt.Errorf("LoadOwner: %v", err)
|
return fmt.Errorf("LoadOwner: %v", err)
|
||||||
}
|
}
|
||||||
@ -445,9 +450,14 @@ func updateTeamWhitelist(ctx context.Context, repo *repo_model.Repository, curre
|
|||||||
}
|
}
|
||||||
|
|
||||||
// DeleteProtectedBranch removes ProtectedBranch relation between the user and repository.
|
// DeleteProtectedBranch removes ProtectedBranch relation between the user and repository.
|
||||||
func DeleteProtectedBranch(ctx context.Context, repoID, id int64) (err error) {
|
func DeleteProtectedBranch(ctx context.Context, repo *repo_model.Repository, id int64) (err error) {
|
||||||
|
err = repo.MustNotBeArchived()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
protectedBranch := &ProtectedBranch{
|
protectedBranch := &ProtectedBranch{
|
||||||
RepoID: repoID,
|
RepoID: repo.ID,
|
||||||
ID: id,
|
ID: id,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -362,14 +362,21 @@ func applyReviewRequestedCondition(sess *xorm.Session, reviewRequestedID int64)
|
|||||||
From("team_user").
|
From("team_user").
|
||||||
Where(builder.Eq{"team_user.uid": reviewRequestedID})
|
Where(builder.Eq{"team_user.uid": reviewRequestedID})
|
||||||
|
|
||||||
|
// if the review is approved or rejected, it should not be shown in the review requested list
|
||||||
|
maxReview := builder.Select("MAX(r.id)").
|
||||||
|
From("review as r").
|
||||||
|
Where(builder.In("r.type", []ReviewType{ReviewTypeApprove, ReviewTypeReject, ReviewTypeRequest})).
|
||||||
|
GroupBy("r.issue_id, r.reviewer_id, r.reviewer_team_id")
|
||||||
|
|
||||||
subQuery := builder.Select("review.issue_id").
|
subQuery := builder.Select("review.issue_id").
|
||||||
From("review").
|
From("review").
|
||||||
Where(builder.And(
|
Where(builder.And(
|
||||||
builder.In("review.type", []ReviewType{ReviewTypeRequest, ReviewTypeReject, ReviewTypeApprove}),
|
builder.Eq{"review.type": ReviewTypeRequest},
|
||||||
builder.Or(
|
builder.Or(
|
||||||
builder.Eq{"review.reviewer_id": reviewRequestedID},
|
builder.Eq{"review.reviewer_id": reviewRequestedID},
|
||||||
builder.In("review.reviewer_team_id", existInTeamQuery),
|
builder.In("review.reviewer_team_id", existInTeamQuery),
|
||||||
),
|
),
|
||||||
|
builder.In("review.id", maxReview),
|
||||||
))
|
))
|
||||||
return sess.Where("issue.poster_id <> ?", reviewRequestedID).
|
return sess.Where("issue.poster_id <> ?", reviewRequestedID).
|
||||||
And(builder.In("issue.id", subQuery))
|
And(builder.In("issue.id", subQuery))
|
||||||
|
@ -403,7 +403,7 @@ func TestCountIssues(t *testing.T) {
|
|||||||
assert.NoError(t, unittest.PrepareTestDatabase())
|
assert.NoError(t, unittest.PrepareTestDatabase())
|
||||||
count, err := issues_model.CountIssues(db.DefaultContext, &issues_model.IssuesOptions{})
|
count, err := issues_model.CountIssues(db.DefaultContext, &issues_model.IssuesOptions{})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.EqualValues(t, 19, count)
|
assert.EqualValues(t, 20, count)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestIssueLoadAttributes(t *testing.T) {
|
func TestIssueLoadAttributes(t *testing.T) {
|
||||||
|
@ -47,6 +47,14 @@ func (err ErrUserDoesNotHaveAccessToRepo) Unwrap() error {
|
|||||||
return util.ErrPermissionDenied
|
return util.ErrPermissionDenied
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ErrRepoIsArchived struct {
|
||||||
|
Repo *Repository
|
||||||
|
}
|
||||||
|
|
||||||
|
func (err ErrRepoIsArchived) Error() string {
|
||||||
|
return fmt.Sprintf("%s is archived", err.Repo.LogString())
|
||||||
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
reservedRepoNames = []string{".", "..", "-"}
|
reservedRepoNames = []string{".", "..", "-"}
|
||||||
reservedRepoPatterns = []string{"*.git", "*.wiki", "*.rss", "*.atom"}
|
reservedRepoPatterns = []string{"*.git", "*.wiki", "*.rss", "*.atom"}
|
||||||
@ -654,6 +662,14 @@ func (repo *Repository) GetTrustModel() TrustModelType {
|
|||||||
return trustModel
|
return trustModel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MustNotBeArchived returns ErrRepoIsArchived if the repo is archived
|
||||||
|
func (repo *Repository) MustNotBeArchived() error {
|
||||||
|
if repo.IsArchived {
|
||||||
|
return ErrRepoIsArchived{Repo: repo}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// __________ .__ __
|
// __________ .__ __
|
||||||
// \______ \ ____ ______ ____ _____|__|/ |_ ___________ ___.__.
|
// \______ \ ____ ______ ____ _____|__|/ |_ ___________ ___.__.
|
||||||
// | _// __ \\____ \ / _ \/ ___/ \ __\/ _ \_ __ < | |
|
// | _// __ \\____ \ / _ \/ ___/ \ __\/ _ \_ __ < | |
|
||||||
|
@ -101,6 +101,12 @@ type APIRedirect struct{}
|
|||||||
// swagger:response string
|
// swagger:response string
|
||||||
type APIString string
|
type APIString string
|
||||||
|
|
||||||
|
// APIRepoArchivedError is an error that is raised when an archived repo should be modified
|
||||||
|
// swagger:response repoArchivedError
|
||||||
|
type APIRepoArchivedError struct {
|
||||||
|
APIError
|
||||||
|
}
|
||||||
|
|
||||||
// ServerError responds with error message, status is 500
|
// ServerError responds with error message, status is 500
|
||||||
func (ctx *APIContext) ServerError(title string, err error) {
|
func (ctx *APIContext) ServerError(title string, err error) {
|
||||||
ctx.Error(http.StatusInternalServerError, title, err)
|
ctx.Error(http.StatusInternalServerError, title, err)
|
||||||
|
@ -180,6 +180,21 @@ func searchIssueByID(t *testing.T) {
|
|||||||
},
|
},
|
||||||
[]int64{11, 6, 5, 3, 2, 1},
|
[]int64{11, 6, 5, 3, 2, 1},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
// issue 20 request user 15 and team 5 which user 15 belongs to
|
||||||
|
// the review request number of issue 20 should be 1
|
||||||
|
SearchOptions{
|
||||||
|
ReviewRequestedID: int64Pointer(15),
|
||||||
|
},
|
||||||
|
[]int64{12, 20},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// user 20 approved the issue 20, so return nothing
|
||||||
|
SearchOptions{
|
||||||
|
ReviewRequestedID: int64Pointer(20),
|
||||||
|
},
|
||||||
|
[]int64{},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, test := range tests {
|
for _, test := range tests {
|
||||||
@ -206,7 +221,7 @@ func searchIssueIsPull(t *testing.T) {
|
|||||||
SearchOptions{
|
SearchOptions{
|
||||||
IsPull: util.OptionalBoolTrue,
|
IsPull: util.OptionalBoolTrue,
|
||||||
},
|
},
|
||||||
[]int64{12, 11, 19, 9, 8, 3, 2},
|
[]int64{12, 11, 20, 19, 9, 8, 3, 2},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
for _, test := range tests {
|
for _, test := range tests {
|
||||||
@ -227,7 +242,7 @@ func searchIssueIsClosed(t *testing.T) {
|
|||||||
SearchOptions{
|
SearchOptions{
|
||||||
IsClosed: util.OptionalBoolFalse,
|
IsClosed: util.OptionalBoolFalse,
|
||||||
},
|
},
|
||||||
[]int64{17, 16, 15, 14, 13, 12, 11, 6, 19, 18, 10, 7, 9, 8, 3, 2, 1},
|
[]int64{17, 16, 15, 14, 13, 12, 11, 20, 6, 19, 18, 10, 7, 9, 8, 3, 2, 1},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
SearchOptions{
|
SearchOptions{
|
||||||
@ -293,7 +308,7 @@ func searchIssueByLabelID(t *testing.T) {
|
|||||||
SearchOptions{
|
SearchOptions{
|
||||||
ExcludedLabelIDs: []int64{1},
|
ExcludedLabelIDs: []int64{1},
|
||||||
},
|
},
|
||||||
[]int64{17, 16, 15, 14, 13, 12, 11, 6, 5, 19, 18, 10, 7, 4, 9, 8, 3},
|
[]int64{17, 16, 15, 14, 13, 12, 11, 20, 6, 5, 19, 18, 10, 7, 4, 9, 8, 3},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
for _, test := range tests {
|
for _, test := range tests {
|
||||||
@ -317,7 +332,7 @@ func searchIssueByTime(t *testing.T) {
|
|||||||
SearchOptions{
|
SearchOptions{
|
||||||
UpdatedAfterUnix: int64Pointer(0),
|
UpdatedAfterUnix: int64Pointer(0),
|
||||||
},
|
},
|
||||||
[]int64{17, 16, 15, 14, 13, 12, 11, 6, 5, 19, 18, 10, 7, 4, 9, 8, 3, 2, 1},
|
[]int64{17, 16, 15, 14, 13, 12, 11, 20, 6, 5, 19, 18, 10, 7, 4, 9, 8, 3, 2, 1},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
for _, test := range tests {
|
for _, test := range tests {
|
||||||
@ -338,7 +353,7 @@ func searchIssueWithOrder(t *testing.T) {
|
|||||||
SearchOptions{
|
SearchOptions{
|
||||||
SortBy: internal.SortByCreatedAsc,
|
SortBy: internal.SortByCreatedAsc,
|
||||||
},
|
},
|
||||||
[]int64{1, 2, 3, 8, 9, 4, 7, 10, 18, 19, 5, 6, 11, 12, 13, 14, 15, 16, 17},
|
[]int64{1, 2, 3, 8, 9, 4, 7, 10, 18, 19, 5, 6, 20, 11, 12, 13, 14, 15, 16, 17},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
for _, test := range tests {
|
for _, test := range tests {
|
||||||
@ -393,7 +408,7 @@ func searchIssueWithPaginator(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
[]int64{17, 16, 15, 14, 13},
|
[]int64{17, 16, 15, 14, 13},
|
||||||
19,
|
20,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
for _, test := range tests {
|
for _, test := range tests {
|
||||||
|
@ -180,6 +180,7 @@ network_error=ネットワークエラー
|
|||||||
[startpage]
|
[startpage]
|
||||||
app_desc=自分で立てる、超簡単 Git サービス
|
app_desc=自分で立てる、超簡単 Git サービス
|
||||||
install=簡単インストール
|
install=簡単インストール
|
||||||
|
install_desc=シンプルに、プラットフォームに応じて<a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com/installation/install-from-binary">バイナリを実行</a>したり、<a target="_blank" rel="noopener noreferrer" href="https://github.com/go-gitea/gitea/tree/master/docker">Docker</a>で動かしたり、<a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com/installation/install-from-package">パッケージ</a>を使うだけ。
|
||||||
platform=クロスプラットフォーム
|
platform=クロスプラットフォーム
|
||||||
platform_desc=Giteaは<a target="_blank" rel="noopener noreferrer" href="http://golang.org/">Go</a>でコンパイルできる環境ならどこでも動きます: Windows、macOS、Linux、ARM等々、好きなものを選んでください!
|
platform_desc=Giteaは<a target="_blank" rel="noopener noreferrer" href="http://golang.org/">Go</a>でコンパイルできる環境ならどこでも動きます: Windows、macOS、Linux、ARM等々、好きなものを選んでください!
|
||||||
lightweight=軽量
|
lightweight=軽量
|
||||||
@ -377,6 +378,7 @@ email_not_associate=このメールアドレスは、どのアカウントにも
|
|||||||
send_reset_mail=アカウント回復メールを送信
|
send_reset_mail=アカウント回復メールを送信
|
||||||
reset_password=アカウントの回復
|
reset_password=アカウントの回復
|
||||||
invalid_code=確認コードが無効か期限切れです。
|
invalid_code=確認コードが無効か期限切れです。
|
||||||
|
invalid_code_forgot_password=確認コードは無効または期限切れです。 新しいセッションを開始するには<a href="%s">ここ</a>をクリックしてください。
|
||||||
invalid_password=アカウントの作成に使用されたパスワードと一致しません。
|
invalid_password=アカウントの作成に使用されたパスワードと一致しません。
|
||||||
reset_password_helper=アカウント回復
|
reset_password_helper=アカウント回復
|
||||||
reset_password_wrong_user=あなたは %s でサインイン中ですが、アカウント回復のリンクは %s のものです。
|
reset_password_wrong_user=あなたは %s でサインイン中ですが、アカウント回復のリンクは %s のものです。
|
||||||
@ -678,6 +680,7 @@ choose_new_avatar=新しいアバターを選択
|
|||||||
update_avatar=アバターを更新
|
update_avatar=アバターを更新
|
||||||
delete_current_avatar=現在のアバターを削除
|
delete_current_avatar=現在のアバターを削除
|
||||||
uploaded_avatar_not_a_image=アップロードしたファイルは画像ファイルではありません。
|
uploaded_avatar_not_a_image=アップロードしたファイルは画像ファイルではありません。
|
||||||
|
uploaded_avatar_is_too_big=アップロードされたファイルサイズ(%d KiB) が最大サイズ(%d KiB) を超えています。
|
||||||
update_avatar_success=アバターを更新しました。
|
update_avatar_success=アバターを更新しました。
|
||||||
update_user_avatar_success=ユーザーのアバターを更新しました。
|
update_user_avatar_success=ユーザーのアバターを更新しました。
|
||||||
|
|
||||||
@ -967,6 +970,7 @@ trust_model_helper_collaborator_committer=共同作業者+コミッター: 共
|
|||||||
trust_model_helper_default=デフォルト: このシステムのデフォルトのトラストモデルを使用します
|
trust_model_helper_default=デフォルト: このシステムのデフォルトのトラストモデルを使用します
|
||||||
create_repo=リポジトリを作成
|
create_repo=リポジトリを作成
|
||||||
default_branch=デフォルトブランチ
|
default_branch=デフォルトブランチ
|
||||||
|
default_branch_label=デフォルト
|
||||||
default_branch_helper=デフォルトブランチはプルリクエストとコードコミットのベースブランチとなります。
|
default_branch_helper=デフォルトブランチはプルリクエストとコードコミットのベースブランチとなります。
|
||||||
mirror_prune=Prune
|
mirror_prune=Prune
|
||||||
mirror_prune_desc=不要になった古いリモートトラッキング参照を削除
|
mirror_prune_desc=不要になった古いリモートトラッキング参照を削除
|
||||||
@ -1466,9 +1470,18 @@ issues.ref_reopening_from=`<a href="%[3]s">が%[4]s、プルリクエストが
|
|||||||
issues.ref_closed_from=`<a href="%[3]s">が%[4]s、このイシューをクローズ</a> <a id="%[1]s" href="#%[1]s">%[2]s</a>`
|
issues.ref_closed_from=`<a href="%[3]s">が%[4]s、このイシューをクローズ</a> <a id="%[1]s" href="#%[1]s">%[2]s</a>`
|
||||||
issues.ref_reopened_from=`<a href="%[3]s">が%[4]s、このイシューを再オープン</a> <a id="%[1]s" href="#%[1]s">%[2]s</a>`
|
issues.ref_reopened_from=`<a href="%[3]s">が%[4]s、このイシューを再オープン</a> <a id="%[1]s" href="#%[1]s">%[2]s</a>`
|
||||||
issues.ref_from=` %[1]s にて`
|
issues.ref_from=` %[1]s にて`
|
||||||
issues.author=著作者
|
issues.author=作成者
|
||||||
|
issues.author_helper=このユーザーは作成者です。
|
||||||
issues.role.owner=オーナー
|
issues.role.owner=オーナー
|
||||||
|
issues.role.owner_helper=このユーザーはこのリポジトリの所有者です。
|
||||||
issues.role.member=メンバー
|
issues.role.member=メンバー
|
||||||
|
issues.role.member_helper=このユーザーはこのリポジトリを所有している組織のメンバーです。
|
||||||
|
issues.role.collaborator=共同作業者
|
||||||
|
issues.role.collaborator_helper=このユーザーはリポジトリ上で共同作業するように招待されています。
|
||||||
|
issues.role.first_time_contributor=初めての貢献者
|
||||||
|
issues.role.first_time_contributor_helper=これは、このユーザーのリポジトリへの最初の貢献です。
|
||||||
|
issues.role.contributor=貢献者
|
||||||
|
issues.role.contributor_helper=このユーザーは以前にリポジトリにコミットしています。
|
||||||
issues.re_request_review=レビューを再依頼
|
issues.re_request_review=レビューを再依頼
|
||||||
issues.is_stale=このレビューのあと、このPRに変更がありました
|
issues.is_stale=このレビューのあと、このPRに変更がありました
|
||||||
issues.remove_request_review=レビュー依頼を取り消し
|
issues.remove_request_review=レビュー依頼を取り消し
|
||||||
@ -1727,6 +1740,7 @@ pulls.rebase_conflict_summary=エラーメッセージ
|
|||||||
pulls.unrelated_histories=マージ失敗: マージHEADとベースには共通する履歴がありません。 ヒント: 別のストラテジーを試してみてください
|
pulls.unrelated_histories=マージ失敗: マージHEADとベースには共通する履歴がありません。 ヒント: 別のストラテジーを試してみてください
|
||||||
pulls.merge_out_of_date=マージ失敗: マージの生成中にベースが更新されました。 ヒント: もう一度試してみてください
|
pulls.merge_out_of_date=マージ失敗: マージの生成中にベースが更新されました。 ヒント: もう一度試してみてください
|
||||||
pulls.head_out_of_date=マージ失敗: マージの生成中に head が更新されました。 ヒント: もう一度試してみてください
|
pulls.head_out_of_date=マージ失敗: マージの生成中に head が更新されました。 ヒント: もう一度試してみてください
|
||||||
|
pulls.has_merged=失敗: プルリクエストはマージされていました。再度マージしたり、ターゲットブランチを変更することはできません。
|
||||||
pulls.push_rejected=マージ失敗: プッシュは拒否されました。 このリポジトリのGitフックを見直してください。
|
pulls.push_rejected=マージ失敗: プッシュは拒否されました。 このリポジトリのGitフックを見直してください。
|
||||||
pulls.push_rejected_summary=拒否メッセージ全体:
|
pulls.push_rejected_summary=拒否メッセージ全体:
|
||||||
pulls.push_rejected_no_message=マージ失敗: プッシュは拒否され、リモートからのメッセージはありません。<br>このリポジトリのGitフックを見直してください
|
pulls.push_rejected_no_message=マージ失敗: プッシュは拒否され、リモートからのメッセージはありません。<br>このリポジトリのGitフックを見直してください
|
||||||
@ -1792,6 +1806,8 @@ milestones.edit_success=マイルストーン "%s" を更新しました。
|
|||||||
milestones.deletion=マイルストーンの削除
|
milestones.deletion=マイルストーンの削除
|
||||||
milestones.deletion_desc=マイルストーンを削除すると、関連するすべてのイシューから除去されます。 続行しますか?
|
milestones.deletion_desc=マイルストーンを削除すると、関連するすべてのイシューから除去されます。 続行しますか?
|
||||||
milestones.deletion_success=マイルストーンを削除しました。
|
milestones.deletion_success=マイルストーンを削除しました。
|
||||||
|
milestones.filter_sort.earliest_due_data=期日が早い順
|
||||||
|
milestones.filter_sort.latest_due_date=期日が遅い順
|
||||||
milestones.filter_sort.least_complete=消化率の低い順
|
milestones.filter_sort.least_complete=消化率の低い順
|
||||||
milestones.filter_sort.most_complete=消化率の高い順
|
milestones.filter_sort.most_complete=消化率の高い順
|
||||||
milestones.filter_sort.most_issues=イシューの多い順
|
milestones.filter_sort.most_issues=イシューの多い順
|
||||||
@ -2289,6 +2305,7 @@ settings.tags.protection.allowed.teams=許可するチーム
|
|||||||
settings.tags.protection.allowed.noone=なし
|
settings.tags.protection.allowed.noone=なし
|
||||||
settings.tags.protection.create=タグを保護
|
settings.tags.protection.create=タグを保護
|
||||||
settings.tags.protection.none=タグは保護されていません。
|
settings.tags.protection.none=タグは保護されていません。
|
||||||
|
settings.tags.protection.pattern.description=ひとつのタグ名か、複数のタグにマッチするglobパターンまたは正規表現を使用できます。 詳しくは<a target="_blank" rel="noopener" href="https://docs.gitea.com/usage/protected-tags">タグの保護ガイド</a> をご覧ください。
|
||||||
settings.bot_token=Botトークン
|
settings.bot_token=Botトークン
|
||||||
settings.chat_id=チャットID
|
settings.chat_id=チャットID
|
||||||
settings.matrix.homeserver_url=ホームサーバー URL
|
settings.matrix.homeserver_url=ホームサーバー URL
|
||||||
@ -2680,6 +2697,7 @@ dashboard.reinit_missing_repos=レコードが存在するが見当たらない
|
|||||||
dashboard.sync_external_users=外部ユーザーデータの同期
|
dashboard.sync_external_users=外部ユーザーデータの同期
|
||||||
dashboard.cleanup_hook_task_table=hook_taskテーブルのクリーンアップ
|
dashboard.cleanup_hook_task_table=hook_taskテーブルのクリーンアップ
|
||||||
dashboard.cleanup_packages=期限切れパッケージのクリーンアップ
|
dashboard.cleanup_packages=期限切れパッケージのクリーンアップ
|
||||||
|
dashboard.cleanup_actions=Actionsの期限切れのログとアーティファクトのクリーンアップ
|
||||||
dashboard.server_uptime=サーバーの稼働時間
|
dashboard.server_uptime=サーバーの稼働時間
|
||||||
dashboard.current_goroutine=現在のGoroutine数
|
dashboard.current_goroutine=現在のGoroutine数
|
||||||
dashboard.current_memory_usage=現在のメモリ使用量
|
dashboard.current_memory_usage=現在のメモリ使用量
|
||||||
@ -2822,10 +2840,12 @@ packages.size=サイズ
|
|||||||
packages.published=配布
|
packages.published=配布
|
||||||
|
|
||||||
defaulthooks=デフォルトWebhook
|
defaulthooks=デフォルトWebhook
|
||||||
|
defaulthooks.desc=Webhookは、特定のGiteaイベントのトリガーが発生した際に、自動的にHTTP POSTリクエストをサーバーへ送信するものです。 ここで定義されたWebhookはデフォルトとなり、全ての新規リポジトリにコピーされます。 詳しくは<a target="_blank" rel="noopener" href="https://docs.gitea.com/usage/webhooks">Webhooksガイド</a>をご覧下さい。
|
||||||
defaulthooks.add_webhook=デフォルトWebhookの追加
|
defaulthooks.add_webhook=デフォルトWebhookの追加
|
||||||
defaulthooks.update_webhook=デフォルトWebhookの更新
|
defaulthooks.update_webhook=デフォルトWebhookの更新
|
||||||
|
|
||||||
systemhooks=システムWebhook
|
systemhooks=システムWebhook
|
||||||
|
systemhooks.desc=Webhookは、特定のGiteaイベントのトリガーが発生した際に、自動的にHTTP POSTリクエストをサーバーへ送信するものです。 ここで定義したWebhookはシステム内のすべてのリポジトリで呼び出されます。 そのため、パフォーマンスに及ぼす影響を考慮したうえで設定してください。 詳しくは<a target="_blank" rel="noopener" href="https://docs.gitea.com/usage/webhooks">Webhooksガイド</a>をご覧下さい。
|
||||||
systemhooks.add_webhook=システムWebhookを追加
|
systemhooks.add_webhook=システムWebhookを追加
|
||||||
systemhooks.update_webhook=システムWebhookを更新
|
systemhooks.update_webhook=システムWebhookを更新
|
||||||
|
|
||||||
@ -2930,6 +2950,7 @@ auths.tip.google_plus=OAuth2クライアント資格情報を、Google APIコン
|
|||||||
auths.tip.openid_connect=OpenID Connect DiscoveryのURL (<server>/.well-known/openid-configuration) をエンドポイントとして指定してください
|
auths.tip.openid_connect=OpenID Connect DiscoveryのURL (<server>/.well-known/openid-configuration) をエンドポイントとして指定してください
|
||||||
auths.tip.twitter=https://dev.twitter.com/apps へアクセスしてアプリケーションを作成し、“Allow this application to be used to Sign in with Twitter”オプションを有効にしてください。
|
auths.tip.twitter=https://dev.twitter.com/apps へアクセスしてアプリケーションを作成し、“Allow this application to be used to Sign in with Twitter”オプションを有効にしてください。
|
||||||
auths.tip.discord=新しいアプリケーションを https://discordapp.com/developers/applications/me から登録してください。
|
auths.tip.discord=新しいアプリケーションを https://discordapp.com/developers/applications/me から登録してください。
|
||||||
|
auths.tip.gitea=新しいOAuthアプリケーションを登録してください。 利用ガイドは https://docs.gitea.com/development/oauth2-provider にあります
|
||||||
auths.tip.yandex=`https://oauth.yandex.com/client/new で新しいアプリケーションを作成してください。 "Yandex.Passport API" セクションで次の項目を許可します: "Access to email address"、"Access to user avatar"、"Access to username, first name and surname, gender"`
|
auths.tip.yandex=`https://oauth.yandex.com/client/new で新しいアプリケーションを作成してください。 "Yandex.Passport API" セクションで次の項目を許可します: "Access to email address"、"Access to user avatar"、"Access to username, first name and surname, gender"`
|
||||||
auths.tip.mastodon=認証したいMastodonインスタンスのカスタムURLを入力してください (入力しない場合はデフォルトのURLを使用します)
|
auths.tip.mastodon=認証したいMastodonインスタンスのカスタムURLを入力してください (入力しない場合はデフォルトのURLを使用します)
|
||||||
auths.edit=認証ソースの編集
|
auths.edit=認証ソースの編集
|
||||||
|
@ -675,7 +675,7 @@ func mustEnableWiki(ctx *context.APIContext) {
|
|||||||
|
|
||||||
func mustNotBeArchived(ctx *context.APIContext) {
|
func mustNotBeArchived(ctx *context.APIContext) {
|
||||||
if ctx.Repo.Repository.IsArchived {
|
if ctx.Repo.Repository.IsArchived {
|
||||||
ctx.NotFound()
|
ctx.Error(http.StatusLocked, "RepoArchived", fmt.Errorf("%s is archived", ctx.Repo.Repository.LogString()))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1108,23 +1108,23 @@ func Routes() *web.Route {
|
|||||||
m.Group("/branches", func() {
|
m.Group("/branches", func() {
|
||||||
m.Get("", repo.ListBranches)
|
m.Get("", repo.ListBranches)
|
||||||
m.Get("/*", repo.GetBranch)
|
m.Get("/*", repo.GetBranch)
|
||||||
m.Delete("/*", reqToken(), reqRepoWriter(unit.TypeCode), repo.DeleteBranch)
|
m.Delete("/*", reqToken(), reqRepoWriter(unit.TypeCode), mustNotBeArchived, repo.DeleteBranch)
|
||||||
m.Post("", reqToken(), reqRepoWriter(unit.TypeCode), bind(api.CreateBranchRepoOption{}), repo.CreateBranch)
|
m.Post("", reqToken(), reqRepoWriter(unit.TypeCode), mustNotBeArchived, bind(api.CreateBranchRepoOption{}), repo.CreateBranch)
|
||||||
}, context.ReferencesGitRepo(), reqRepoReader(unit.TypeCode))
|
}, context.ReferencesGitRepo(), reqRepoReader(unit.TypeCode))
|
||||||
m.Group("/branch_protections", func() {
|
m.Group("/branch_protections", func() {
|
||||||
m.Get("", repo.ListBranchProtections)
|
m.Get("", repo.ListBranchProtections)
|
||||||
m.Post("", bind(api.CreateBranchProtectionOption{}), repo.CreateBranchProtection)
|
m.Post("", bind(api.CreateBranchProtectionOption{}), mustNotBeArchived, repo.CreateBranchProtection)
|
||||||
m.Group("/{name}", func() {
|
m.Group("/{name}", func() {
|
||||||
m.Get("", repo.GetBranchProtection)
|
m.Get("", repo.GetBranchProtection)
|
||||||
m.Patch("", bind(api.EditBranchProtectionOption{}), repo.EditBranchProtection)
|
m.Patch("", bind(api.EditBranchProtectionOption{}), mustNotBeArchived, repo.EditBranchProtection)
|
||||||
m.Delete("", repo.DeleteBranchProtection)
|
m.Delete("", repo.DeleteBranchProtection)
|
||||||
})
|
})
|
||||||
}, reqToken(), reqAdmin())
|
}, reqToken(), reqAdmin())
|
||||||
m.Group("/tags", func() {
|
m.Group("/tags", func() {
|
||||||
m.Get("", repo.ListTags)
|
m.Get("", repo.ListTags)
|
||||||
m.Get("/*", repo.GetTag)
|
m.Get("/*", repo.GetTag)
|
||||||
m.Post("", reqToken(), reqRepoWriter(unit.TypeCode), bind(api.CreateTagOption{}), repo.CreateTag)
|
m.Post("", reqToken(), reqRepoWriter(unit.TypeCode), mustNotBeArchived, bind(api.CreateTagOption{}), repo.CreateTag)
|
||||||
m.Delete("/*", reqToken(), repo.DeleteTag)
|
m.Delete("/*", reqToken(), reqRepoWriter(unit.TypeCode), mustNotBeArchived, repo.DeleteTag)
|
||||||
}, reqRepoReader(unit.TypeCode), context.ReferencesGitRepo(true))
|
}, reqRepoReader(unit.TypeCode), context.ReferencesGitRepo(true))
|
||||||
m.Group("/keys", func() {
|
m.Group("/keys", func() {
|
||||||
m.Combo("").Get(repo.ListDeployKeys).
|
m.Combo("").Get(repo.ListDeployKeys).
|
||||||
@ -1245,15 +1245,15 @@ func Routes() *web.Route {
|
|||||||
m.Get("/tags/{sha}", repo.GetAnnotatedTag)
|
m.Get("/tags/{sha}", repo.GetAnnotatedTag)
|
||||||
m.Get("/notes/{sha}", repo.GetNote)
|
m.Get("/notes/{sha}", repo.GetNote)
|
||||||
}, context.ReferencesGitRepo(true), reqRepoReader(unit.TypeCode))
|
}, context.ReferencesGitRepo(true), reqRepoReader(unit.TypeCode))
|
||||||
m.Post("/diffpatch", reqRepoWriter(unit.TypeCode), reqToken(), bind(api.ApplyDiffPatchFileOptions{}), repo.ApplyDiffPatch)
|
m.Post("/diffpatch", reqRepoWriter(unit.TypeCode), reqToken(), bind(api.ApplyDiffPatchFileOptions{}), mustNotBeArchived, repo.ApplyDiffPatch)
|
||||||
m.Group("/contents", func() {
|
m.Group("/contents", func() {
|
||||||
m.Get("", repo.GetContentsList)
|
m.Get("", repo.GetContentsList)
|
||||||
m.Post("", reqToken(), bind(api.ChangeFilesOptions{}), reqRepoBranchWriter, repo.ChangeFiles)
|
m.Post("", reqToken(), bind(api.ChangeFilesOptions{}), reqRepoBranchWriter, mustNotBeArchived, repo.ChangeFiles)
|
||||||
m.Get("/*", repo.GetContents)
|
m.Get("/*", repo.GetContents)
|
||||||
m.Group("/*", func() {
|
m.Group("/*", func() {
|
||||||
m.Post("", bind(api.CreateFileOptions{}), reqRepoBranchWriter, repo.CreateFile)
|
m.Post("", bind(api.CreateFileOptions{}), reqRepoBranchWriter, mustNotBeArchived, repo.CreateFile)
|
||||||
m.Put("", bind(api.UpdateFileOptions{}), reqRepoBranchWriter, repo.UpdateFile)
|
m.Put("", bind(api.UpdateFileOptions{}), reqRepoBranchWriter, mustNotBeArchived, repo.UpdateFile)
|
||||||
m.Delete("", bind(api.DeleteFileOptions{}), reqRepoBranchWriter, repo.DeleteFile)
|
m.Delete("", bind(api.DeleteFileOptions{}), reqRepoBranchWriter, mustNotBeArchived, repo.DeleteFile)
|
||||||
}, reqToken())
|
}, reqToken())
|
||||||
}, reqRepoReader(unit.TypeCode))
|
}, reqRepoReader(unit.TypeCode))
|
||||||
m.Get("/signing-key.gpg", misc.SigningKey)
|
m.Get("/signing-key.gpg", misc.SigningKey)
|
||||||
|
@ -248,7 +248,7 @@ func CreateTeam(ctx *context.APIContext) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
apiTeam, err := convert.ToTeam(ctx, team)
|
apiTeam, err := convert.ToTeam(ctx, team, true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.InternalServerError(err)
|
ctx.InternalServerError(err)
|
||||||
return
|
return
|
||||||
|
@ -117,17 +117,13 @@ func DeleteBranch(ctx *context.APIContext) {
|
|||||||
// "$ref": "#/responses/error"
|
// "$ref": "#/responses/error"
|
||||||
// "404":
|
// "404":
|
||||||
// "$ref": "#/responses/notFound"
|
// "$ref": "#/responses/notFound"
|
||||||
|
// "423":
|
||||||
|
// "$ref": "#/responses/repoArchivedError"
|
||||||
if ctx.Repo.Repository.IsEmpty {
|
if ctx.Repo.Repository.IsEmpty {
|
||||||
ctx.Error(http.StatusNotFound, "", "Git Repository is empty.")
|
ctx.Error(http.StatusNotFound, "", "Git Repository is empty.")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if ctx.Repo.Repository.IsArchived {
|
|
||||||
ctx.Error(http.StatusForbidden, "", "Git Repository is archived.")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if ctx.Repo.Repository.IsMirror {
|
if ctx.Repo.Repository.IsMirror {
|
||||||
ctx.Error(http.StatusForbidden, "", "Git Repository is a mirror.")
|
ctx.Error(http.StatusForbidden, "", "Git Repository is a mirror.")
|
||||||
return
|
return
|
||||||
@ -157,10 +153,6 @@ func DeleteBranch(ctx *context.APIContext) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ctx.Repo.Repository.IsArchived {
|
|
||||||
ctx.Error(http.StatusForbidden, "IsArchived", fmt.Errorf("can not delete branch of an archived repository"))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ctx.Repo.Repository.IsMirror {
|
if ctx.Repo.Repository.IsMirror {
|
||||||
ctx.Error(http.StatusForbidden, "IsMirrored", fmt.Errorf("can not delete branch of an mirror repository"))
|
ctx.Error(http.StatusForbidden, "IsMirrored", fmt.Errorf("can not delete branch of an mirror repository"))
|
||||||
return
|
return
|
||||||
@ -216,17 +208,14 @@ func CreateBranch(ctx *context.APIContext) {
|
|||||||
// description: The old branch does not exist.
|
// description: The old branch does not exist.
|
||||||
// "409":
|
// "409":
|
||||||
// description: The branch with the same name already exists.
|
// description: The branch with the same name already exists.
|
||||||
|
// "423":
|
||||||
|
// "$ref": "#/responses/repoArchivedError"
|
||||||
|
|
||||||
if ctx.Repo.Repository.IsEmpty {
|
if ctx.Repo.Repository.IsEmpty {
|
||||||
ctx.Error(http.StatusNotFound, "", "Git Repository is empty.")
|
ctx.Error(http.StatusNotFound, "", "Git Repository is empty.")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if ctx.Repo.Repository.IsArchived {
|
|
||||||
ctx.Error(http.StatusForbidden, "", "Git Repository is archived.")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if ctx.Repo.Repository.IsMirror {
|
if ctx.Repo.Repository.IsMirror {
|
||||||
ctx.Error(http.StatusForbidden, "", "Git Repository is a mirror.")
|
ctx.Error(http.StatusForbidden, "", "Git Repository is a mirror.")
|
||||||
return
|
return
|
||||||
@ -519,6 +508,8 @@ func CreateBranchProtection(ctx *context.APIContext) {
|
|||||||
// "$ref": "#/responses/notFound"
|
// "$ref": "#/responses/notFound"
|
||||||
// "422":
|
// "422":
|
||||||
// "$ref": "#/responses/validationError"
|
// "$ref": "#/responses/validationError"
|
||||||
|
// "423":
|
||||||
|
// "$ref": "#/responses/repoArchivedError"
|
||||||
|
|
||||||
form := web.GetForm(ctx).(*api.CreateBranchProtectionOption)
|
form := web.GetForm(ctx).(*api.CreateBranchProtectionOption)
|
||||||
repo := ctx.Repo.Repository
|
repo := ctx.Repo.Repository
|
||||||
@ -727,6 +718,8 @@ func EditBranchProtection(ctx *context.APIContext) {
|
|||||||
// "$ref": "#/responses/notFound"
|
// "$ref": "#/responses/notFound"
|
||||||
// "422":
|
// "422":
|
||||||
// "$ref": "#/responses/validationError"
|
// "$ref": "#/responses/validationError"
|
||||||
|
// "423":
|
||||||
|
// "$ref": "#/responses/repoArchivedError"
|
||||||
form := web.GetForm(ctx).(*api.EditBranchProtectionOption)
|
form := web.GetForm(ctx).(*api.EditBranchProtectionOption)
|
||||||
repo := ctx.Repo.Repository
|
repo := ctx.Repo.Repository
|
||||||
bpName := ctx.Params(":name")
|
bpName := ctx.Params(":name")
|
||||||
@ -1004,7 +997,7 @@ func DeleteBranchProtection(ctx *context.APIContext) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := git_model.DeleteProtectedBranch(ctx, ctx.Repo.Repository.ID, bp.ID); err != nil {
|
if err := git_model.DeleteProtectedBranch(ctx, ctx.Repo.Repository, bp.ID); err != nil {
|
||||||
ctx.Error(http.StatusInternalServerError, "DeleteProtectedBranch", err)
|
ctx.Error(http.StatusInternalServerError, "DeleteProtectedBranch", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -450,6 +450,8 @@ func ChangeFiles(ctx *context.APIContext) {
|
|||||||
// "$ref": "#/responses/notFound"
|
// "$ref": "#/responses/notFound"
|
||||||
// "422":
|
// "422":
|
||||||
// "$ref": "#/responses/error"
|
// "$ref": "#/responses/error"
|
||||||
|
// "423":
|
||||||
|
// "$ref": "#/responses/repoArchivedError"
|
||||||
|
|
||||||
apiOpts := web.GetForm(ctx).(*api.ChangeFilesOptions)
|
apiOpts := web.GetForm(ctx).(*api.ChangeFilesOptions)
|
||||||
|
|
||||||
@ -550,6 +552,8 @@ func CreateFile(ctx *context.APIContext) {
|
|||||||
// "$ref": "#/responses/notFound"
|
// "$ref": "#/responses/notFound"
|
||||||
// "422":
|
// "422":
|
||||||
// "$ref": "#/responses/error"
|
// "$ref": "#/responses/error"
|
||||||
|
// "423":
|
||||||
|
// "$ref": "#/responses/repoArchivedError"
|
||||||
|
|
||||||
apiOpts := web.GetForm(ctx).(*api.CreateFileOptions)
|
apiOpts := web.GetForm(ctx).(*api.CreateFileOptions)
|
||||||
|
|
||||||
@ -646,6 +650,8 @@ func UpdateFile(ctx *context.APIContext) {
|
|||||||
// "$ref": "#/responses/notFound"
|
// "$ref": "#/responses/notFound"
|
||||||
// "422":
|
// "422":
|
||||||
// "$ref": "#/responses/error"
|
// "$ref": "#/responses/error"
|
||||||
|
// "423":
|
||||||
|
// "$ref": "#/responses/repoArchivedError"
|
||||||
apiOpts := web.GetForm(ctx).(*api.UpdateFileOptions)
|
apiOpts := web.GetForm(ctx).(*api.UpdateFileOptions)
|
||||||
if ctx.Repo.Repository.IsEmpty {
|
if ctx.Repo.Repository.IsEmpty {
|
||||||
ctx.Error(http.StatusUnprocessableEntity, "RepoIsEmpty", fmt.Errorf("repo is empty"))
|
ctx.Error(http.StatusUnprocessableEntity, "RepoIsEmpty", fmt.Errorf("repo is empty"))
|
||||||
@ -806,6 +812,8 @@ func DeleteFile(ctx *context.APIContext) {
|
|||||||
// "$ref": "#/responses/error"
|
// "$ref": "#/responses/error"
|
||||||
// "404":
|
// "404":
|
||||||
// "$ref": "#/responses/error"
|
// "$ref": "#/responses/error"
|
||||||
|
// "423":
|
||||||
|
// "$ref": "#/responses/repoArchivedError"
|
||||||
|
|
||||||
apiOpts := web.GetForm(ctx).(*api.DeleteFileOptions)
|
apiOpts := web.GetForm(ctx).(*api.DeleteFileOptions)
|
||||||
if !canWriteFiles(ctx, apiOpts.BranchName) {
|
if !canWriteFiles(ctx, apiOpts.BranchName) {
|
||||||
|
@ -631,6 +631,8 @@ func CreateIssue(ctx *context.APIContext) {
|
|||||||
// "$ref": "#/responses/error"
|
// "$ref": "#/responses/error"
|
||||||
// "422":
|
// "422":
|
||||||
// "$ref": "#/responses/validationError"
|
// "$ref": "#/responses/validationError"
|
||||||
|
// "423":
|
||||||
|
// "$ref": "#/responses/repoArchivedError"
|
||||||
form := web.GetForm(ctx).(*api.CreateIssueOption)
|
form := web.GetForm(ctx).(*api.CreateIssueOption)
|
||||||
var deadlineUnix timeutil.TimeStamp
|
var deadlineUnix timeutil.TimeStamp
|
||||||
if form.Deadline != nil && ctx.Repo.CanWrite(unit.TypeIssues) {
|
if form.Deadline != nil && ctx.Repo.CanWrite(unit.TypeIssues) {
|
||||||
|
@ -153,6 +153,8 @@ func CreateIssueAttachment(ctx *context.APIContext) {
|
|||||||
// "$ref": "#/responses/error"
|
// "$ref": "#/responses/error"
|
||||||
// "404":
|
// "404":
|
||||||
// "$ref": "#/responses/error"
|
// "$ref": "#/responses/error"
|
||||||
|
// "423":
|
||||||
|
// "$ref": "#/responses/repoArchivedError"
|
||||||
|
|
||||||
issue := getIssueFromContext(ctx)
|
issue := getIssueFromContext(ctx)
|
||||||
if issue == nil {
|
if issue == nil {
|
||||||
@ -238,6 +240,8 @@ func EditIssueAttachment(ctx *context.APIContext) {
|
|||||||
// "$ref": "#/responses/Attachment"
|
// "$ref": "#/responses/Attachment"
|
||||||
// "404":
|
// "404":
|
||||||
// "$ref": "#/responses/error"
|
// "$ref": "#/responses/error"
|
||||||
|
// "423":
|
||||||
|
// "$ref": "#/responses/repoArchivedError"
|
||||||
|
|
||||||
attachment := getIssueAttachmentSafeWrite(ctx)
|
attachment := getIssueAttachmentSafeWrite(ctx)
|
||||||
if attachment == nil {
|
if attachment == nil {
|
||||||
@ -292,6 +296,8 @@ func DeleteIssueAttachment(ctx *context.APIContext) {
|
|||||||
// "$ref": "#/responses/empty"
|
// "$ref": "#/responses/empty"
|
||||||
// "404":
|
// "404":
|
||||||
// "$ref": "#/responses/error"
|
// "$ref": "#/responses/error"
|
||||||
|
// "423":
|
||||||
|
// "$ref": "#/responses/repoArchivedError"
|
||||||
|
|
||||||
attachment := getIssueAttachmentSafeWrite(ctx)
|
attachment := getIssueAttachmentSafeWrite(ctx)
|
||||||
if attachment == nil {
|
if attachment == nil {
|
||||||
|
@ -358,6 +358,8 @@ func CreateIssueComment(ctx *context.APIContext) {
|
|||||||
// "$ref": "#/responses/forbidden"
|
// "$ref": "#/responses/forbidden"
|
||||||
// "404":
|
// "404":
|
||||||
// "$ref": "#/responses/notFound"
|
// "$ref": "#/responses/notFound"
|
||||||
|
// "423":
|
||||||
|
// "$ref": "#/responses/repoArchivedError"
|
||||||
form := web.GetForm(ctx).(*api.CreateIssueCommentOption)
|
form := web.GetForm(ctx).(*api.CreateIssueCommentOption)
|
||||||
issue, err := issues_model.GetIssueByIndex(ctx, ctx.Repo.Repository.ID, ctx.ParamsInt64(":index"))
|
issue, err := issues_model.GetIssueByIndex(ctx, ctx.Repo.Repository.ID, ctx.ParamsInt64(":index"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -486,7 +488,8 @@ func EditIssueComment(ctx *context.APIContext) {
|
|||||||
// "$ref": "#/responses/forbidden"
|
// "$ref": "#/responses/forbidden"
|
||||||
// "404":
|
// "404":
|
||||||
// "$ref": "#/responses/notFound"
|
// "$ref": "#/responses/notFound"
|
||||||
|
// "423":
|
||||||
|
// "$ref": "#/responses/repoArchivedError"
|
||||||
form := web.GetForm(ctx).(*api.EditIssueCommentOption)
|
form := web.GetForm(ctx).(*api.EditIssueCommentOption)
|
||||||
editIssueComment(ctx, *form)
|
editIssueComment(ctx, *form)
|
||||||
}
|
}
|
||||||
|
@ -156,6 +156,8 @@ func CreateIssueCommentAttachment(ctx *context.APIContext) {
|
|||||||
// "$ref": "#/responses/error"
|
// "$ref": "#/responses/error"
|
||||||
// "404":
|
// "404":
|
||||||
// "$ref": "#/responses/error"
|
// "$ref": "#/responses/error"
|
||||||
|
// "423":
|
||||||
|
// "$ref": "#/responses/repoArchivedError"
|
||||||
|
|
||||||
// Check if comment exists and load comment
|
// Check if comment exists and load comment
|
||||||
comment := getIssueCommentSafe(ctx)
|
comment := getIssueCommentSafe(ctx)
|
||||||
@ -245,7 +247,8 @@ func EditIssueCommentAttachment(ctx *context.APIContext) {
|
|||||||
// "$ref": "#/responses/Attachment"
|
// "$ref": "#/responses/Attachment"
|
||||||
// "404":
|
// "404":
|
||||||
// "$ref": "#/responses/error"
|
// "$ref": "#/responses/error"
|
||||||
|
// "423":
|
||||||
|
// "$ref": "#/responses/repoArchivedError"
|
||||||
attach := getIssueCommentAttachmentSafeWrite(ctx)
|
attach := getIssueCommentAttachmentSafeWrite(ctx)
|
||||||
if attach == nil {
|
if attach == nil {
|
||||||
return
|
return
|
||||||
@ -297,7 +300,8 @@ func DeleteIssueCommentAttachment(ctx *context.APIContext) {
|
|||||||
// "$ref": "#/responses/empty"
|
// "$ref": "#/responses/empty"
|
||||||
// "404":
|
// "404":
|
||||||
// "$ref": "#/responses/error"
|
// "$ref": "#/responses/error"
|
||||||
|
// "423":
|
||||||
|
// "$ref": "#/responses/repoArchivedError"
|
||||||
attach := getIssueCommentAttachmentSafeWrite(ctx)
|
attach := getIssueCommentAttachmentSafeWrite(ctx)
|
||||||
if attach == nil {
|
if attach == nil {
|
||||||
return
|
return
|
||||||
|
@ -187,6 +187,8 @@ func CreateIssueDependency(ctx *context.APIContext) {
|
|||||||
// "$ref": "#/responses/Issue"
|
// "$ref": "#/responses/Issue"
|
||||||
// "404":
|
// "404":
|
||||||
// description: the issue does not exist
|
// description: the issue does not exist
|
||||||
|
// "423":
|
||||||
|
// "$ref": "#/responses/repoArchivedError"
|
||||||
|
|
||||||
// We want to make <:index> depend on <Form>, i.e. <:index> is the target
|
// We want to make <:index> depend on <Form>, i.e. <:index> is the target
|
||||||
target := getParamsIssue(ctx)
|
target := getParamsIssue(ctx)
|
||||||
@ -246,6 +248,8 @@ func RemoveIssueDependency(ctx *context.APIContext) {
|
|||||||
// "$ref": "#/responses/Issue"
|
// "$ref": "#/responses/Issue"
|
||||||
// "404":
|
// "404":
|
||||||
// "$ref": "#/responses/notFound"
|
// "$ref": "#/responses/notFound"
|
||||||
|
// "423":
|
||||||
|
// "$ref": "#/responses/repoArchivedError"
|
||||||
|
|
||||||
// We want to make <:index> depend on <Form>, i.e. <:index> is the target
|
// We want to make <:index> depend on <Form>, i.e. <:index> is the target
|
||||||
target := getParamsIssue(ctx)
|
target := getParamsIssue(ctx)
|
||||||
|
@ -47,6 +47,8 @@ func ApplyDiffPatch(ctx *context.APIContext) {
|
|||||||
// "$ref": "#/responses/FileResponse"
|
// "$ref": "#/responses/FileResponse"
|
||||||
// "404":
|
// "404":
|
||||||
// "$ref": "#/responses/notFound"
|
// "$ref": "#/responses/notFound"
|
||||||
|
// "423":
|
||||||
|
// "$ref": "#/responses/repoArchivedError"
|
||||||
apiOpts := web.GetForm(ctx).(*api.ApplyDiffPatchFileOptions)
|
apiOpts := web.GetForm(ctx).(*api.ApplyDiffPatchFileOptions)
|
||||||
|
|
||||||
opts := &files.ApplyDiffPatchOptions{
|
opts := &files.ApplyDiffPatchOptions{
|
||||||
|
@ -282,6 +282,8 @@ func CreatePullRequest(ctx *context.APIContext) {
|
|||||||
// "$ref": "#/responses/error"
|
// "$ref": "#/responses/error"
|
||||||
// "422":
|
// "422":
|
||||||
// "$ref": "#/responses/validationError"
|
// "$ref": "#/responses/validationError"
|
||||||
|
// "423":
|
||||||
|
// "$ref": "#/responses/repoArchivedError"
|
||||||
|
|
||||||
form := *web.GetForm(ctx).(*api.CreatePullRequestOption)
|
form := *web.GetForm(ctx).(*api.CreatePullRequestOption)
|
||||||
if form.Head == form.Base {
|
if form.Head == form.Base {
|
||||||
@ -741,6 +743,8 @@ func MergePullRequest(ctx *context.APIContext) {
|
|||||||
// "$ref": "#/responses/empty"
|
// "$ref": "#/responses/empty"
|
||||||
// "409":
|
// "409":
|
||||||
// "$ref": "#/responses/error"
|
// "$ref": "#/responses/error"
|
||||||
|
// "423":
|
||||||
|
// "$ref": "#/responses/repoArchivedError"
|
||||||
|
|
||||||
form := web.GetForm(ctx).(*forms.MergePullRequestForm)
|
form := web.GetForm(ctx).(*forms.MergePullRequestForm)
|
||||||
|
|
||||||
@ -1196,6 +1200,8 @@ func CancelScheduledAutoMerge(ctx *context.APIContext) {
|
|||||||
// "$ref": "#/responses/forbidden"
|
// "$ref": "#/responses/forbidden"
|
||||||
// "404":
|
// "404":
|
||||||
// "$ref": "#/responses/notFound"
|
// "$ref": "#/responses/notFound"
|
||||||
|
// "423":
|
||||||
|
// "$ref": "#/responses/repoArchivedError"
|
||||||
|
|
||||||
pullIndex := ctx.ParamsInt64(":index")
|
pullIndex := ctx.ParamsInt64(":index")
|
||||||
pull, err := issues_model.GetPullRequestByIndex(ctx, ctx.Repo.Repository.ID, pullIndex)
|
pull, err := issues_model.GetPullRequestByIndex(ctx, ctx.Repo.Repository.ID, pullIndex)
|
||||||
|
@ -184,6 +184,8 @@ func CreateTag(ctx *context.APIContext) {
|
|||||||
// "$ref": "#/responses/empty"
|
// "$ref": "#/responses/empty"
|
||||||
// "409":
|
// "409":
|
||||||
// "$ref": "#/responses/conflict"
|
// "$ref": "#/responses/conflict"
|
||||||
|
// "423":
|
||||||
|
// "$ref": "#/responses/repoArchivedError"
|
||||||
form := web.GetForm(ctx).(*api.CreateTagOption)
|
form := web.GetForm(ctx).(*api.CreateTagOption)
|
||||||
|
|
||||||
// If target is not provided use default branch
|
// If target is not provided use default branch
|
||||||
@ -251,6 +253,8 @@ func DeleteTag(ctx *context.APIContext) {
|
|||||||
// "$ref": "#/responses/empty"
|
// "$ref": "#/responses/empty"
|
||||||
// "409":
|
// "409":
|
||||||
// "$ref": "#/responses/conflict"
|
// "$ref": "#/responses/conflict"
|
||||||
|
// "423":
|
||||||
|
// "$ref": "#/responses/repoArchivedError"
|
||||||
tagName := ctx.Params("*")
|
tagName := ctx.Params("*")
|
||||||
|
|
||||||
tag, err := repo_model.GetRelease(ctx.Repo.Repository.ID, tagName)
|
tag, err := repo_model.GetRelease(ctx.Repo.Repository.ID, tagName)
|
||||||
|
@ -52,6 +52,8 @@ func NewWikiPage(ctx *context.APIContext) {
|
|||||||
// "$ref": "#/responses/forbidden"
|
// "$ref": "#/responses/forbidden"
|
||||||
// "404":
|
// "404":
|
||||||
// "$ref": "#/responses/notFound"
|
// "$ref": "#/responses/notFound"
|
||||||
|
// "423":
|
||||||
|
// "$ref": "#/responses/repoArchivedError"
|
||||||
|
|
||||||
form := web.GetForm(ctx).(*api.CreateWikiPageOptions)
|
form := web.GetForm(ctx).(*api.CreateWikiPageOptions)
|
||||||
|
|
||||||
@ -128,6 +130,8 @@ func EditWikiPage(ctx *context.APIContext) {
|
|||||||
// "$ref": "#/responses/forbidden"
|
// "$ref": "#/responses/forbidden"
|
||||||
// "404":
|
// "404":
|
||||||
// "$ref": "#/responses/notFound"
|
// "$ref": "#/responses/notFound"
|
||||||
|
// "423":
|
||||||
|
// "$ref": "#/responses/repoArchivedError"
|
||||||
|
|
||||||
form := web.GetForm(ctx).(*api.CreateWikiPageOptions)
|
form := web.GetForm(ctx).(*api.CreateWikiPageOptions)
|
||||||
|
|
||||||
@ -234,6 +238,8 @@ func DeleteWikiPage(ctx *context.APIContext) {
|
|||||||
// "$ref": "#/responses/forbidden"
|
// "$ref": "#/responses/forbidden"
|
||||||
// "404":
|
// "404":
|
||||||
// "$ref": "#/responses/notFound"
|
// "$ref": "#/responses/notFound"
|
||||||
|
// "423":
|
||||||
|
// "$ref": "#/responses/repoArchivedError"
|
||||||
|
|
||||||
wikiName := wiki_service.WebPathFromRequest(ctx.PathParamRaw(":pageName"))
|
wikiName := wiki_service.WebPathFromRequest(ctx.PathParamRaw(":pageName"))
|
||||||
|
|
||||||
|
@ -285,7 +285,7 @@ func DeleteProtectedBranchRulePost(ctx *context.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := git_model.DeleteProtectedBranch(ctx, ctx.Repo.Repository.ID, ruleID); err != nil {
|
if err := git_model.DeleteProtectedBranch(ctx, ctx.Repo.Repository, ruleID); err != nil {
|
||||||
ctx.Flash.Error(ctx.Tr("repo.settings.remove_protected_branch_failed", rule.RuleName))
|
ctx.Flash.Error(ctx.Tr("repo.settings.remove_protected_branch_failed", rule.RuleName))
|
||||||
ctx.JSONRedirect(fmt.Sprintf("%s/settings/branches", ctx.Repo.RepoLink))
|
ctx.JSONRedirect(fmt.Sprintf("%s/settings/branches", ctx.Repo.RepoLink))
|
||||||
return
|
return
|
||||||
|
@ -25,6 +25,16 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func createTag(ctx context.Context, gitRepo *git.Repository, rel *repo_model.Release, msg string) (bool, error) {
|
func createTag(ctx context.Context, gitRepo *git.Repository, rel *repo_model.Release, msg string) (bool, error) {
|
||||||
|
err := rel.LoadAttributes(ctx)
|
||||||
|
if err != nil {
|
||||||
|
return false, err
|
||||||
|
}
|
||||||
|
|
||||||
|
err = rel.Repo.MustNotBeArchived()
|
||||||
|
if err != nil {
|
||||||
|
return false, err
|
||||||
|
}
|
||||||
|
|
||||||
var created bool
|
var created bool
|
||||||
// Only actual create when publish.
|
// Only actual create when publish.
|
||||||
if !rel.IsDraft {
|
if !rel.IsDraft {
|
||||||
|
@ -29,6 +29,11 @@ import (
|
|||||||
|
|
||||||
// CreateNewBranch creates a new repository branch
|
// CreateNewBranch creates a new repository branch
|
||||||
func CreateNewBranch(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, oldBranchName, branchName string) (err error) {
|
func CreateNewBranch(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, oldBranchName, branchName string) (err error) {
|
||||||
|
err = repo.MustNotBeArchived()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
// Check if branch name can be used
|
// Check if branch name can be used
|
||||||
if err := checkBranchName(ctx, repo, branchName); err != nil {
|
if err := checkBranchName(ctx, repo, branchName); err != nil {
|
||||||
return err
|
return err
|
||||||
@ -246,6 +251,11 @@ func checkBranchName(ctx context.Context, repo *repo_model.Repository, name stri
|
|||||||
|
|
||||||
// CreateNewBranchFromCommit creates a new repository branch
|
// CreateNewBranchFromCommit creates a new repository branch
|
||||||
func CreateNewBranchFromCommit(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, commit, branchName string) (err error) {
|
func CreateNewBranchFromCommit(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, commit, branchName string) (err error) {
|
||||||
|
err = repo.MustNotBeArchived()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
// Check if branch name can be used
|
// Check if branch name can be used
|
||||||
if err := checkBranchName(ctx, repo, branchName); err != nil {
|
if err := checkBranchName(ctx, repo, branchName); err != nil {
|
||||||
return err
|
return err
|
||||||
@ -267,6 +277,11 @@ func CreateNewBranchFromCommit(ctx context.Context, doer *user_model.User, repo
|
|||||||
|
|
||||||
// RenameBranch rename a branch
|
// RenameBranch rename a branch
|
||||||
func RenameBranch(ctx context.Context, repo *repo_model.Repository, doer *user_model.User, gitRepo *git.Repository, from, to string) (string, error) {
|
func RenameBranch(ctx context.Context, repo *repo_model.Repository, doer *user_model.User, gitRepo *git.Repository, from, to string) (string, error) {
|
||||||
|
err := repo.MustNotBeArchived()
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
if from == to {
|
if from == to {
|
||||||
return "target_exist", nil
|
return "target_exist", nil
|
||||||
}
|
}
|
||||||
@ -315,6 +330,11 @@ var (
|
|||||||
|
|
||||||
// DeleteBranch delete branch
|
// DeleteBranch delete branch
|
||||||
func DeleteBranch(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, gitRepo *git.Repository, branchName string) error {
|
func DeleteBranch(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, gitRepo *git.Repository, branchName string) error {
|
||||||
|
err := repo.MustNotBeArchived()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
if branchName == repo.DefaultBranch {
|
if branchName == repo.DefaultBranch {
|
||||||
return ErrBranchIsDefault
|
return ErrBranchIsDefault
|
||||||
}
|
}
|
||||||
|
@ -95,6 +95,11 @@ func (opts *ApplyDiffPatchOptions) Validate(ctx context.Context, repo *repo_mode
|
|||||||
|
|
||||||
// ApplyDiffPatch applies a patch to the given repository
|
// ApplyDiffPatch applies a patch to the given repository
|
||||||
func ApplyDiffPatch(ctx context.Context, repo *repo_model.Repository, doer *user_model.User, opts *ApplyDiffPatchOptions) (*structs.FileResponse, error) {
|
func ApplyDiffPatch(ctx context.Context, repo *repo_model.Repository, doer *user_model.User, opts *ApplyDiffPatchOptions) (*structs.FileResponse, error) {
|
||||||
|
err := repo.MustNotBeArchived()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
if err := opts.Validate(ctx, repo, doer); err != nil {
|
if err := opts.Validate(ctx, repo, doer); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -65,6 +65,11 @@ type RepoFileOptions struct {
|
|||||||
|
|
||||||
// ChangeRepoFiles adds, updates or removes multiple files in the given repository
|
// ChangeRepoFiles adds, updates or removes multiple files in the given repository
|
||||||
func ChangeRepoFiles(ctx context.Context, repo *repo_model.Repository, doer *user_model.User, opts *ChangeRepoFilesOptions) (*structs.FilesResponse, error) {
|
func ChangeRepoFiles(ctx context.Context, repo *repo_model.Repository, doer *user_model.User, opts *ChangeRepoFilesOptions) (*structs.FilesResponse, error) {
|
||||||
|
err := repo.MustNotBeArchived()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
// If no branch name is set, assume default branch
|
// If no branch name is set, assume default branch
|
||||||
if opts.OldBranch == "" {
|
if opts.OldBranch == "" {
|
||||||
opts.OldBranch = repo.DefaultBranch
|
opts.OldBranch = repo.DefaultBranch
|
||||||
|
@ -170,7 +170,7 @@ func (d *DingtalkPayload) Repository(p *api.RepositoryPayload) (api.Payloader, e
|
|||||||
func (d *DingtalkPayload) Release(p *api.ReleasePayload) (api.Payloader, error) {
|
func (d *DingtalkPayload) Release(p *api.ReleasePayload) (api.Payloader, error) {
|
||||||
text, _ := getReleasePayloadInfo(p, noneLinkFormatter, true)
|
text, _ := getReleasePayloadInfo(p, noneLinkFormatter, true)
|
||||||
|
|
||||||
return createDingtalkPayload(text, text, "view release", p.Release.URL), nil
|
return createDingtalkPayload(text, text, "view release", p.Release.HTMLURL), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func createDingtalkPayload(title, text, singleTitle, singleURL string) *DingtalkPayload {
|
func createDingtalkPayload(title, text, singleTitle, singleURL string) *DingtalkPayload {
|
||||||
|
@ -238,7 +238,7 @@ func TestDingTalkPayload(t *testing.T) {
|
|||||||
assert.Equal(t, "[test/repo] Release created: v1.0 by user1", pl.(*DingtalkPayload).ActionCard.Text)
|
assert.Equal(t, "[test/repo] Release created: v1.0 by user1", pl.(*DingtalkPayload).ActionCard.Text)
|
||||||
assert.Equal(t, "[test/repo] Release created: v1.0 by user1", pl.(*DingtalkPayload).ActionCard.Title)
|
assert.Equal(t, "[test/repo] Release created: v1.0 by user1", pl.(*DingtalkPayload).ActionCard.Title)
|
||||||
assert.Equal(t, "view release", pl.(*DingtalkPayload).ActionCard.SingleTitle)
|
assert.Equal(t, "view release", pl.(*DingtalkPayload).ActionCard.SingleTitle)
|
||||||
assert.Equal(t, "http://localhost:3000/api/v1/repos/test/repo/releases/2", parseRealSingleURL(pl.(*DingtalkPayload).ActionCard.SingleURL))
|
assert.Equal(t, "http://localhost:3000/test/repo/releases/tag/v1.0", parseRealSingleURL(pl.(*DingtalkPayload).ActionCard.SingleURL))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ func (d *DiscordPayload) Wiki(p *api.WikiPayload) (api.Payloader, error) {
|
|||||||
func (d *DiscordPayload) Release(p *api.ReleasePayload) (api.Payloader, error) {
|
func (d *DiscordPayload) Release(p *api.ReleasePayload) (api.Payloader, error) {
|
||||||
text, color := getReleasePayloadInfo(p, noneLinkFormatter, false)
|
text, color := getReleasePayloadInfo(p, noneLinkFormatter, false)
|
||||||
|
|
||||||
return d.createPayload(p.Sender, text, p.Release.Note, p.Release.URL, color), nil
|
return d.createPayload(p.Sender, text, p.Release.Note, p.Release.HTMLURL, color), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetDiscordPayload converts a discord webhook into a DiscordPayload
|
// GetDiscordPayload converts a discord webhook into a DiscordPayload
|
||||||
|
@ -270,7 +270,7 @@ func TestDiscordPayload(t *testing.T) {
|
|||||||
assert.Len(t, pl.(*DiscordPayload).Embeds, 1)
|
assert.Len(t, pl.(*DiscordPayload).Embeds, 1)
|
||||||
assert.Equal(t, "[test/repo] Release created: v1.0", pl.(*DiscordPayload).Embeds[0].Title)
|
assert.Equal(t, "[test/repo] Release created: v1.0", pl.(*DiscordPayload).Embeds[0].Title)
|
||||||
assert.Equal(t, "Note of first stable release", pl.(*DiscordPayload).Embeds[0].Description)
|
assert.Equal(t, "Note of first stable release", pl.(*DiscordPayload).Embeds[0].Description)
|
||||||
assert.Equal(t, "http://localhost:3000/api/v1/repos/test/repo/releases/2", pl.(*DiscordPayload).Embeds[0].URL)
|
assert.Equal(t, "http://localhost:3000/test/repo/releases/tag/v1.0", pl.(*DiscordPayload).Embeds[0].URL)
|
||||||
assert.Equal(t, p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.Name)
|
assert.Equal(t, p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.Name)
|
||||||
assert.Equal(t, setting.AppURL+p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.URL)
|
assert.Equal(t, setting.AppURL+p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.URL)
|
||||||
assert.Equal(t, p.Sender.AvatarURL, pl.(*DiscordPayload).Embeds[0].Author.IconURL)
|
assert.Equal(t, p.Sender.AvatarURL, pl.(*DiscordPayload).Embeds[0].Author.IconURL)
|
||||||
|
@ -240,7 +240,7 @@ func pullReleaseTestPayload() *api.ReleasePayload {
|
|||||||
Target: "master",
|
Target: "master",
|
||||||
Title: "First stable release",
|
Title: "First stable release",
|
||||||
Note: "Note of first stable release",
|
Note: "Note of first stable release",
|
||||||
URL: "http://localhost:3000/api/v1/repos/test/repo/releases/2",
|
HTMLURL: "http://localhost:3000/test/repo/releases/tag/v1.0",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -177,7 +177,7 @@ func (m *MatrixPayload) PullRequest(p *api.PullRequestPayload) (api.Payloader, e
|
|||||||
func (m *MatrixPayload) Review(p *api.PullRequestPayload, event webhook_module.HookEventType) (api.Payloader, error) {
|
func (m *MatrixPayload) Review(p *api.PullRequestPayload, event webhook_module.HookEventType) (api.Payloader, error) {
|
||||||
senderLink := MatrixLinkFormatter(setting.AppURL+url.PathEscape(p.Sender.UserName), p.Sender.UserName)
|
senderLink := MatrixLinkFormatter(setting.AppURL+url.PathEscape(p.Sender.UserName), p.Sender.UserName)
|
||||||
title := fmt.Sprintf("#%d %s", p.Index, p.PullRequest.Title)
|
title := fmt.Sprintf("#%d %s", p.Index, p.PullRequest.Title)
|
||||||
titleLink := MatrixLinkFormatter(p.PullRequest.URL, title)
|
titleLink := MatrixLinkFormatter(p.PullRequest.HTMLURL, title)
|
||||||
repoLink := MatrixLinkFormatter(p.Repository.HTMLURL, p.Repository.FullName)
|
repoLink := MatrixLinkFormatter(p.Repository.HTMLURL, p.Repository.FullName)
|
||||||
var text string
|
var text string
|
||||||
|
|
||||||
|
@ -290,7 +290,7 @@ func (m *MSTeamsPayload) Release(p *api.ReleasePayload) (api.Payloader, error) {
|
|||||||
p.Sender,
|
p.Sender,
|
||||||
title,
|
title,
|
||||||
"",
|
"",
|
||||||
p.Release.URL,
|
p.Release.HTMLURL,
|
||||||
color,
|
color,
|
||||||
&MSTeamsFact{"Tag:", p.Release.TagName},
|
&MSTeamsFact{"Tag:", p.Release.TagName},
|
||||||
), nil
|
), nil
|
||||||
|
@ -429,7 +429,7 @@ func TestMSTeamsPayload(t *testing.T) {
|
|||||||
}
|
}
|
||||||
assert.Len(t, pl.(*MSTeamsPayload).PotentialAction, 1)
|
assert.Len(t, pl.(*MSTeamsPayload).PotentialAction, 1)
|
||||||
assert.Len(t, pl.(*MSTeamsPayload).PotentialAction[0].Targets, 1)
|
assert.Len(t, pl.(*MSTeamsPayload).PotentialAction[0].Targets, 1)
|
||||||
assert.Equal(t, "http://localhost:3000/api/v1/repos/test/repo/releases/2", pl.(*MSTeamsPayload).PotentialAction[0].Targets[0].URI)
|
assert.Equal(t, "http://localhost:3000/test/repo/releases/tag/v1.0", pl.(*MSTeamsPayload).PotentialAction[0].Targets[0].URI)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@ func (s *SlackPayload) PullRequest(p *api.PullRequestPayload) (api.Payloader, er
|
|||||||
attachments = append(attachments, SlackAttachment{
|
attachments = append(attachments, SlackAttachment{
|
||||||
Color: fmt.Sprintf("%x", color),
|
Color: fmt.Sprintf("%x", color),
|
||||||
Title: issueTitle,
|
Title: issueTitle,
|
||||||
TitleLink: p.PullRequest.URL,
|
TitleLink: p.PullRequest.HTMLURL,
|
||||||
Text: attachmentText,
|
Text: attachmentText,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -79,6 +79,11 @@ func prepareGitPath(gitRepo *git.Repository, wikiPath WebPath) (bool, string, er
|
|||||||
|
|
||||||
// updateWikiPage adds a new page or edits an existing page in repository wiki.
|
// updateWikiPage adds a new page or edits an existing page in repository wiki.
|
||||||
func updateWikiPage(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, oldWikiName, newWikiName WebPath, content, message string, isNew bool) (err error) {
|
func updateWikiPage(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, oldWikiName, newWikiName WebPath, content, message string, isNew bool) (err error) {
|
||||||
|
err = repo.MustNotBeArchived()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
if err = validateWebPath(newWikiName); err != nil {
|
if err = validateWebPath(newWikiName); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -238,6 +243,11 @@ func EditWikiPage(ctx context.Context, doer *user_model.User, repo *repo_model.R
|
|||||||
|
|
||||||
// DeleteWikiPage deletes a wiki page identified by its path.
|
// DeleteWikiPage deletes a wiki page identified by its path.
|
||||||
func DeleteWikiPage(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, wikiName WebPath) (err error) {
|
func DeleteWikiPage(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, wikiName WebPath) (err error) {
|
||||||
|
err = repo.MustNotBeArchived()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
wikiWorkingPool.CheckIn(fmt.Sprint(repo.ID))
|
wikiWorkingPool.CheckIn(fmt.Sprint(repo.ID))
|
||||||
defer wikiWorkingPool.CheckOut(fmt.Sprint(repo.ID))
|
defer wikiWorkingPool.CheckOut(fmt.Sprint(repo.ID))
|
||||||
|
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
<div class="ui dropdown type jump item gt-mr-0">
|
<div class="ui dropdown type jump item gt-mr-0">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.locale.Tr "repo.issues.filter_sort"}}
|
{{.locale.Tr "repo.issues.filter_sort"}}
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
||||||
</span>
|
</span>
|
||||||
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<a class="{{if or (eq .SortType "oldest") (not .SortType)}}active {{end}}item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a>
|
<a class="{{if or (eq .SortType "oldest") (not .SortType)}}active {{end}}item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a>
|
||||||
<a class="{{if eq .SortType "newest"}}active {{end}}item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.latest"}}</a>
|
<a class="{{if eq .SortType "newest"}}active {{end}}item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.latest"}}</a>
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
<div class="ui dropdown type jump item gt-mr-0">
|
<div class="ui dropdown type jump item gt-mr-0">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.locale.Tr "repo.issues.filter_sort"}}
|
{{.locale.Tr "repo.issues.filter_sort"}}
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
||||||
</span>
|
</span>
|
||||||
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<a class="{{if or (eq .SortType "email") (not .SortType)}}active {{end}}item" href="{{$.Link}}?sort=email&q={{$.Keyword}}">{{.locale.Tr "admin.emails.filter_sort.email"}}</a>
|
<a class="{{if or (eq .SortType "email") (not .SortType)}}active {{end}}item" href="{{$.Link}}?sort=email&q={{$.Keyword}}">{{.locale.Tr "admin.emails.filter_sort.email"}}</a>
|
||||||
<a class="{{if eq .SortType "reverseemail"}}active {{end}}item" href="{{$.Link}}?sort=reverseemail&q={{$.Keyword}}">{{.locale.Tr "admin.emails.filter_sort.email_reverse"}}</a>
|
<a class="{{if eq .SortType "reverseemail"}}active {{end}}item" href="{{$.Link}}?sort=reverseemail&q={{$.Keyword}}">{{.locale.Tr "admin.emails.filter_sort.email_reverse"}}</a>
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
<div class="ui dropdown type jump item gt-mr-0">
|
<div class="ui dropdown type jump item gt-mr-0">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.locale.Tr "repo.issues.filter_sort"}}
|
{{.locale.Tr "repo.issues.filter_sort"}}
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
||||||
</span>
|
</span>
|
||||||
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<a class="{{if or (eq .SortType "oldest") (not .SortType)}}active {{end}}item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a>
|
<a class="{{if or (eq .SortType "oldest") (not .SortType)}}active {{end}}item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a>
|
||||||
<a class="{{if eq .SortType "newest"}}active {{end}}item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.latest"}}</a>
|
<a class="{{if eq .SortType "newest"}}active {{end}}item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.latest"}}</a>
|
||||||
|
@ -13,7 +13,8 @@
|
|||||||
<div class="ui right floated secondary filter menu">
|
<div class="ui right floated secondary filter menu">
|
||||||
<!-- Status Filter Menu Item -->
|
<!-- Status Filter Menu Item -->
|
||||||
<div class="ui dropdown type jump item">
|
<div class="ui dropdown type jump item">
|
||||||
<span class="text">{{.locale.Tr "admin.users.list_status_filter.menu_text"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}</span>
|
<span class="text">{{.locale.Tr "admin.users.list_status_filter.menu_text"}}</span>
|
||||||
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<a class="item j-reset-status-filter">{{.locale.Tr "admin.users.list_status_filter.reset"}}</a>
|
<a class="item j-reset-status-filter">{{.locale.Tr "admin.users.list_status_filter.reset"}}</a>
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
@ -37,8 +38,9 @@
|
|||||||
<!-- Sort Menu Item -->
|
<!-- Sort Menu Item -->
|
||||||
<div class="ui dropdown type jump item">
|
<div class="ui dropdown type jump item">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.locale.Tr "repo.issues.filter_sort"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
{{.locale.Tr "repo.issues.filter_sort"}}
|
||||||
</span>
|
</span>
|
||||||
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<button class="item" name="sort" value="oldest">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</button>
|
<button class="item" name="sort" value="oldest">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</button>
|
||||||
<button class="item" name="sort" value="newest">{{.locale.Tr "repo.issues.filter_sort.latest"}}</button>
|
<button class="item" name="sort" value="newest">{{.locale.Tr "repo.issues.filter_sort.latest"}}</button>
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
<div class="ui dropdown type jump item gt-mr-0">
|
<div class="ui dropdown type jump item gt-mr-0">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.locale.Tr "repo.issues.filter_sort"}}
|
{{.locale.Tr "repo.issues.filter_sort"}}
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
||||||
</span>
|
</span>
|
||||||
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<a class="{{if eq .SortType "newest"}}active {{end}}item" href="{{$.Link}}?tab={{$.TabName}}&sort=newest&q={{$.Keyword}}&language={{$.Language}}">{{.locale.Tr "repo.issues.filter_sort.latest"}}</a>
|
<a class="{{if eq .SortType "newest"}}active {{end}}item" href="{{$.Link}}?tab={{$.TabName}}&sort=newest&q={{$.Keyword}}&language={{$.Language}}">{{.locale.Tr "repo.issues.filter_sort.latest"}}</a>
|
||||||
<a class="{{if eq .SortType "oldest"}}active {{end}}item" href="{{$.Link}}?tab={{$.TabName}}&sort=oldest&q={{$.Keyword}}&language={{$.Language}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a>
|
<a class="{{if eq .SortType "oldest"}}active {{end}}item" href="{{$.Link}}?tab={{$.TabName}}&sort=oldest&q={{$.Keyword}}&language={{$.Language}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a>
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
<div class="ui dropdown type jump item gt-mr-0">
|
<div class="ui dropdown type jump item gt-mr-0">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.locale.Tr "repo.issues.filter_sort"}}
|
{{.locale.Tr "repo.issues.filter_sort"}}
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
||||||
</span>
|
</span>
|
||||||
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<a class="{{if eq .SortType "newest"}}active {{end}}item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.latest"}}</a>
|
<a class="{{if eq .SortType "newest"}}active {{end}}item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.latest"}}</a>
|
||||||
<a class="{{if eq .SortType "oldest"}}active {{end}}item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a>
|
<a class="{{if eq .SortType "oldest"}}active {{end}}item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a>
|
||||||
|
@ -33,8 +33,8 @@
|
|||||||
<div class="list-header-sort ui small dropdown type jump item">
|
<div class="list-header-sort ui small dropdown type jump item">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.locale.Tr "repo.issues.filter_sort"}}
|
{{.locale.Tr "repo.issues.filter_sort"}}
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
||||||
</span>
|
</span>
|
||||||
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<a class="{{if eq .SortType "oldest"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&sort=oldest&state={{$.State}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a>
|
<a class="{{if eq .SortType "oldest"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&sort=oldest&state={{$.State}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a>
|
||||||
<a class="{{if eq .SortType "recentupdate"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&sort=recentupdate&state={{$.State}}">{{.locale.Tr "repo.issues.filter_sort.recentupdate"}}</a>
|
<a class="{{if eq .SortType "recentupdate"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&sort=recentupdate&state={{$.State}}">{{.locale.Tr "repo.issues.filter_sort.recentupdate"}}</a>
|
||||||
|
@ -7,10 +7,8 @@
|
|||||||
<!-- Period -->
|
<!-- Period -->
|
||||||
<div class="ui floating dropdown jump filter">
|
<div class="ui floating dropdown jump filter">
|
||||||
<div class="ui basic compact button">
|
<div class="ui basic compact button">
|
||||||
<span class="text">
|
|
||||||
{{.locale.Tr "repo.activity.period.filter_label"}} <strong>{{.PeriodText}}</strong>
|
{{.locale.Tr "repo.activity.period.filter_label"}} <strong>{{.PeriodText}}</strong>
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<a class="{{if eq .Period "daily"}}active {{end}}item" href="{{$.RepoLink}}/activity/daily">{{.locale.Tr "repo.activity.period.daily"}}</a>
|
<a class="{{if eq .Period "daily"}}active {{end}}item" href="{{$.RepoLink}}/activity/daily">{{.locale.Tr "repo.activity.period.daily"}}</a>
|
||||||
|
@ -7,9 +7,7 @@
|
|||||||
<div class="gt-df gt-ac">
|
<div class="gt-df gt-ac">
|
||||||
{{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "gt-mr-2"}}
|
{{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "gt-mr-2"}}
|
||||||
<a href="{{.RepoLink}}/graph" class="ui basic small compact button">
|
<a href="{{.RepoLink}}/graph" class="ui basic small compact button">
|
||||||
<span class="text">
|
|
||||||
{{svg "octicon-git-branch"}}
|
{{svg "octicon-git-branch"}}
|
||||||
</span>
|
|
||||||
{{.locale.Tr "repo.commit_graph"}}
|
{{.locale.Tr "repo.commit_graph"}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
<div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item label-filter">
|
<div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item label-filter">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.locale.Tr "repo.issues.filter_label"}}
|
{{.locale.Tr "repo.issues.filter_label"}}
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
||||||
</span>
|
</span>
|
||||||
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<div class="ui icon search input">
|
<div class="ui icon search input">
|
||||||
<i class="icon">{{svg "octicon-search" 16}}</i>
|
<i class="icon">{{svg "octicon-search" 16}}</i>
|
||||||
@ -42,8 +42,8 @@
|
|||||||
<div class="ui {{if not (or .OpenMilestones .ClosedMilestones)}}disabled{{end}} dropdown jump item">
|
<div class="ui {{if not (or .OpenMilestones .ClosedMilestones)}}disabled{{end}} dropdown jump item">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.locale.Tr "repo.issues.filter_milestone"}}
|
{{.locale.Tr "repo.issues.filter_milestone"}}
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
||||||
</span>
|
</span>
|
||||||
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<div class="ui icon search input">
|
<div class="ui icon search input">
|
||||||
<i class="icon">{{svg "octicon-search" 16}}</i>
|
<i class="icon">{{svg "octicon-search" 16}}</i>
|
||||||
@ -80,8 +80,8 @@
|
|||||||
<div class="ui{{if not (or .OpenProjects .ClosedProjects)}} disabled{{end}} dropdown jump item">
|
<div class="ui{{if not (or .OpenProjects .ClosedProjects)}} disabled{{end}} dropdown jump item">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.locale.Tr "repo.issues.filter_project"}}
|
{{.locale.Tr "repo.issues.filter_project"}}
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
||||||
</span>
|
</span>
|
||||||
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<div class="ui icon search input">
|
<div class="ui icon search input">
|
||||||
<i class="icon">{{svg "octicon-search" 16}}</i>
|
<i class="icon">{{svg "octicon-search" 16}}</i>
|
||||||
@ -122,8 +122,8 @@
|
|||||||
>
|
>
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.locale.Tr "repo.issues.filter_poster"}}
|
{{.locale.Tr "repo.issues.filter_poster"}}
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
||||||
</span>
|
</span>
|
||||||
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<div class="ui icon search input">
|
<div class="ui icon search input">
|
||||||
<i class="icon">{{svg "octicon-search" 16}}</i>
|
<i class="icon">{{svg "octicon-search" 16}}</i>
|
||||||
@ -137,8 +137,8 @@
|
|||||||
<div class="ui {{if not .Assignees}}disabled{{end}} dropdown jump item">
|
<div class="ui {{if not .Assignees}}disabled{{end}} dropdown jump item">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.locale.Tr "repo.issues.filter_assignee"}}
|
{{.locale.Tr "repo.issues.filter_assignee"}}
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
||||||
</span>
|
</span>
|
||||||
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<div class="ui icon search input">
|
<div class="ui icon search input">
|
||||||
<i class="icon">{{svg "octicon-search" 16}}</i>
|
<i class="icon">{{svg "octicon-search" 16}}</i>
|
||||||
@ -160,8 +160,8 @@
|
|||||||
<div class="ui dropdown type jump item">
|
<div class="ui dropdown type jump item">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.locale.Tr "repo.issues.filter_type"}}
|
{{.locale.Tr "repo.issues.filter_type"}}
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
||||||
</span>
|
</span>
|
||||||
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<a class="{{if eq .ViewType "all"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type=all&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_type.all_issues"}}</a>
|
<a class="{{if eq .ViewType "all"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type=all&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_type.all_issues"}}</a>
|
||||||
<a class="{{if eq .ViewType "assigned"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type=assigned&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_type.assigned_to_you"}}</a>
|
<a class="{{if eq .ViewType "assigned"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type=assigned&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_type.assigned_to_you"}}</a>
|
||||||
@ -179,8 +179,8 @@
|
|||||||
<div class="list-header-sort ui small dropdown downward type jump item">
|
<div class="list-header-sort ui small dropdown downward type jump item">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.locale.Tr "repo.issues.filter_sort"}}
|
{{.locale.Tr "repo.issues.filter_sort"}}
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
||||||
</span>
|
</span>
|
||||||
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<a class="{{if or (eq .SortType "latest") (not .SortType)}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=latest&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_sort.latest"}}</a>
|
<a class="{{if or (eq .SortType "latest") (not .SortType)}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=latest&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_sort.latest"}}</a>
|
||||||
<a class="{{if eq .SortType "oldest"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=oldest&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a>
|
<a class="{{if eq .SortType "oldest"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=oldest&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a>
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
<h4 class="ui top attached header">
|
<h4 class="ui top attached header">
|
||||||
{{.locale.Tr "repo.issues.label_count" .NumLabels}}
|
{{.locale.Tr "repo.issues.label_count" .NumLabels}}
|
||||||
<div class="ui right">
|
<div class="ui right">
|
||||||
<div class="ui right floated secondary filter menu">
|
<div class="ui secondary menu">
|
||||||
<!-- Sort -->
|
<!-- Sort -->
|
||||||
<div class="ui dropdown type jump item">
|
<div class="item ui jump dropdown gt-py-3">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.locale.Tr "repo.issues.filter_sort"}}
|
{{.locale.Tr "repo.issues.filter_sort"}}
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
||||||
</span>
|
</span>
|
||||||
<div class="menu">
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
|
<div class="left menu">
|
||||||
<a class="{{if or (eq .SortType "alphabetically") (not .SortType)}}active {{end}}item" href="{{$.Link}}?sort=alphabetically&state={{$.State}}">{{.locale.Tr "repo.issues.label.filter_sort.alphabetically"}}</a>
|
<a class="{{if or (eq .SortType "alphabetically") (not .SortType)}}active {{end}}item" href="{{$.Link}}?sort=alphabetically&state={{$.State}}">{{.locale.Tr "repo.issues.label.filter_sort.alphabetically"}}</a>
|
||||||
<a class="{{if eq .SortType "reversealphabetically"}}active {{end}}item" href="{{$.Link}}?sort=reversealphabetically&state={{$.State}}">{{.locale.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a>
|
<a class="{{if eq .SortType "reversealphabetically"}}active {{end}}item" href="{{$.Link}}?sort=reversealphabetically&state={{$.State}}">{{.locale.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a>
|
||||||
<a class="{{if eq .SortType "leastissues"}}active {{end}}item" href="{{$.Link}}?sort=leastissues&state={{$.State}}">{{.locale.Tr "repo.milestones.filter_sort.least_issues"}}</a>
|
<a class="{{if eq .SortType "leastissues"}}active {{end}}item" href="{{$.Link}}?sort=leastissues&state={{$.State}}">{{.locale.Tr "repo.milestones.filter_sort.least_issues"}}</a>
|
||||||
|
@ -54,8 +54,8 @@
|
|||||||
<div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item">
|
<div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.locale.Tr "repo.issues.action_label"}}
|
{{.locale.Tr "repo.issues.action_label"}}
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
||||||
</span>
|
</span>
|
||||||
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<div class="item issue-action" data-action="clear" data-url="{{$.RepoLink}}/issues/labels">
|
<div class="item issue-action" data-action="clear" data-url="{{$.RepoLink}}/issues/labels">
|
||||||
{{.locale.Tr "repo.issues.new.clear_labels"}}
|
{{.locale.Tr "repo.issues.new.clear_labels"}}
|
||||||
@ -78,8 +78,8 @@
|
|||||||
<div class="ui {{if not (or .OpenMilestones .ClosedMilestones)}}disabled{{end}} dropdown jump item">
|
<div class="ui {{if not (or .OpenMilestones .ClosedMilestones)}}disabled{{end}} dropdown jump item">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.locale.Tr "repo.issues.action_milestone"}}
|
{{.locale.Tr "repo.issues.action_milestone"}}
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
||||||
</span>
|
</span>
|
||||||
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<div class="item issue-action" data-element-id="0" data-url="{{$.Link}}/milestone">
|
<div class="item issue-action" data-element-id="0" data-url="{{$.Link}}/milestone">
|
||||||
{{.locale.Tr "repo.issues.action_milestone_no_select"}}
|
{{.locale.Tr "repo.issues.action_milestone_no_select"}}
|
||||||
@ -109,8 +109,8 @@
|
|||||||
<div class="ui{{if not (or .OpenProjects .ClosedProjects)}} disabled{{end}} dropdown jump item">
|
<div class="ui{{if not (or .OpenProjects .ClosedProjects)}} disabled{{end}} dropdown jump item">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.locale.Tr "repo.project_board"}}
|
{{.locale.Tr "repo.project_board"}}
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
||||||
</span>
|
</span>
|
||||||
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<div class="item issue-action" data-element-id="0" data-url="{{$.Link}}/projects">
|
<div class="item issue-action" data-element-id="0" data-url="{{$.Link}}/projects">
|
||||||
{{.locale.Tr "repo.issues.new.clear_projects"}}
|
{{.locale.Tr "repo.issues.new.clear_projects"}}
|
||||||
@ -144,8 +144,8 @@
|
|||||||
<div class="ui {{if not .Assignees}}disabled{{end}} dropdown jump item">
|
<div class="ui {{if not .Assignees}}disabled{{end}} dropdown jump item">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.locale.Tr "repo.issues.action_assignee"}}
|
{{.locale.Tr "repo.issues.action_assignee"}}
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
||||||
</span>
|
</span>
|
||||||
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<div class="item issue-action" data-action="clear" data-url="{{$.Link}}/assignee">
|
<div class="item issue-action" data-action="clear" data-url="{{$.Link}}/assignee">
|
||||||
{{.locale.Tr "repo.issues.new.clear_assignees"}}
|
{{.locale.Tr "repo.issues.new.clear_assignees"}}
|
||||||
|
@ -37,8 +37,8 @@
|
|||||||
<div class="list-header-sort ui small dropdown type jump item">
|
<div class="list-header-sort ui small dropdown type jump item">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.locale.Tr "repo.issues.filter_sort"}}
|
{{.locale.Tr "repo.issues.filter_sort"}}
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
||||||
</span>
|
</span>
|
||||||
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<a class="{{if or (eq .SortType "closestduedate") (not .SortType)}}active {{end}}item" href="{{$.Link}}?sort=closestduedate&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.milestones.filter_sort.earliest_due_data"}}</a>
|
<a class="{{if or (eq .SortType "closestduedate") (not .SortType)}}active {{end}}item" href="{{$.Link}}?sort=closestduedate&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.milestones.filter_sort.earliest_due_data"}}</a>
|
||||||
<a class="{{if eq .SortType "furthestduedate"}}active {{end}}item" href="{{$.Link}}?sort=furthestduedate&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.milestones.filter_sort.latest_due_date"}}</a>
|
<a class="{{if eq .SortType "furthestduedate"}}active {{end}}item" href="{{$.Link}}?sort=furthestduedate&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.milestones.filter_sort.latest_due_date"}}</a>
|
||||||
|
@ -73,7 +73,7 @@
|
|||||||
name="name"
|
name="name"
|
||||||
id="dialog-variable-name"
|
id="dialog-variable-name"
|
||||||
value="{{.name}}"
|
value="{{.name}}"
|
||||||
pattern="^[a-zA-Z_][a-zA-Z0-9_]*$"
|
pattern="^(?!GITEA_|GITHUB_)[a-zA-Z_][a-zA-Z0-9_]*$"
|
||||||
placeholder="{{.locale.Tr "secrets.creation.name_placeholder"}}"
|
placeholder="{{.locale.Tr "secrets.creation.name_placeholder"}}"
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
95
templates/swagger/v1_json.tmpl
generated
95
templates/swagger/v1_json.tmpl
generated
@ -3719,6 +3719,9 @@
|
|||||||
},
|
},
|
||||||
"422": {
|
"422": {
|
||||||
"$ref": "#/responses/validationError"
|
"$ref": "#/responses/validationError"
|
||||||
|
},
|
||||||
|
"423": {
|
||||||
|
"$ref": "#/responses/repoArchivedError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3857,6 +3860,9 @@
|
|||||||
},
|
},
|
||||||
"422": {
|
"422": {
|
||||||
"$ref": "#/responses/validationError"
|
"$ref": "#/responses/validationError"
|
||||||
|
},
|
||||||
|
"423": {
|
||||||
|
"$ref": "#/responses/repoArchivedError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3952,6 +3958,9 @@
|
|||||||
},
|
},
|
||||||
"409": {
|
"409": {
|
||||||
"description": "The branch with the same name already exists."
|
"description": "The branch with the same name already exists."
|
||||||
|
},
|
||||||
|
"423": {
|
||||||
|
"$ref": "#/responses/repoArchivedError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4039,6 +4048,9 @@
|
|||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"$ref": "#/responses/notFound"
|
"$ref": "#/responses/notFound"
|
||||||
|
},
|
||||||
|
"423": {
|
||||||
|
"$ref": "#/responses/repoArchivedError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4596,6 +4608,9 @@
|
|||||||
},
|
},
|
||||||
"422": {
|
"422": {
|
||||||
"$ref": "#/responses/error"
|
"$ref": "#/responses/error"
|
||||||
|
},
|
||||||
|
"423": {
|
||||||
|
"$ref": "#/responses/repoArchivedError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4703,6 +4718,9 @@
|
|||||||
},
|
},
|
||||||
"422": {
|
"422": {
|
||||||
"$ref": "#/responses/error"
|
"$ref": "#/responses/error"
|
||||||
|
},
|
||||||
|
"423": {
|
||||||
|
"$ref": "#/responses/repoArchivedError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -4761,6 +4779,9 @@
|
|||||||
},
|
},
|
||||||
"422": {
|
"422": {
|
||||||
"$ref": "#/responses/error"
|
"$ref": "#/responses/error"
|
||||||
|
},
|
||||||
|
"423": {
|
||||||
|
"$ref": "#/responses/repoArchivedError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -4819,6 +4840,9 @@
|
|||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"$ref": "#/responses/error"
|
"$ref": "#/responses/error"
|
||||||
|
},
|
||||||
|
"423": {
|
||||||
|
"$ref": "#/responses/repoArchivedError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4866,6 +4890,9 @@
|
|||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"$ref": "#/responses/notFound"
|
"$ref": "#/responses/notFound"
|
||||||
|
},
|
||||||
|
"423": {
|
||||||
|
"$ref": "#/responses/repoArchivedError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -6137,6 +6164,9 @@
|
|||||||
},
|
},
|
||||||
"422": {
|
"422": {
|
||||||
"$ref": "#/responses/validationError"
|
"$ref": "#/responses/validationError"
|
||||||
|
},
|
||||||
|
"423": {
|
||||||
|
"$ref": "#/responses/repoArchivedError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -6352,6 +6382,9 @@
|
|||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"$ref": "#/responses/notFound"
|
"$ref": "#/responses/notFound"
|
||||||
|
},
|
||||||
|
"423": {
|
||||||
|
"$ref": "#/responses/repoArchivedError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -6457,6 +6490,9 @@
|
|||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"$ref": "#/responses/error"
|
"$ref": "#/responses/error"
|
||||||
|
},
|
||||||
|
"423": {
|
||||||
|
"$ref": "#/responses/repoArchivedError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -6559,6 +6595,9 @@
|
|||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"$ref": "#/responses/error"
|
"$ref": "#/responses/error"
|
||||||
|
},
|
||||||
|
"423": {
|
||||||
|
"$ref": "#/responses/repoArchivedError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -6619,6 +6658,9 @@
|
|||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"$ref": "#/responses/error"
|
"$ref": "#/responses/error"
|
||||||
|
},
|
||||||
|
"423": {
|
||||||
|
"$ref": "#/responses/repoArchivedError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -7067,6 +7109,9 @@
|
|||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"$ref": "#/responses/error"
|
"$ref": "#/responses/error"
|
||||||
|
},
|
||||||
|
"423": {
|
||||||
|
"$ref": "#/responses/repoArchivedError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -7169,6 +7214,9 @@
|
|||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"$ref": "#/responses/error"
|
"$ref": "#/responses/error"
|
||||||
|
},
|
||||||
|
"423": {
|
||||||
|
"$ref": "#/responses/repoArchivedError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -7229,6 +7277,9 @@
|
|||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"$ref": "#/responses/error"
|
"$ref": "#/responses/error"
|
||||||
|
},
|
||||||
|
"423": {
|
||||||
|
"$ref": "#/responses/repoArchivedError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -7493,6 +7544,9 @@
|
|||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"$ref": "#/responses/notFound"
|
"$ref": "#/responses/notFound"
|
||||||
|
},
|
||||||
|
"423": {
|
||||||
|
"$ref": "#/responses/repoArchivedError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -7771,6 +7825,9 @@
|
|||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "the issue does not exist"
|
"description": "the issue does not exist"
|
||||||
|
},
|
||||||
|
"423": {
|
||||||
|
"$ref": "#/responses/repoArchivedError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -7819,6 +7876,9 @@
|
|||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"$ref": "#/responses/notFound"
|
"$ref": "#/responses/notFound"
|
||||||
|
},
|
||||||
|
"423": {
|
||||||
|
"$ref": "#/responses/repoArchivedError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -10205,6 +10265,9 @@
|
|||||||
},
|
},
|
||||||
"422": {
|
"422": {
|
||||||
"$ref": "#/responses/validationError"
|
"$ref": "#/responses/validationError"
|
||||||
|
},
|
||||||
|
"423": {
|
||||||
|
"$ref": "#/responses/repoArchivedError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -10639,6 +10702,9 @@
|
|||||||
},
|
},
|
||||||
"409": {
|
"409": {
|
||||||
"$ref": "#/responses/error"
|
"$ref": "#/responses/error"
|
||||||
|
},
|
||||||
|
"423": {
|
||||||
|
"$ref": "#/responses/repoArchivedError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -10684,6 +10750,9 @@
|
|||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"$ref": "#/responses/notFound"
|
"$ref": "#/responses/notFound"
|
||||||
|
},
|
||||||
|
"423": {
|
||||||
|
"$ref": "#/responses/repoArchivedError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -12725,6 +12794,9 @@
|
|||||||
},
|
},
|
||||||
"409": {
|
"409": {
|
||||||
"$ref": "#/responses/conflict"
|
"$ref": "#/responses/conflict"
|
||||||
|
},
|
||||||
|
"423": {
|
||||||
|
"$ref": "#/responses/repoArchivedError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -12815,6 +12887,9 @@
|
|||||||
},
|
},
|
||||||
"409": {
|
"409": {
|
||||||
"$ref": "#/responses/conflict"
|
"$ref": "#/responses/conflict"
|
||||||
|
},
|
||||||
|
"423": {
|
||||||
|
"$ref": "#/responses/repoArchivedError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -13475,6 +13550,9 @@
|
|||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"$ref": "#/responses/notFound"
|
"$ref": "#/responses/notFound"
|
||||||
|
},
|
||||||
|
"423": {
|
||||||
|
"$ref": "#/responses/repoArchivedError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -13559,6 +13637,9 @@
|
|||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"$ref": "#/responses/notFound"
|
"$ref": "#/responses/notFound"
|
||||||
|
},
|
||||||
|
"423": {
|
||||||
|
"$ref": "#/responses/repoArchivedError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -13613,6 +13694,9 @@
|
|||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"$ref": "#/responses/notFound"
|
"$ref": "#/responses/notFound"
|
||||||
|
},
|
||||||
|
"423": {
|
||||||
|
"$ref": "#/responses/repoArchivedError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -23903,6 +23987,17 @@
|
|||||||
"redirect": {
|
"redirect": {
|
||||||
"description": "APIRedirect is a redirect response"
|
"description": "APIRedirect is a redirect response"
|
||||||
},
|
},
|
||||||
|
"repoArchivedError": {
|
||||||
|
"description": "APIRepoArchivedError is an error that is raised when an archived repo should be modified",
|
||||||
|
"headers": {
|
||||||
|
"message": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"url": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"string": {
|
"string": {
|
||||||
"description": "APIString is a string response",
|
"description": "APIString is a string response",
|
||||||
"schema": {
|
"schema": {
|
||||||
|
@ -59,8 +59,8 @@
|
|||||||
<div class="list-header-sort ui dropdown type jump item">
|
<div class="list-header-sort ui dropdown type jump item">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.locale.Tr "repo.issues.filter_sort"}}
|
{{.locale.Tr "repo.issues.filter_sort"}}
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
||||||
</span>
|
</span>
|
||||||
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<a class="{{if or (eq .SortType "closestduedate") (not .SortType)}}active {{end}}item" href="{{$.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=closestduedate&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.milestones.filter_sort.closest_due_date"}}</a>
|
<a class="{{if or (eq .SortType "closestduedate") (not .SortType)}}active {{end}}item" href="{{$.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=closestduedate&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.milestones.filter_sort.closest_due_date"}}</a>
|
||||||
<a class="{{if eq .SortType "furthestduedate"}}active {{end}}item" href="{{$.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=furthestduedate&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.milestones.filter_sort.furthest_due_date"}}</a>
|
<a class="{{if eq .SortType "furthestduedate"}}active {{end}}item" href="{{$.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=furthestduedate&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.milestones.filter_sort.furthest_due_date"}}</a>
|
||||||
|
@ -53,8 +53,8 @@
|
|||||||
{{else}}
|
{{else}}
|
||||||
{{.locale.Tr "org.teams"}}
|
{{.locale.Tr "org.teams"}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
||||||
</span>
|
</span>
|
||||||
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="context user overflow menu">
|
<div class="context user overflow menu">
|
||||||
<div class="ui header">
|
<div class="ui header">
|
||||||
{{.locale.Tr "home.filter_by_team_repositories"}}
|
{{.locale.Tr "home.filter_by_team_repositories"}}
|
||||||
|
@ -33,8 +33,8 @@
|
|||||||
<div class="ui dropdown type jump item">
|
<div class="ui dropdown type jump item">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.locale.Tr "repo.issues.filter_type"}}
|
{{.locale.Tr "repo.issues.filter_type"}}
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
||||||
</span>
|
</span>
|
||||||
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<a class="{{if or (eq .IssueType "all") (not .IssueType)}}active {{end}}item" href="{{$.Link}}?sort={{$.SortType}}&state={{$.State}}&issueType=all&labels={{$.Labels}}">{{.locale.Tr "all"}}</a>
|
<a class="{{if or (eq .IssueType "all") (not .IssueType)}}active {{end}}item" href="{{$.Link}}?sort={{$.SortType}}&state={{$.State}}&issueType=all&labels={{$.Labels}}">{{.locale.Tr "all"}}</a>
|
||||||
<a class="{{if eq .IssueType "issues"}}active {{end}}item" href="{{$.Link}}?sort={{$.SortType}}&state={{$.State}}&issueType=issues&labels={{$.Labels}}">{{.locale.Tr "issues"}}</a>
|
<a class="{{if eq .IssueType "issues"}}active {{end}}item" href="{{$.Link}}?sort={{$.SortType}}&state={{$.State}}&issueType=issues&labels={{$.Labels}}">{{.locale.Tr "issues"}}</a>
|
||||||
@ -46,8 +46,8 @@
|
|||||||
<div class="ui dropdown type jump item">
|
<div class="ui dropdown type jump item">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.locale.Tr "repo.issues.filter_sort"}}
|
{{.locale.Tr "repo.issues.filter_sort"}}
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
||||||
</span>
|
</span>
|
||||||
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<a class="{{if or (eq .SortType "latest") (not .SortType)}}active {{end}}item" href="{{$.Link}}?sort=latest&state={{$.State}}&issueType={{$.IssueType}}&labels={{$.Labels}}">{{.locale.Tr "repo.issues.filter_sort.latest"}}</a>
|
<a class="{{if or (eq .SortType "latest") (not .SortType)}}active {{end}}item" href="{{$.Link}}?sort=latest&state={{$.State}}&issueType={{$.IssueType}}&labels={{$.Labels}}">{{.locale.Tr "repo.issues.filter_sort.latest"}}</a>
|
||||||
<a class="{{if eq .SortType "oldest"}}active {{end}}item" href="{{$.Link}}?sort=oldest&state={{$.State}}&issueType={{$.IssueType}}&labels={{$.Labels}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a>
|
<a class="{{if eq .SortType "oldest"}}active {{end}}item" href="{{$.Link}}?sort=oldest&state={{$.State}}&issueType={{$.IssueType}}&labels={{$.Labels}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a>
|
||||||
|
@ -219,7 +219,7 @@ func TestAPISearchIssues(t *testing.T) {
|
|||||||
token := getUserToken(t, "user2", auth_model.AccessTokenScopeReadIssue)
|
token := getUserToken(t, "user2", auth_model.AccessTokenScopeReadIssue)
|
||||||
|
|
||||||
// as this API was used in the frontend, it uses UI page size
|
// as this API was used in the frontend, it uses UI page size
|
||||||
expectedIssueCount := 17 // from the fixtures
|
expectedIssueCount := 18 // from the fixtures
|
||||||
if expectedIssueCount > setting.UI.IssuePagingNum {
|
if expectedIssueCount > setting.UI.IssuePagingNum {
|
||||||
expectedIssueCount = setting.UI.IssuePagingNum
|
expectedIssueCount = setting.UI.IssuePagingNum
|
||||||
}
|
}
|
||||||
@ -243,7 +243,7 @@ func TestAPISearchIssues(t *testing.T) {
|
|||||||
req = NewRequest(t, "GET", link.String())
|
req = NewRequest(t, "GET", link.String())
|
||||||
resp = MakeRequest(t, req, http.StatusOK)
|
resp = MakeRequest(t, req, http.StatusOK)
|
||||||
DecodeJSON(t, resp, &apiIssues)
|
DecodeJSON(t, resp, &apiIssues)
|
||||||
assert.Len(t, apiIssues, 10)
|
assert.Len(t, apiIssues, 11)
|
||||||
query.Del("since")
|
query.Del("since")
|
||||||
query.Del("before")
|
query.Del("before")
|
||||||
|
|
||||||
@ -259,15 +259,15 @@ func TestAPISearchIssues(t *testing.T) {
|
|||||||
req = NewRequest(t, "GET", link.String())
|
req = NewRequest(t, "GET", link.String())
|
||||||
resp = MakeRequest(t, req, http.StatusOK)
|
resp = MakeRequest(t, req, http.StatusOK)
|
||||||
DecodeJSON(t, resp, &apiIssues)
|
DecodeJSON(t, resp, &apiIssues)
|
||||||
assert.EqualValues(t, "19", resp.Header().Get("X-Total-Count"))
|
assert.EqualValues(t, "20", resp.Header().Get("X-Total-Count"))
|
||||||
assert.Len(t, apiIssues, 19)
|
assert.Len(t, apiIssues, 20)
|
||||||
|
|
||||||
query.Add("limit", "10")
|
query.Add("limit", "10")
|
||||||
link.RawQuery = query.Encode()
|
link.RawQuery = query.Encode()
|
||||||
req = NewRequest(t, "GET", link.String())
|
req = NewRequest(t, "GET", link.String())
|
||||||
resp = MakeRequest(t, req, http.StatusOK)
|
resp = MakeRequest(t, req, http.StatusOK)
|
||||||
DecodeJSON(t, resp, &apiIssues)
|
DecodeJSON(t, resp, &apiIssues)
|
||||||
assert.EqualValues(t, "19", resp.Header().Get("X-Total-Count"))
|
assert.EqualValues(t, "20", resp.Header().Get("X-Total-Count"))
|
||||||
assert.Len(t, apiIssues, 10)
|
assert.Len(t, apiIssues, 10)
|
||||||
|
|
||||||
query = url.Values{"assigned": {"true"}, "state": {"all"}, "token": {token}}
|
query = url.Values{"assigned": {"true"}, "state": {"all"}, "token": {token}}
|
||||||
@ -317,7 +317,7 @@ func TestAPISearchIssuesWithLabels(t *testing.T) {
|
|||||||
defer tests.PrepareTestEnv(t)()
|
defer tests.PrepareTestEnv(t)()
|
||||||
|
|
||||||
// as this API was used in the frontend, it uses UI page size
|
// as this API was used in the frontend, it uses UI page size
|
||||||
expectedIssueCount := 17 // from the fixtures
|
expectedIssueCount := 18 // from the fixtures
|
||||||
if expectedIssueCount > setting.UI.IssuePagingNum {
|
if expectedIssueCount > setting.UI.IssuePagingNum {
|
||||||
expectedIssueCount = setting.UI.IssuePagingNum
|
expectedIssueCount = setting.UI.IssuePagingNum
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ func TestNodeinfo(t *testing.T) {
|
|||||||
assert.True(t, nodeinfo.OpenRegistrations)
|
assert.True(t, nodeinfo.OpenRegistrations)
|
||||||
assert.Equal(t, "gitea", nodeinfo.Software.Name)
|
assert.Equal(t, "gitea", nodeinfo.Software.Name)
|
||||||
assert.Equal(t, 25, nodeinfo.Usage.Users.Total)
|
assert.Equal(t, 25, nodeinfo.Usage.Users.Total)
|
||||||
assert.Equal(t, 19, nodeinfo.Usage.LocalPosts)
|
assert.Equal(t, 20, nodeinfo.Usage.LocalPosts)
|
||||||
assert.Equal(t, 2, nodeinfo.Usage.LocalComments)
|
assert.Equal(t, 2, nodeinfo.Usage.LocalComments)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -356,7 +356,7 @@ func TestSearchIssues(t *testing.T) {
|
|||||||
|
|
||||||
session := loginUser(t, "user2")
|
session := loginUser(t, "user2")
|
||||||
|
|
||||||
expectedIssueCount := 17 // from the fixtures
|
expectedIssueCount := 18 // from the fixtures
|
||||||
if expectedIssueCount > setting.UI.IssuePagingNum {
|
if expectedIssueCount > setting.UI.IssuePagingNum {
|
||||||
expectedIssueCount = setting.UI.IssuePagingNum
|
expectedIssueCount = setting.UI.IssuePagingNum
|
||||||
}
|
}
|
||||||
@ -377,7 +377,7 @@ func TestSearchIssues(t *testing.T) {
|
|||||||
req = NewRequest(t, "GET", link.String())
|
req = NewRequest(t, "GET", link.String())
|
||||||
resp = session.MakeRequest(t, req, http.StatusOK)
|
resp = session.MakeRequest(t, req, http.StatusOK)
|
||||||
DecodeJSON(t, resp, &apiIssues)
|
DecodeJSON(t, resp, &apiIssues)
|
||||||
assert.Len(t, apiIssues, 10)
|
assert.Len(t, apiIssues, 11)
|
||||||
query.Del("since")
|
query.Del("since")
|
||||||
query.Del("before")
|
query.Del("before")
|
||||||
|
|
||||||
@ -393,15 +393,15 @@ func TestSearchIssues(t *testing.T) {
|
|||||||
req = NewRequest(t, "GET", link.String())
|
req = NewRequest(t, "GET", link.String())
|
||||||
resp = session.MakeRequest(t, req, http.StatusOK)
|
resp = session.MakeRequest(t, req, http.StatusOK)
|
||||||
DecodeJSON(t, resp, &apiIssues)
|
DecodeJSON(t, resp, &apiIssues)
|
||||||
assert.EqualValues(t, "19", resp.Header().Get("X-Total-Count"))
|
assert.EqualValues(t, "20", resp.Header().Get("X-Total-Count"))
|
||||||
assert.Len(t, apiIssues, 19)
|
assert.Len(t, apiIssues, 20)
|
||||||
|
|
||||||
query.Add("limit", "5")
|
query.Add("limit", "5")
|
||||||
link.RawQuery = query.Encode()
|
link.RawQuery = query.Encode()
|
||||||
req = NewRequest(t, "GET", link.String())
|
req = NewRequest(t, "GET", link.String())
|
||||||
resp = session.MakeRequest(t, req, http.StatusOK)
|
resp = session.MakeRequest(t, req, http.StatusOK)
|
||||||
DecodeJSON(t, resp, &apiIssues)
|
DecodeJSON(t, resp, &apiIssues)
|
||||||
assert.EqualValues(t, "19", resp.Header().Get("X-Total-Count"))
|
assert.EqualValues(t, "20", resp.Header().Get("X-Total-Count"))
|
||||||
assert.Len(t, apiIssues, 5)
|
assert.Len(t, apiIssues, 5)
|
||||||
|
|
||||||
query = url.Values{"assigned": {"true"}, "state": {"all"}}
|
query = url.Values{"assigned": {"true"}, "state": {"all"}}
|
||||||
@ -450,7 +450,7 @@ func TestSearchIssues(t *testing.T) {
|
|||||||
func TestSearchIssuesWithLabels(t *testing.T) {
|
func TestSearchIssuesWithLabels(t *testing.T) {
|
||||||
defer tests.PrepareTestEnv(t)()
|
defer tests.PrepareTestEnv(t)()
|
||||||
|
|
||||||
expectedIssueCount := 17 // from the fixtures
|
expectedIssueCount := 18 // from the fixtures
|
||||||
if expectedIssueCount > setting.UI.IssuePagingNum {
|
if expectedIssueCount > setting.UI.IssuePagingNum {
|
||||||
expectedIssueCount = setting.UI.IssuePagingNum
|
expectedIssueCount = setting.UI.IssuePagingNum
|
||||||
}
|
}
|
||||||
|
@ -420,7 +420,6 @@ a.silenced:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
a.label,
|
a.label,
|
||||||
.repository-menu a,
|
|
||||||
.ui.search .results a,
|
.ui.search .results a,
|
||||||
.ui .menu a,
|
.ui .menu a,
|
||||||
.ui.cards a.card,
|
.ui.cards a.card,
|
||||||
|
@ -2044,7 +2044,7 @@
|
|||||||
border: none;
|
border: none;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0 0.5em; /* make the UI look better for narrow (mobile) view */
|
padding: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2056,7 +2056,8 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 0.25em;
|
gap: 0.25em;
|
||||||
padding: 0 0.25em;
|
padding: 0 0.5em; /* make the UI look better for narrow (mobile) view */
|
||||||
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.repository .repository-summary .sub-menu .item.active {
|
.repository .repository-summary .sub-menu .item.active {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user