Trigger on conditional Basis

Hey there!!

I have a Java application where we are integrating with concourse, when any new modules/unit tests are added to application and raise a PR, pipeline Job should be triggered only if there is git diff(unit tests)

If there is no git diff found it should skip the tests and post skip message to github. If diff found/or any new modules are added to the Java application run the unit tests and post success message back to Github.I do already have a script in my Java application to handle the git difference, now how do I set a some flag and use it in pipeline job on conditional basis.can someone help me on the requirement.