13 Commits (e7322a1138ec0285091abbfc51e3ac1d47ae0fb2)

Author SHA1 Message Date
David Svantesson 25531c71a7 Mark PR reviews as stale at push and allow to dismiss stale approvals (#9532)
Fix #5997.

If a push causes the patch/diff of a PR towards target branch to change, all existing reviews for the PR will be set and shown as stale.
New branch protection option to dismiss stale approvals are added.
To show that a review is not based on the latest PR changes, an hourglass is shown
5 years ago
Lunny Xiao 43ada65571
remove unused method and rename createcommentWithNoAction (#9367) 5 years ago
David Svantesson bac4b78e09 Branch protection: Possibility to not use whitelist but allow anyone with write access (#9055)
* Possibility to not use whitelist but allow anyone with write access

* fix existing test

* rename migration function

* Try to give a better name for migration step

* Clear settings if higher level setting is not set

* Move official reviews to db instead of counting approvals each time

* migration

* fix

* fix migration

* fix migration

* Remove NOT NULL from EnableWhitelist as migration isn't possible

* Fix migration, reviews are connected to issues.

* Fix SQL query issues in GetReviewersByPullID.

* Simplify function GetReviewersByIssueID

* Handle reviewers that has been deleted

* Ensure reviews for test is in a well defined order

* Only clear and set official reviews when it is an approve or reject.
5 years ago
Lunny Xiao 2011a5b818 Extract createComment (#9125)
* Extract createComment

* fix lint

* fix lint
5 years ago
guillep2k d779deef6e Fix show single review comments in the PR page (#9143) 5 years ago
Lunny Xiao dad67cae54
Refactor pull request review (#8954)
* refactor submit review

* remove unnecessary code

* remove unused comment

* fix lint

* remove duplicated actions

* remove duplicated actions

* fix typo

* fix comment content
5 years ago
guillep2k 8282f26250 Don't send notification on pending reviews (#8943) 5 years ago
Lunny Xiao aaeef295bb
Move pull webhook to notification (#8805)
* Move pull webhook to notification

* fix fmt
5 years ago
Lunny Xiao f518fe6662
Rename HookQueue to hookQueue (#8778)
* Rename HookQueue to hookQueue

* fix lint
5 years ago
Lunny Xiao 0e7f7df3cf Move webhook to a standalone package under modules (#8747)
* Move webhook to a standalone package under modules

* fix test

* fix comments
5 years ago
John Olheiser 0a004a69cd Improve webhooks (#8583)
* Improve webhooks

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Update MSTeams and ReviewPayload comment

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Add repo.FullName to comments

Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years ago
John Olheiser 7c4c01c0fd Fix review webhooks (#8570)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years ago
Lunny Xiao eb11ca6847
Extract actions on new pull request from models to pulls service and move code.gitea.io/gitea/modules/pull to code.gitea.io/gitea/services/pull (#8218)
* extract actions on new pull request from models to pulls service

* improve code

* move code.gitea.io/gitea/modules/pull to code.gitea.io/gitea/services/pull

* fix fmt

* Rename pulls.go to pull.go
5 years ago