Skip to content

Show Release Notification in the UI - #27058

Closed
JakobDev wants to merge 4 commits into
go-gitea:mainfrom
JakobDev:releasenotifi
Closed

Show Release Notification in the UI#27058
JakobDev wants to merge 4 commits into
go-gitea:mainfrom
JakobDev:releasenotifi

Conversation

@JakobDev

Copy link
Copy Markdown
Contributor

If a repo that you are watching creates a new Release, you get a Mail but it is not shown in the UI. This PR changed this. Now the Release Notification is shown in the UI!

The Migration will be added after the Code is reviewed.

grafik

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 13, 2023
@silverwind

silverwind commented Sep 13, 2023

Copy link
Copy Markdown
Member

Hmm, this diverges from the GitHub UI that shows releases only on the frontpage feed (which we already do). I see notifications as "things to do", but a release does not seem to fit here thematically.

@JakobDev

Copy link
Copy Markdown
Contributor Author

Hmm, this diverges from the GitHub UI that shows releases only on the frontpage

It also sends you an notification

but a release does not seem to fit here thematically.

We already sent a Mail, so we could also show it in the UI

@techknowlogick

Copy link
Copy Markdown
Member

image showing releases in notifs
@silverwind they've since added it in

@silverwind

silverwind commented Sep 13, 2023

Copy link
Copy Markdown
Member

Interesting, I never received a release notification on GH so far. Maybe it's something in my notifications config. I guess once we have that PR landed that enables filtering notifications type per repo, this will be okay to have.

@lunny

lunny commented Sep 14, 2023

Copy link
Copy Markdown
Member

I have a PR to do similar work but not finished and closed. The notification should have more types and users could have filters in future.

@lunny lunny added the topic/ui Change the appearance of the Gitea UI label Sep 14, 2023
continue
}

release, err := repo_model.GetReleaseByID(ctx, notification.ReleaseID)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's low efficiency. We need to id in () to fix the possible performance problem.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GetReleaseByID does not more than doing a Database query with the ID. It does not load other things if it's that what you mean.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can find many examples to a batch loading. Use a for loop to get all release id and then get all releases use id in () and then assign release to notification.

@JakobDev

Copy link
Copy Markdown
Contributor Author

users could have filters in future

I have already open #26865 do do exactly that. Backend and tests are ready, but I need some help on the Frontend.

@puni9869

Copy link
Copy Markdown
Member

users could have filters in future

I have already open #26865 do do exactly that. Backend and tests are ready, but I need some help on the Frontend.

I can help in UI. what we need to do.

@JakobDev

Copy link
Copy Markdown
Contributor Author

I can help in UI. what we need to do.

Thanks. The other PR has a proof of concept UI that already works, but it doesn't look good. Ideally it should look like GitHub.

@puni9869

Copy link
Copy Markdown
Member

I can help in UI. what we need to do.

Thanks. The other PR has a proof of concept UI that already works, but it doesn't look good. Ideally it should look like GitHub.

will open a pr for the ui.

Comment thread models/activities/notification.go
@lunny lunny added this to the 1.22.0 milestone Oct 8, 2023
IssueID int64 `xorm:"INDEX NOT NULL"`
CommitID string `xorm:"INDEX"`
CommentID int64
ReleaseID int64 `xorm:"INDEX"`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a migration

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Migration will be added after the Code is reviewed.

Comment thread models/activities/notification.go
Comment thread services/uinotification/notify.go Outdated
JakobDev and others added 2 commits January 12, 2024 11:51

@delvh delvh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine for me as it is.
While it probably makes sense to fix the performance bottleneck mentioned by @lunny, it's not a blocker for me.
The only blocker for me is the missing migration.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jan 17, 2024
@lunny lunny modified the milestones: 1.22.0, 1.23.0 Mar 29, 2024
@lunny lunny modified the milestones: 1.23.0, 1.24.0 Sep 7, 2024
@lunny

lunny commented Jun 20, 2025

Copy link
Copy Markdown
Member

Since this is outdated and there are so many conflicted files. This could be replaced by #34803

@lunny lunny closed this Jun 20, 2025
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Sep 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm/need 1 This PR needs approval from one additional maintainer to be merged. topic/ui Change the appearance of the Gitea UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants