Close the pull request only if the pull is in OPEN state

Please review my changes

Thanks!