Restore a pull request's deleted source branch
One step with Harness. We can help you get access.
Get something done
Restore a pull request's deleted source branch
with Harness
Works with AI assistants
Use Harness: its Harness Pullreq API lets you restore a pull request's deleted source branch in a single step (POST /code/api/v1/repos/{repo_identifier}/pullreq/{pullreq_number}/branch). Harness also has an MCP server, so an AI assistant like Claude or ChatGPT can do it for you. capabilities.work can help you get signed up and connected.
- The source branch of my PR was deleted after merge; can I bring it back?
- Is there a dry run to see if restoring a PR's branch would break protection rules?
Say it to your AI assistant
- Restore the source branch of PR #{pullreq_number} in {repo_identifier}.
- Dry-run restoring the deleted source branch for pull request {pullreq_number} in repo {repo_identifier}.
For your developer
POST /code/api/v1/repos/{repo_identifier}/pullreq/{pullreq_number}/branch in Harness Pullreq API. Full spec on APIs.io.