tomasbjerre / simple-bitbucket-commit-checker

Simple, and easy to use, commit checker for Atlassian Bitbucket Server
https://marketplace.atlassian.com/plugins/se.bjurr.sscc.sscc
Other
21 stars 19 forks source link

Questions Regarding Stash Event Handling #52

Closed wcott closed 8 years ago

wcott commented 8 years ago

Did you follow some kind of format for this type of plugin (event handling in stash) - like something put forth by atlassian?

I don't see any "@EventListener" specifications in your code, when a commit does happen, what's the entry point into your code?

Why did you create classes/methods for a lot of things that atlassian already had classes for? I see this in a few other commit checkers, is it to have more control over the data?

tomasbjerre commented 8 years ago

I was looking at YACC. And was following his pattern. I wantetd to explore the software and also do some things that would not be compatible with his implementation.

When a commit is pushed it is checked here: https://github.com/tomasbjerre/simple-bitbucket-commit-checker/blob/master/src/main/java/se/bjurr/sbcc/SbccPreReceiveRepositoryHook.java When a pull request is viewed it is checked here: https://github.com/tomasbjerre/simple-bitbucket-commit-checker/blob/master/src/main/java/se/bjurr/sbcc/SbccRepositoryMergeRequestCheck.java I configure those services with XML here: https://github.com/tomasbjerre/simple-bitbucket-commit-checker/blob/master/src/main/resources/atlassian-plugin.xml

I would need an example of a class in order to answer that.