pull-request-notifier-for-bitbucket icon indicating copy to clipboard operation
pull-request-notifier-for-bitbucket copied to clipboard

Delete buttons and notifications when a repository is deleted

Open ar613 opened this issue 8 years ago • 1 comments

If I delete a repository then buttons and notifications that were associated with that repository get left behind. We end up with these errors and the only solution is to use the Configure plugin page as a system administrator to delete the stranded buttons:

2016-11-29 14:07:40,390 ERROR [http-nio-7990-exec-29] user @13Z92OPx847x9658x0 psck8w xx.xx.xx.xx "GET /rest/prnfb-admin/1.0/settings/buttons/repository/57/pullrequest/52 HTTP/1.1" s.b.prnfb.service.UserCheckService Button with project TEST_PROJECT and repo test_repo1 configured. But no such repo exists!

I think it would make sense if the repository is deleted that the buttons and notifications tied to that repository get deleted as well instead of stranded.

ar613 avatar Nov 30 '16 21:11 ar613

Note to self: Can probably be solved by triggering on ProjectDeletedEvent and RepositoryDeletedEvent. And then remove those projects/repos from the settings.

https://confluence.atlassian.com/bitbucketserver/audit-events-in-bitbucket-server-776640423.html

tomasbjerre avatar Dec 01 '16 07:12 tomasbjerre