1
1
mirror of https://github.com/go-gitea/gitea synced 2025-09-10 18:58:27 +00:00

Move organization's visibility change to danger zone. (#34814)

<img width="1185" alt="image"
src="https://github.com/user-attachments/assets/d48c4db2-df7c-43b3-986c-62e042190a51"
/>

<img width="829" alt="image"
src="https://github.com/user-attachments/assets/772b8a14-6837-41f2-9d78-9f0489ef1c7d"
/>

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Lunny Xiao
2025-08-20 20:57:42 -07:00
committed by GitHub
parent 709535c506
commit c0f24bd803
12 changed files with 189 additions and 67 deletions

View File

@@ -97,10 +97,14 @@ func getIssueIndexerData(ctx context.Context, issueID int64) (*internal.IndexerD
return nil, false, err
}
if err := issue.Repo.LoadOwner(ctx); err != nil {
return nil, false, fmt.Errorf("issue.Repo.LoadOwner: %w", err)
}
return &internal.IndexerData{
ID: issue.ID,
RepoID: issue.RepoID,
IsPublic: !issue.Repo.IsPrivate,
IsPublic: !issue.Repo.IsPrivate && issue.Repo.Owner.Visibility.IsPublic(),
Title: issue.Title,
Content: issue.Content,
Comments: comments,