Lunny Xiao and GitHub
a666829a37
Move user related model into models/user ( #17781 )
...
* Move user related model into models/user
* Fix lint for windows
* Fix windows lint
* Fix windows lint
* Move some tests in models
* Merge
2021-11-24 17:49:20 +08:00
wxiaoguang and GitHub
750a8465f5
A better go code formatter, and now make fmt can run in Windows ( #17684 )
...
* go build / format tools
* re-format imports
2021-11-17 20:34:35 +08:00
81926d61db
Decouple unit test, remove intermediate unittestbridge package ( #17662 )
...
Co-authored-by: Lunny Xiao <[email protected] >
2021-11-16 16:53:21 +08:00
wxiaoguang and GitHub
df64fa4865
Decouple unit test code from business code ( #17623 )
2021-11-12 22:36:47 +08:00
a4bfef265d
Move db related basic functions to models/db ( #17075 )
...
* Move db related basic functions to models/db
* Fix lint
* Fix lint
* Fix test
* Fix lint
* Fix lint
* revert unnecessary change
* Fix test
* Fix wrong replace string
* Use *Context
* Correct committer spelling and fix wrong replaced words
Co-authored-by: zeripath <[email protected] >
2021-09-19 19:49:59 +08:00
0ffad31b92
Notifications API: respond with updated notifications ( #17064 )
...
* notifications api: return updated notifications in response
* make generate-swagger
* openapi fix
Co-authored-by: zeripath <[email protected] >
2021-09-17 19:40:50 -04:00
ef89e75d0e
add request review from specific reviewers feature in pull request ( #10756 )
...
* add request review feature in pull request
add a way to notify specific reviewers to review like github , by add or delet a special type
review . The acton is is similar to Assign , so many code reuse the function and items of
Assignee, but the meaning and result is different.
The Permission style is is similar to github, that only writer can add a review request from Reviewers,
but the poster can recall and remove a review request after a reviwer has revied even if he don't have
Write Premission. only manager , the poster and reviewer of a request review can remove it.
The reviewers can be requested to review contain all readers for private repo , for public, contain
all writers and watchers.
The offical Review Request will block merge if Reject can block it.
an other change: add ui otify for Assignees.
Co-authored-by: guillep2k <[email protected] >
Co-authored-by: Lauris BH <[email protected] >
Signed-off-by: a1012112796 <[email protected] >
* new change
* add placeholder string
* do some changes follow #10238 to add review requests num on lists also
change icon for review requests to eye
Co-authored-by: Lauris BH <[email protected] >
2020-04-06 19:33:34 +03:00
6543 and zeripath
6baa5d7588
[API] Add notification endpoint ( #9488 )
...
* [API] Add notification endpoints
* add func GetNotifications(opts FindNotificationOptions)
* add func (n *Notification) APIFormat()
* add func (nl NotificationList) APIFormat()
* add func (n *Notification) APIURL()
* add func (nl NotificationList) APIFormat()
* add LoadAttributes functions (loadRepo, loadIssue, loadComment, loadUser)
* add func (c *Comment) APIURL()
* add func (issue *Issue) GetLastComment()
* add endpoint GET /notifications
* add endpoint PUT /notifications
* add endpoint GET /repos/{owner}/{repo}/notifications
* add endpoint PUT /repos/{owner}/{repo}/notifications
* add endpoint GET /notifications/threads/{id}
* add endpoint PATCH /notifications/threads/{id}
* Add TEST
* code format
* code format
2020-01-09 11:56:32 +00:00
Lunny Xiao and GitHub
bb6879d339
Improve notification ( #8835 )
...
* Improve notifications
* batch load user
* Update notification only when read
* Fix reorder
* fix lint
* fix test
* fix lint
* make function meaningful
* fix comment
2019-11-12 16:33:34 +08:00
Sasha Varlamov and Lunny Xiao
7ec6cddd27
Add 'mark all read' option to notifications ( #3097 )
...
* Add 'mark all read' option to notifications
Signed-off-by: Sasha Varlamov <[email protected] >
* Fix exported comment
Signed-off-by: Sasha Varlamov <[email protected] >
* Format method comments
Signed-off-by: Sasha Varlamov <[email protected] >
* Fix exported comment
Signed-off-by: Sasha Varlamov <[email protected] >
Format method comments
Signed-off-by: Sasha Varlamov <[email protected] >
Tests for reactions (#3083 )
* Unit tests for reactions
* Fix import order
Signed-off-by: Lauris Bukšis-Haberkorns <[email protected] >
Fix reaction possition when there is attachments (#3099 )
Refactor notifications swap function
* Accept change to drop beforeupdate call
* Update purge notifications error message for consistency
* Drop unnecessary check for mark all as read button
* Remove debugging comment
2017-12-07 13:52:57 +08:00
Lunny Xiao and Lauris BH
6eeadb2082
Hide unactive on explore users and some refactors ( #2741 )
...
* hide unactive on explore users and some refactors
* fix test for removed Organizations
* fix test for removed Organizations
* fix imports
* fix logic bug
* refactor the toConds
* Rename TestOrganizations to TestSearchUsers and add tests for users
* fix other tests
* fix other tests
* fix watchers tests
* fix comments and remove unused code
2017-10-24 20:36:19 +03:00
David Schneiderbauer and Lunny Xiao
d766d0c4e0
Prevent sending emails and notifications to inactive users ( #2384 )
...
* Filter inactive users before sending emails or creating browser notifications
Signed-off-by: David Schneiderbauer <[email protected] >
* fix formatting issues
Signed-off-by: David Schneiderbauer <[email protected] >
* included requested changes
Signed-off-by: David Schneiderbauer <[email protected] >
* optimized database queries
* rebasing new master and add tablenames for clarification in xorm queries
* remove escaped quotationmarks using backticks
Signed-off-by: David Schneiderbauer <[email protected] >
2017-09-16 08:18:25 +08:00
Morlinest and Lauris BH
8e61823ec4
Fix tests code to prevent some runtime errors ( #2381 )
...
* Fix tests code to prevent some runtime errors
* Reduce nesting
2017-08-28 12:17:45 +03:00
Ethan Koenig and Lunny Xiao
ceae143e78
Consistency checks for unit tests ( #853 )
2017-02-07 19:47:55 +08:00
Ethan Koenig and Lunny Xiao
2eb15f4a61
Unit tests and remove unused functions in models/notification ( #796 )
...
* Unit tests and remove unused functions in models/notification
* Read -> Unread
2017-01-30 22:21:49 +08:00