I’m having troubles trying to compare the last two analyses of a project, I’m using the SonarQube web-api to achieve it. I did a first version which is not working everyday. Actually on my projects, analyses are triggered every day except for the week end. So I’m trying to compare friday’s report with thursday for exemple or monday with friday (taking week-end in count).
For now I’m calling this to get my measures :
variable is a date I’m getting by getting the actual date minus 10 days (not that clean).
After getting my measures I’m looking if there is at least two results and if it is then I just substract the first two to get a value (for exemple -10 code smells).
Then a mail is sent with all the information.
Maybe someone know a better way to do it (maybe with another api call) ?
I’m using SonarQube 6.7.2.
Thank you for your time and your help.