Added handling if the branch is present in the query param for getNewCommits in restAPI