I need to do a git diff between the current branch and the last pipeline completed successfully in the master branch. I use the following query to get the last pipeline completed succesfully
pipelines/?target.branch=master
&fields=values.build_number,values.state.result.name,values.target.commit.hash
&sort=-created_on
&pagelen=1
&q=(state.name = "COMPLETED" AND state.result.name = "SUCCESSFUL")
that translates to the following URL encoded string
pipelines/?target.branch=master&fields=values.build_number,values.state.result.name,values.target.commit.hash&sort=-created_on&pagelen=1&q=%28state.name%20%3D%20%22COMPLETED%22%20AND%20state.result.name%20%3D%20%22SUCCESSFUL%22%29
While the other query fields do work, it seems that the query filter q=(state.name = "COMPLETED" AND state.result.name = "SUCCESSFUL") does not have any effect.
Please advise what query I must use to get the last successfully completed pipeline in the master branch.