I am trying to create a pre-commit hook that will gather up all changes in a push and send them off to a remote server for validation.
The version of bitbucket server it is going to run on is 5.4.0
When I run this with atlas-debug -u 6.3.7 i get the following error message on a push:
[INFO] com.atlassian.bitbucket.content.NoSuchPathException: The path "foo.json" does not exist at revision "3c22f6cdefdeaef5694dcbd83c3dc6e75703f301"
[INFO] at no.skatteetaten.aurora.bitbucket.hook.BooberVerifyer.lambda$null$2(BooberVerifyer.java:42)
If you look in my repository in git that i push from:
> git show 3c22f6cdefdeaef5694dcbd83c3dc6e75703f301
commit 3c22f6cdefdeaef5694dcbd83c3dc6e75703f301 (HEAD -> master)
Author: Bjarte Stien Karlsen <firstname.lastname@example.org>
Date: Sun Oct 29 00:58:46 2017 +0200
diff --git a/foo.json b/foo.json
index b343dfb..1b67eb3 100644
@@ -1,3 +1,3 @@
- "foo" : "ban"
+ "foo" : "baz"
What am I doing wrong? Or is there another easier way of doing this?
The hook is basically going to verify that only json files can be added and they have to be valid. It would also be nice if It could show a hint in a PR if that PR is valid.
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot