mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-31 14:36:47 +00:00
fix: add .forgejo/CODEOWNERS support (#8773)
Currently, the documentation mention that a CODEOWNERS file can be located in .forgejo for code owner PR review assignment, but this does not work. Add support for this location. Resolves #8746 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8773 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: John Moon <john.moon@vts-i.com> Co-committed-by: John Moon <john.moon@vts-i.com>
This commit is contained in:
parent
cc31b744d1
commit
0a444a374e
3 changed files with 159 additions and 142 deletions
|
@ -71,7 +71,7 @@ func PullRequestCodeOwnersReview(ctx context.Context, issue *issues_model.Issue,
|
|||
}
|
||||
|
||||
var rules []*issues_model.CodeOwnerRule
|
||||
for _, file := range []string{"CODEOWNERS", "docs/CODEOWNERS", ".gitea/CODEOWNERS"} {
|
||||
for _, file := range []string{"CODEOWNERS", "docs/CODEOWNERS", ".gitea/CODEOWNERS", ".forgejo/CODEOWNERS"} {
|
||||
if blob, err := commit.GetBlobByPath(file); err == nil {
|
||||
rc, size, err := blob.NewTruncatedReader(setting.UI.MaxDisplayFileSize)
|
||||
if err == nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue