Skip to content

Add config options to hide issue events #17414

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 52 commits into from
Jan 21, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
c31588d
Add config option to hide issue events
qwerty287 Oct 23, 2021
b2ac2a5
Make configurable using a list
qwerty287 Oct 24, 2021
e499016
Add docs
qwerty287 Oct 24, 2021
d14beda
Add missing newline
qwerty287 Oct 25, 2021
3d8abdc
Merge branch 'main' into hide-issue-events
qwerty287 Oct 25, 2021
7e94f54
Merge branch 'main' into hide-issue-events
qwerty287 Oct 26, 2021
141611e
Merge branch 'main' into hide-issue-events
qwerty287 Oct 28, 2021
c3f40ae
Merge branch 'main' into hide-issue-events
qwerty287 Oct 29, 2021
d17579d
Merge branch 'main' into hide-issue-events
qwerty287 Nov 1, 2021
26270f1
Merge branch 'main' into hide-issue-events
qwerty287 Nov 12, 2021
7eabacf
Fix merge issues
qwerty287 Nov 12, 2021
20e9fc9
Merge branch 'main' into hide-issue-events
qwerty287 Nov 15, 2021
3891745
Merge branch 'main' into hide-issue-events
qwerty287 Nov 16, 2021
8fa5fe4
Merge branch 'main' into hide-issue-events
qwerty287 Nov 21, 2021
2463c85
Merge branch 'main' into hide-issue-events
qwerty287 Nov 22, 2021
2f49cab
Allow changes per user settings
qwerty287 Nov 22, 2021
f0e6e02
Fix lint
qwerty287 Nov 22, 2021
395a714
Merge branch 'main' into hide-issue-events
qwerty287 Nov 23, 2021
20b6975
Merge branch 'main' into hide-issue-events
qwerty287 Nov 26, 2021
15a5ab6
Rm old docs
qwerty287 Nov 27, 2021
02ba951
Apply suggestions from code review
qwerty287 Nov 27, 2021
9afedcf
Merge branch 'main' into hide-issue-events
qwerty287 Nov 28, 2021
3cd7818
Merge branch 'main' into hide-issue-events
qwerty287 Nov 29, 2021
afc675c
Use bitsets
qwerty287 Dec 2, 2021
d2b84b5
Rm comment
qwerty287 Dec 2, 2021
e16472b
fmt
qwerty287 Dec 2, 2021
1e09a6d
Merge branch 'main' into hide-issue-events
qwerty287 Dec 2, 2021
3a76a14
Fix lint
qwerty287 Dec 2, 2021
2b22ebe
Merge branch 'main' into hide-issue-events
qwerty287 Dec 6, 2021
33276f9
Merge branch 'main' into hide-issue-events
qwerty287 Dec 8, 2021
debb758
Merge branch 'main' into hide-issue-events
qwerty287 Dec 12, 2021
ff70bdb
Use variable/constant to provide key
qwerty287 Dec 14, 2021
ec2c9de
Merge branch 'hide-issue-events' of github.com:qwerty287/gitea into h…
qwerty287 Dec 14, 2021
9f61e51
fmt
qwerty287 Dec 14, 2021
050af8b
fix lint
qwerty287 Dec 14, 2021
d5a02bc
Merge branch 'main' into hide-issue-events
qwerty287 Dec 21, 2021
b2a77c1
Merge branch 'main' into hide-issue-events
qwerty287 Dec 24, 2021
241def9
refactor
wxiaoguang Dec 25, 2021
7a48acd
Add a prefix for user setting key
wxiaoguang Dec 25, 2021
b134912
Merge pull request #2 from wxiaoguang/hide-issue-events
qwerty287 Dec 26, 2021
5a92210
Merge branch 'main' into hide-issue-events
qwerty287 Dec 26, 2021
e05fb4b
Add license comment
wxiaoguang Dec 27, 2021
110300e
Merge branch 'main' into hide-issue-events
wxiaoguang Dec 27, 2021
a9666b1
Add license comment
wxiaoguang Dec 27, 2021
8723518
Merge branch 'main' into hide-issue-events
qwerty287 Jan 7, 2022
e2de406
Merge branch 'main' into hide-issue-events
zeripath Jan 7, 2022
e6b31ad
Update services/forms/user_form_hidden_comments.go
wxiaoguang Jan 8, 2022
b8c2785
Merge branch 'main' into hide-issue-events
zeripath Jan 8, 2022
24a927a
Merge branch 'main' into hide-issue-events
qwerty287 Jan 12, 2022
eb8caac
Merge branch 'main' into hide-issue-events
qwerty287 Jan 21, 2022
dcd7041
Merge branch 'main' into hide-issue-events
6543 Jan 21, 2022
c3933ba
check len == 0
6543 Jan 21, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into hide-issue-events
  • Loading branch information
