Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Improve notifications to fix commit notification and support release notification#34803

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
lunny wants to merge13 commits intogo-gitea:main
base:main
Choose a base branch
Loading
fromlunny:lunny/improve_notification

Conversation

lunny
Copy link
Member

This PR improved notifications.

  • Improve repository transfer notification to use the queue rather than directly insert database records

image

image

anbraten reacted with thumbs up emoji
@lunnylunny added this to the1.25.0 milestoneJun 20, 2025
@lunnylunny added the type/enhancementAn improvement of existing functionality labelJun 20, 2025
@GiteaBotGiteaBot added the lgtm/need 2This PR needs two approvals by maintainers to be considered for merging. labelJun 20, 2025
@github-actionsgithub-actionsbot added modifies/apiThis PR adds API routes or modifies them modifies/goPull requests that update Go code modifies/templatesThis PR modifies the template files modifies/migrations labelsJun 20, 2025
@GiteaBotGiteaBot added lgtm/need 1This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2This PR needs two approvals by maintainers to be considered for merging. labelsJul 2, 2025
if ctx.IsSigned && !release.IsTag {
err = activities_model.SetReleaseReadBy(ctx, release.ID, ctx.Doer.ID)
if err != nil {
ctx.ServerError("SetReleaseReadBy", err)
Copy link
Contributor

@wxiaoguangwxiaoguangJul 3, 2025
edited
Loading

Choose a reason for hiding this comment

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

TBH I really had enough for such copy-pasteif ... err != nil { ctx.ServerError(...) }. It's difficult to read, the message mismatches, and the "return" is easy to forget.

Not really related to this PR, but why not introduce a better approach (I have proposed)

image

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Could you point me to the link for the proposed approach?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Thanks for pointing out. It's a better method than this one. But maybe it should be another PR.


updatedByIndex := schemas.NewIndex("idx_notification_updated_by", schemas.IndexType)
updatedByIndex.AddColumn("updated_by")
indices = append(indices, updatedByIndex)
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these indices well-designed and correct?

You can't just add index to every column and expect that "oh it should work".

Does database work really work that way?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

This highlights a significant design flaw in the current table structure.

In this PR, we introduced a new column, release_id, to support release-type notifications.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@wxiaoguangwxiaoguangwxiaoguang left review comments

@kerwin612kerwin612kerwin612 approved these changes

Assignees
No one assigned
Labels
lgtm/need 1This PR needs approval from one additional maintainer to be merged.modifies/apiThis PR adds API routes or modifies themmodifies/frontendmodifies/goPull requests that update Go codemodifies/migrationsmodifies/templatesThis PR modifies the template filestype/enhancementAn improvement of existing functionality
Projects
None yet
Milestone
1.25.0
Development

Successfully merging this pull request may close these issues.

4 participants
@lunny@wxiaoguang@kerwin612@GiteaBot

[8]ページ先頭

©2009-2025 Movatter.jp