Fixed pr export to not try to create a PR for a bad branch