added endpoint for pending build and added conditonal to set commit to pending