pull-request-notifier-for-bitbucket
pull-request-notifier-for-bitbucket copied to clipboard
Delete buttons and notifications when a repository is deleted
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.
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