Skip to content

Commit

Permalink
Merge branch 'main' into a1012/fix-break-act-link
Browse files Browse the repository at this point in the history
* main:
  Reorder issue templates and automatically add labels (go-gitea#18875)
  Use IterateBufferSize whilst querying repositories during adoption check (go-gitea#19140)
  Add 1.18 (go-gitea#19151)
  [skip ci] Updated translations via Crowdin
  Fix NPE `/repos/issues/search` when not signed in (go-gitea#19154)
  • Loading branch information
a1012112796 committed Mar 21, 2022
2 parents 622a594 + bfe2e3d commit 9a572e4
Show file tree
Hide file tree
Showing 10 changed files with 92 additions and 62 deletions.
71 changes: 36 additions & 35 deletions .github/ISSUE_TEMPLATE/bug-report.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Bug Report
description: Found something you weren't expecting? Report it here!
labels: kind/bug
body:
- type: markdown
attributes:
Expand All @@ -19,13 +20,48 @@ body:
6. In particular it's really important to provide pertinent logs. You must give us DEBUG level logs.
Please read https://docs.gitea.io/en-us/logging-configuration/#debugging-problems
In addition, if your problem relates to git commands set `RUN_MODE=dev` at the top of app.ini
- type: textarea
id: description
attributes:
label: Description
description: |
Please provide a description of your issue here, with a URL if you were able to reproduce the issue (see below)
If you are using a proxy or a CDN (e.g. Cloudflare) in front of Gitea, please disable the proxy/CDN fully and access Gitea directly to confirm the issue still persists without those services.
- type: input
id: gitea-ver
attributes:
label: Gitea Version
description: Gitea version (or commit reference) of your instance
validations:
required: true
- type: dropdown
id: can-reproduce
attributes:
label: Can you reproduce the bug on the Gitea demo site?
description: |
If so, please provide a URL in the Description field
URL of Gitea demo: https://try.gitea.io
options:
- "Yes"
- "No"
validations:
required: true
- type: markdown
attributes:
value: |
It's really important to provide pertinent logs
Please read https://docs.gitea.io/en-us/logging-configuration/#debugging-problems
In addition, if your problem relates to git commands set `RUN_MODE=dev` at the top of app.ini
- type: input
id: logs
attributes:
label: Log Gist
description: Please provide a gist URL of your logs, with any sensitive information (e.g. API keys) removed/hidden
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: If this issue involves the Web Interface, please provide one or more screenshots
- type: input
id: git-ver
attributes:
Expand Down Expand Up @@ -56,38 +92,3 @@ body:
- MySQL
- MSSQL
- SQLite
- type: dropdown
id: can-reproduce
attributes:
label: Can you reproduce the bug on the Gitea demo site?
description: |
If so, please provide a URL in the Description field
URL of Gitea demo: https://try.gitea.io
options:
- "Yes"
- "No"
validations:
required: true
- type: markdown
attributes:
value: |
It's really important to provide pertinent logs
Please read https://docs.gitea.io/en-us/logging-configuration/#debugging-problems
In addition, if your problem relates to git commands set `RUN_MODE=dev` at the top of app.ini
- type: input
id: logs
attributes:
label: Log Gist
description: Please provide a gist URL of your logs, with any sensitive information (e.g. API keys) removed/hidden
- type: textarea
id: description
attributes:
label: Description
description: |
Please provide a description of your issue here, with a URL if you were able to reproduce the issue (see above)
If you are using a proxy or a CDN (e.g. Cloudflare) in front of Gitea, please disable the proxy/CDN fully and access Gitea directly to confirm the issue still persists without those services.
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: If this issue involves the Web Interface, please provide one or more screenshots
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Feature Request
description: Got an idea for a feature that Gitea doesn't have currently? Submit your idea here!
labels: ["kind/feature", "kind/proposal"]
body:
- type: markdown
attributes:
Expand Down
45 changes: 23 additions & 22 deletions .github/ISSUE_TEMPLATE/ui.bug-report.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Web Interface Bug Report
description: Something doesn't look quite as it should? Report it here!
labels: ["kind/bug", "kind/ui"]
body:
- type: markdown
attributes:
Expand All @@ -18,23 +19,25 @@ body:
6. In particular it's really important to provide pertinent logs. If you are certain that this is a javascript
error, show us the javascript console. If the error appears to relate to Gitea the server you must also give us
DEBUG level logs. (See https://docs.gitea.io/en-us/logging-configuration/#debugging-problems)
- type: input
id: gitea-ver
- type: textarea
id: description
attributes:
label: Gitea Version
description: Gitea version (or commit reference) your instance is running
label: Description
description: |
Please provide a description of your issue here, with a URL if you were able to reproduce the issue (see below)
If using a proxy or a CDN (e.g. CloudFlare) in front of gitea, please disable the proxy/CDN fully and connect to gitea directly to confirm the issue still persists without those services.
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: Please provide at least 1 screenshot showing the issue.
validations:
required: true
- type: input
id: os-ver
attributes:
label: Operating System
description: The operating system you are using to access Gitea
- type: input
id: browser-ver
id: gitea-ver
attributes:
label: Browser Version
description: The browser and version that you are using to access Gitea
label: Gitea Version
description: Gitea version (or commit reference) your instance is running
validations:
required: true
- type: dropdown
Expand All @@ -49,17 +52,15 @@ body:
- "No"
validations:
required: true
- type: textarea
id: description
- type: input
id: os-ver
attributes:
label: Description
description: |
Please provide a description of your issue here, with a URL if you were able to reproduce the issue (see above)
If using a proxy or a CDN (e.g. CloudFlare) in front of gitea, please disable the proxy/CDN fully and connect to gitea directly to confirm the issue still persists without those services.
- type: textarea
id: screenshots
label: Operating System
description: The operating system you are using to access Gitea
- type: input
id: browser-ver
attributes:
label: Screenshots
description: Please provide at least 1 screenshot showing the issue.
label: Browser Version
description: The browser and version that you are using to access Gitea
validations:
required: true
3 changes: 2 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ linters:
#- gocyclo # The cyclomatic complexety of a lot of functions is too high, we should refactor those another time.
- gofmt
- misspell
#- gocritic # TODO: disabled until fixed with go 1.18
- gocritic
- bidichk
- ineffassign
- revive
Expand All @@ -23,6 +23,7 @@ linters:
fast: false

run:
go: 1.18
timeout: 10m
skip-dirs:
- node_modules
Expand Down
3 changes: 3 additions & 0 deletions options/locale/locale_es-ES.ini
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ register_helper_msg=¿Ya tienes una cuenta? ¡Inicia sesión!
social_register_helper_msg=¿Ya tienes una cuenta? ¡Enlázala!
disable_register_prompt=Registro deshabilitado. Por favor, póngase en contacto con el administrador del sitio.
disable_register_mail=Correo electrónico de confirmación de registro deshabilitado.
manual_activation_only=Póngase en contacto con el administrador del sitio para completar la activación.
remember_me=Recordar este Dispositivo
forgot_password_title=He olvidado mi contraseña
forgot_password=¿Has olvidado tu contraseña?
Expand Down Expand Up @@ -558,6 +559,8 @@ comment_type_group_assignee=Asignado
comment_type_group_title=Título
comment_type_group_branch=Rama
comment_type_group_time_tracking=Seguimiento de Tiempo
comment_type_group_deadline=Fecha límite
comment_type_group_dependency=Dependencia
privacy=Privacidad
keep_activity_private=Ocultar la actividad de la página del perfil
keep_activity_private_popup=Hace la actividad visible sólo para ti y los administradores
Expand Down
4 changes: 4 additions & 0 deletions options/locale/locale_ja-JP.ini
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ register_helper_msg=既にアカウントをお持ちですか? 今すぐサ
social_register_helper_msg=既にアカウントをお持ちですか? 今すぐ連携しましょう!
disable_register_prompt=登録は無効になっています。 サイト管理者にお問い合わせください。
disable_register_mail=登録でのメール確認は無効になっています。
manual_activation_only=アクティベーションを完了するにはサイト管理者に連絡してください。
remember_me=このデバイスで自動サインイン
forgot_password_title=パスワードを忘れた
forgot_password=パスワードをお忘れですか?
Expand Down Expand Up @@ -1374,6 +1375,9 @@ issues.lock.reason=ロックする理由
issues.lock.title=このイシューの会話をロックします。
issues.unlock.title=このイシューの会話をアンロックします。
issues.comment_on_locked=ロックされているイシューにコメントはできません。
issues.delete=削除
issues.delete.title=このイシューを削除しますか?
issues.delete.text=本当にこのイシューを削除しますか? (これはすべてのコンテンツを完全に削除します。 保存しておきたい場合は、代わりにクローズすることを検討してください)
issues.tracker=タイムトラッカー
issues.start_tracking_short=タイマー 開始
issues.start_tracking=タイムトラッキングを開始
Expand Down
1 change: 1 addition & 0 deletions options/locale/locale_pt-PT.ini
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ register_helper_msg=Já tem uma conta? Inicie a sessão agora!
social_register_helper_msg=Já tem uma conta? Associe-a agora!
disable_register_prompt=As inscrições estão desabilitadas. Entre em contacto com o administrador do sítio.
disable_register_mail=A confirmação por email da inscrição está desabilitada.
manual_activation_only=Contacte o administrador para completar a habilitação.
remember_me=Memorizar este dispositivo
forgot_password_title=Esqueci-me da senha
forgot_password=Esqueceu a sua senha?
Expand Down
6 changes: 6 additions & 0 deletions options/locale/locale_zh-TW.ini
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ register_helper_msg=已經有帳戶了?立即登入!
social_register_helper_msg=已經有帳戶了?立即連結!
disable_register_prompt=註冊功能已停用。 請聯繫您的網站管理員。
disable_register_mail=已停用註冊確認電子郵件。
manual_activation_only=請聯絡您的網站管理員以完成啟用程序。
remember_me=記得這個裝置
forgot_password_title=忘記密碼
forgot_password=忘記密碼?
Expand Down Expand Up @@ -1181,6 +1182,7 @@ projects.board.deletion_desc=刪除專案看板會將所有相關的問題移動
projects.board.color=顏色
projects.open=開啟
projects.close=關閉
projects.board.assigned_to=指派給

issues.desc=管理錯誤報告、任務和里程碑。
issues.filter_assignees=篩選負責人
Expand Down Expand Up @@ -1373,6 +1375,9 @@ issues.lock.reason=鎖定原因
issues.lock.title=鎖定此問題的對話。
issues.unlock.title=解鎖此問題的對話。
issues.comment_on_locked=您無法在已鎖定的問題上留言。
issues.delete=刪除
issues.delete.title=刪除此問題?
issues.delete.text=您真的要刪除此問題嗎?(這將會永久移除所有內容。若您還想保留,請考慮改為關閉它。)
issues.tracker=時間追蹤
issues.start_tracking_short=開始計時
issues.start_tracking=開始時間追蹤
Expand Down Expand Up @@ -1786,6 +1791,7 @@ settings.pulls.allow_rebase_merge_commit=啟用 Rebase 顯式合併提交(--no-f
settings.pulls.allow_squash_commits=啟用 Squash 合併提交
settings.pulls.allow_manual_merge=允許將合併請求標記為手動合併
settings.pulls.enable_autodetect_manual_merge=啟用自動偵測手動合併(注意:在某些特殊情況下可能發生誤判)
settings.pulls.allow_rebase_update=啟用透過 Rebase 更新合併請求分支
settings.pulls.default_delete_branch_after_merge=預設在合併後刪除合併請求分支
settings.projects_desc=啟用儲存庫專案
settings.admin_settings=管理員設定
Expand Down
13 changes: 9 additions & 4 deletions routers/api/v1/repo/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,18 +245,23 @@ func SearchIssues(ctx *context.APIContext) {
UpdatedAfterUnix: since,
}

ctxUserID := int64(0)
if ctx.IsSigned {
ctxUserID = ctx.User.ID
}

// Filter for: Created by User, Assigned to User, Mentioning User, Review of User Requested
if ctx.FormBool("created") {
issuesOpt.PosterID = ctx.User.ID
issuesOpt.PosterID = ctxUserID
}
if ctx.FormBool("assigned") {
issuesOpt.AssigneeID = ctx.User.ID
issuesOpt.AssigneeID = ctxUserID
}
if ctx.FormBool("mentioned") {
issuesOpt.MentionedID = ctx.User.ID
issuesOpt.MentionedID = ctxUserID
}
if ctx.FormBool("review_requested") {
issuesOpt.ReviewRequestedID = ctx.User.ID
issuesOpt.ReviewRequestedID = ctxUserID
}

if issues, err = models.Issues(issuesOpt); err != nil {
Expand Down
7 changes: 7 additions & 0 deletions services/repository/adopt.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,13 @@ func ListUnadoptedRepositories(query string, opts *db.ListOptions) ([]string, in
}

repoNamesToCheck = append(repoNamesToCheck, name)
if len(repoNamesToCheck) > setting.Database.IterateBufferSize {
if err = checkUnadoptedRepositories(userName, repoNamesToCheck, unadopted); err != nil {
return err
}
repoNamesToCheck = repoNamesToCheck[:0]

}
return filepath.SkipDir
}); err != nil {
return nil, 0, err
Expand Down

0 comments on commit 9a572e4

Please # to comment.