Skip to content
This repository has been archived by the owner on Aug 27, 2023. It is now read-only.

Option to only check branch tip #33

Open
culli opened this issue Jun 3, 2015 · 3 comments
Open

Option to only check branch tip #33

culli opened this issue Jun 3, 2015 · 3 comments

Comments

@culli
Copy link

culli commented Jun 3, 2015

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?

@tomasbjerre
Copy link
Owner

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.

@culli
Copy link
Author

culli commented Jun 4, 2015

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.

@tomasbjerre
Copy link
Owner

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants