ParseContextURL
POST/gitpod.v1.RunnerService/ParseContextURL
Parses a context URL and returns the parsed result.
Use this method to:
- Validate context URLs
- Check repository access
- Verify branch existence
Returns:
- FAILED_PRECONDITION if authentication is required
- PERMISSION_DENIED if access is not allowed
- INVALID_ARGUMENT if URL is invalid
- NOT_FOUND if repository/branch doesn’t exist
Examples
-
Parse URL:
Parses and validates a context URL.
contextUrl: "https://github.com/org/repo/tree/main"
ParseContextURL
curl https://app.gitpod.io/api/gitpod.v1.RunnerService/ParseContextURL \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $GITPOD_API_KEY" \
-d '{}'{
"git": {
"branch": "branch",
"cloneUrl": "cloneUrl",
"commit": "commit",
"host": "host",
"owner": "owner",
"repo": "repo",
"tag": "tag",
"upstreamRemoteUrl": "upstreamRemoteUrl"
},
"issue": {
"id": "id",
"title": "title"
},
"originalContextUrl": "originalContextUrl",
"pr": {
"id": "id",
"fromBranch": "fromBranch",
"title": "title",
"toBranch": "toBranch"
},
"projectIds": [
"string"
],
"pullRequest": {
"id": "id",
"author": "author",
"draft": true,
"fromBranch": "fromBranch",
"repository": {
"cloneUrl": "cloneUrl",
"host": "host",
"name": "name",
"owner": "owner"
},
"state": "STATE_UNSPECIFIED",
"title": "title",
"toBranch": "toBranch",
"url": "url"
},
"scmId": "scmId"
}Returns Examples
{
"git": {
"branch": "branch",
"cloneUrl": "cloneUrl",
"commit": "commit",
"host": "host",
"owner": "owner",
"repo": "repo",
"tag": "tag",
"upstreamRemoteUrl": "upstreamRemoteUrl"
},
"issue": {
"id": "id",
"title": "title"
},
"originalContextUrl": "originalContextUrl",
"pr": {
"id": "id",
"fromBranch": "fromBranch",
"title": "title",
"toBranch": "toBranch"
},
"projectIds": [
"string"
],
"pullRequest": {
"id": "id",
"author": "author",
"draft": true,
"fromBranch": "fromBranch",
"repository": {
"cloneUrl": "cloneUrl",
"host": "host",
"name": "name",
"owner": "owner"
},
"state": "STATE_UNSPECIFIED",
"title": "title",
"toBranch": "toBranch",
"url": "url"
},
"scmId": "scmId"
}