simple-bitbucket-commit-checker icon indicating copy to clipboard operation
simple-bitbucket-commit-checker copied to clipboard

Option to only check branch tip

Open culli opened this issue 10 years ago • 3 comments

I like this plugin :-) It seems like it is checking all the committed versions of a file for the "Check commit diff" and either it should just check the tip versions of the files, or there should be a configuration option.

What I want to do is check for developers using "RELEASE" in pom files and reject those commits. That works partly in that it blocks the push, but then when the developer goes back and adjusts the file to meet the rule, it still blocks the push. I would guess that if the commit was amended it could be worked around. I'd like to see this changed, what do you think?

culli avatar Jun 03 '15 21:06 culli

Would it solve your issue if there was a global option to only check the latest commit? An option that would ignore any configured checks for all commits except the latest.

Another solution is to make releases with a service user. There is already an option in the GUI to always allow service users to push.

tomasbjerre avatar Jun 04 '15 05:06 tomasbjerre

So if it only checks the latest commit, what if a developer commits a change to file A with the incorrect text, then commits a change to file B. Now he does a push, would the hook look at file A or skip it because it's not the latest commit? I don't know the internals of Git as well as I should, but I think what should be checked is just the "tip" version of each file.

I'm not familiar with the concept of a service user and not sure how to integrate that into our release process. We do what seems pretty standard, working in either forks or development branches. Then creating a pull request with a couple of reviewers and once approved merging to the master branch. Then Jenkins builds on checkin, and can push the release to QA servers.

culli avatar Jun 04 '15 13:06 culli

I'm thinking it should check also A in that case.

tomasbjerre avatar Jun 05 '15 06:06 tomasbjerre