qwerty287 committed Jan 21, 2022
commit eb8caac1947ffb5a9a13b98a5e4db74108a19f57
2 changes: 1 addition & 1 deletion models/issue_comment.go
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ func (c *Comment) CodeCommentURL() string {
}

// LoadPushCommits Load push commits
func (c *Comment) LoadPushCommits() (err error) {
func (c *Comment) LoadPushCommits(ctx context.Context) (err error) {
if c.Content == "" || c.Commits != nil || c.Type != CommentTypePullRequestPush {
return nil
}
Expand Down
61 changes: 46 additions & 15 deletions templates/repo/issue/view_content/comments.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@
</div>
{{else if eq .Type 22}}
<div class="timeline-item-group">
<div class="timeline-item event" id="{{.HashTag}}">
<div class="timeline-item event">
{{if .OriginalAuthor }}
{{else}}
<a class="timeline-avatar"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
Expand Down Expand Up @@ -435,23 +435,46 @@
</span>
</div>
{{if .Content}}
<div class="timeline-item comment">
<div class="timeline-item comment" id="{{.HashTag}}">
<div class="content comment-container">
<div class="ui top attached header comment-header df ac sb">
<span class="text grey">
{{if .OriginalAuthor }}
<span class="text black">
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
{{ .OriginalAuthor }}
</span>
<span class="text grey"> {{if $.Repository.OriginalURL}}</span>
<span class="text migrate">({{$.i18n.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe }}){{end}}</span>
{{else}}
<a class="author"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.GetDisplayName}}</a>
{{end}}
<div class="comment-header-left df ac">
<span class="text grey">
{{if .OriginalAuthor }}
<span class="text black">
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
{{ .OriginalAuthor }}
</span>
<span class="text grey"> {{if $.Repository.OriginalURL}}</span>
<span class="text migrate">({{$.i18n.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe }}){{end}}</span>
{{else}}
<a class="author"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.GetDisplayName}}</a>
{{end}}

{{$.i18n.Tr "repo.issues.review.left_comment" | Safe}}
</span>
{{$.i18n.Tr "repo.issues.review.left_comment" | Safe}}
</span>
</div>
<div class="comment-header-right actions df ac">
{{if (.ShowRole.HasRole "Poster")}}
<div class="ui basic label">
{{$.i18n.Tr "repo.issues.poster"}}
</div>
{{end}}
{{if (.ShowRole.HasRole "Writer")}}
<div class="ui basic label">
{{$.i18n.Tr "repo.issues.collaborator"}}
</div>
{{end}}
{{if (.ShowRole.HasRole "Owner")}}
<div class="ui basic label">
{{$.i18n.Tr "repo.issues.owner"}}
</div>
{{end}}
{{if not $.Repository.IsArchived}}
{{template "repo/issue/view_content/add_reaction" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID)}}
{{template "repo/issue/view_content/context_menu" Dict "ctx" $ "item" . "delete" true "issue" true "diff" false "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}}
{{end}}
</div>
</div>
<div class="ui attached segment comment-body">
<div class="render-content markup">
Expand All @@ -461,10 +484,18 @@
<span class="no-content">{{$.i18n.Tr "repo.issues.no_content"}}</span>
{{end}}
</div>
<div id="comment-{{.ID}}" class="raw-content hide">{{.Content}}</div>
<div class="edit-content-zone hide" data-write="issuecomment-{{.ID}}-write" data-preview="issuecomment-{{.ID}}-preview" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-context="{{$.RepoLink}}" data-attachment-url="{{$.RepoLink}}/comments/{{.ID}}/attachments"></div>
{{if .Attachments}}
{{template "repo/issue/view_content/attachments" Dict "ctx" $ "Attachments" .Attachments "Content" .RenderedContent}}
{{end}}
</div>
{{$reactions := .Reactions.GroupByType}}
{{if $reactions}}
<div class="ui attached segment reactions">
{{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID) "Reactions" $reactions}}
</div>
{{end}}
</div>
</div>
{{end}}
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.