Im trying to achieve the following scenario.
Our developers maintain a version.plist file in the repo. Lets consider master has version 1.1.1. (Follow semver 2.0 specs)
When a dev A works on a feature, he creates PR and updates version to 1.2.1. I would like a status check on the PR, to say whether the PR has the correct version to be merged to master.
I don't want a scenario where merge can happen if the version is same or lower than master.
Let us consider similarly another developer B also works on another feature and updates his version.plist to 1.2.1 also. He merges it to master and now master has ver 1.2.1.
I would like above status check to repeat the test and notify that the PR of Dev A to be unmergeable, even though previously it was okay to merge.
Can anyone suggest any guidelines on how to do this via Status API/Events API. This is on an organization GitHub integrated with azure pipelines.
You can use githooks to solve this use-case.
git ls-tree -r --name-only <branch>
You might need to hardcode the read only git credentials.
More details can be found here.