Skip to content
Get started

Reset

projects.branches.reset(strbranch, BranchResetParams**kwargs) -> ProjectBranch
put/v0/projects/{project}/branches/{branch}/reset

Reset a project branch.

If branch === main, the branch is reset to target_config_sha. Otherwise, the branch is reset to main.

ParametersExpand Collapse
project: Optional[str]
branch: str
target_config_sha: Optional[str]

The commit SHA to reset the main branch to. Required if resetting the main branch; disallowed otherwise.

ReturnsExpand Collapse
class ProjectBranch:

A project branch names a line of development for a project. Like a Git branch, it points to a Git commit with a set of config files. In addition, a project branch also points to a set of custom code changes, corresponding to Git branches in the staging repos.

branch: str

Branch name

config_commit: ConfigCommit

A Git commit that points to the latest set of config files on a given branch.

repo: ConfigCommitRepo
branch: str
name: str
owner: str
sha: str
latest_build: Optional[Build]
id: str

Build ID

config_commit: str
created_at: datetime
documented_spec: Optional[DocumentedSpec]
Accepts one of the following:
class DocumentedSpecUnionMember0:
content: str
type: Literal["content"]
Accepts one of the following:
"content"
class DocumentedSpecUnionMember1:
expires: datetime
type: Literal["url"]
Accepts one of the following:
"url"
url: str
object: Literal["build"]
Accepts one of the following:
"build"
org: str
project: str
targets: Targets
cli: Optional[BuildTarget]
commit: Commit
Accepts one of the following:
class CommitNotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class CommitQueued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class CommitInProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class CommitCompleted:
completed: CommitCompletedCompleted
commit: Optional[Commit]
repo: Repo
branch: str
name: str
owner: str
sha: str
conclusion: Literal["error", "warning", "note", 9 more]
Accepts one of the following:
"error"
"warning"
"note"
"success"
"merge_conflict"
"upstream_merge_conflict"
"fatal"
"payment_required"
"cancelled"
"timed_out"
"noop"
"version_bump"
merge_conflict_pr: Optional[CommitCompletedCompletedMergeConflictPr]
number: float
repo: CommitCompletedCompletedMergeConflictPrRepo
name: str
owner: str
status: Literal["completed"]
Accepts one of the following:
"completed"
install_url: Optional[str]
lint: CheckStep
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
object: Literal["build_target"]
Accepts one of the following:
"build_target"
status: Literal["not_started", "codegen", "postgen", "completed"]
Accepts one of the following:
"not_started"
"codegen"
"postgen"
"completed"
test: CheckStep
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
build: Optional[CheckStep]
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
csharp: Optional[BuildTarget]
commit: Commit
Accepts one of the following:
class CommitNotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class CommitQueued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class CommitInProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class CommitCompleted:
completed: CommitCompletedCompleted
commit: Optional[Commit]
repo: Repo
branch: str
name: str
owner: str
sha: str
conclusion: Literal["error", "warning", "note", 9 more]
Accepts one of the following:
"error"
"warning"
"note"
"success"
"merge_conflict"
"upstream_merge_conflict"
"fatal"
"payment_required"
"cancelled"
"timed_out"
"noop"
"version_bump"
merge_conflict_pr: Optional[CommitCompletedCompletedMergeConflictPr]
number: float
repo: CommitCompletedCompletedMergeConflictPrRepo
name: str
owner: str
status: Literal["completed"]
Accepts one of the following:
"completed"
install_url: Optional[str]
lint: CheckStep
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
object: Literal["build_target"]
Accepts one of the following:
"build_target"
status: Literal["not_started", "codegen", "postgen", "completed"]
Accepts one of the following:
"not_started"
"codegen"
"postgen"
"completed"
test: CheckStep
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
build: Optional[CheckStep]
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
go: Optional[BuildTarget]
commit: Commit
Accepts one of the following:
class CommitNotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class CommitQueued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class CommitInProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class CommitCompleted:
completed: CommitCompletedCompleted
commit: Optional[Commit]
repo: Repo
branch: str
name: str
owner: str
sha: str
conclusion: Literal["error", "warning", "note", 9 more]
Accepts one of the following:
"error"
"warning"
"note"
"success"
"merge_conflict"
"upstream_merge_conflict"
"fatal"
"payment_required"
"cancelled"
"timed_out"
"noop"
"version_bump"
merge_conflict_pr: Optional[CommitCompletedCompletedMergeConflictPr]
number: float
repo: CommitCompletedCompletedMergeConflictPrRepo
name: str
owner: str
status: Literal["completed"]
Accepts one of the following:
"completed"
install_url: Optional[str]
lint: CheckStep
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
object: Literal["build_target"]
Accepts one of the following:
"build_target"
status: Literal["not_started", "codegen", "postgen", "completed"]
Accepts one of the following:
"not_started"
"codegen"
"postgen"
"completed"
test: CheckStep
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
build: Optional[CheckStep]
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
java: Optional[BuildTarget]
commit: Commit
Accepts one of the following:
class CommitNotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class CommitQueued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class CommitInProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class CommitCompleted:
completed: CommitCompletedCompleted
commit: Optional[Commit]
repo: Repo
branch: str
name: str
owner: str
sha: str
conclusion: Literal["error", "warning", "note", 9 more]
Accepts one of the following:
"error"
"warning"
"note"
"success"
"merge_conflict"
"upstream_merge_conflict"
"fatal"
"payment_required"
"cancelled"
"timed_out"
"noop"
"version_bump"
merge_conflict_pr: Optional[CommitCompletedCompletedMergeConflictPr]
number: float
repo: CommitCompletedCompletedMergeConflictPrRepo
name: str
owner: str
status: Literal["completed"]
Accepts one of the following:
"completed"
install_url: Optional[str]
lint: CheckStep
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
object: Literal["build_target"]
Accepts one of the following:
"build_target"
status: Literal["not_started", "codegen", "postgen", "completed"]
Accepts one of the following:
"not_started"
"codegen"
"postgen"
"completed"
test: CheckStep
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
build: Optional[CheckStep]
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
kotlin: Optional[BuildTarget]
commit: Commit
Accepts one of the following:
class CommitNotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class CommitQueued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class CommitInProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class CommitCompleted:
completed: CommitCompletedCompleted
commit: Optional[Commit]
repo: Repo
branch: str
name: str
owner: str
sha: str
conclusion: Literal["error", "warning", "note", 9 more]
Accepts one of the following:
"error"
"warning"
"note"
"success"
"merge_conflict"
"upstream_merge_conflict"
"fatal"
"payment_required"
"cancelled"
"timed_out"
"noop"
"version_bump"
merge_conflict_pr: Optional[CommitCompletedCompletedMergeConflictPr]
number: float
repo: CommitCompletedCompletedMergeConflictPrRepo
name: str
owner: str
status: Literal["completed"]
Accepts one of the following:
"completed"
install_url: Optional[str]
lint: CheckStep
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
object: Literal["build_target"]
Accepts one of the following:
"build_target"
status: Literal["not_started", "codegen", "postgen", "completed"]
Accepts one of the following:
"not_started"
"codegen"
"postgen"
"completed"
test: CheckStep
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
build: Optional[CheckStep]
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
node: Optional[BuildTarget]
commit: Commit
Accepts one of the following:
class CommitNotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class CommitQueued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class CommitInProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class CommitCompleted:
completed: CommitCompletedCompleted
commit: Optional[Commit]
repo: Repo
branch: str
name: str
owner: str
sha: str
conclusion: Literal["error", "warning", "note", 9 more]
Accepts one of the following:
"error"
"warning"
"note"
"success"
"merge_conflict"
"upstream_merge_conflict"
"fatal"
"payment_required"
"cancelled"
"timed_out"
"noop"
"version_bump"
merge_conflict_pr: Optional[CommitCompletedCompletedMergeConflictPr]
number: float
repo: CommitCompletedCompletedMergeConflictPrRepo
name: str
owner: str
status: Literal["completed"]
Accepts one of the following:
"completed"
install_url: Optional[str]
lint: CheckStep
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
object: Literal["build_target"]
Accepts one of the following:
"build_target"
status: Literal["not_started", "codegen", "postgen", "completed"]
Accepts one of the following:
"not_started"
"codegen"
"postgen"
"completed"
test: CheckStep
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
build: Optional[CheckStep]
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
php: Optional[BuildTarget]
commit: Commit
Accepts one of the following:
class CommitNotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class CommitQueued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class CommitInProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class CommitCompleted:
completed: CommitCompletedCompleted
commit: Optional[Commit]
repo: Repo
branch: str
name: str
owner: str
sha: str
conclusion: Literal["error", "warning", "note", 9 more]
Accepts one of the following:
"error"
"warning"
"note"
"success"
"merge_conflict"
"upstream_merge_conflict"
"fatal"
"payment_required"
"cancelled"
"timed_out"
"noop"
"version_bump"
merge_conflict_pr: Optional[CommitCompletedCompletedMergeConflictPr]
number: float
repo: CommitCompletedCompletedMergeConflictPrRepo
name: str
owner: str
status: Literal["completed"]
Accepts one of the following:
"completed"
install_url: Optional[str]
lint: CheckStep
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
object: Literal["build_target"]
Accepts one of the following:
"build_target"
status: Literal["not_started", "codegen", "postgen", "completed"]
Accepts one of the following:
"not_started"
"codegen"
"postgen"
"completed"
test: CheckStep
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
build: Optional[CheckStep]
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
python: Optional[BuildTarget]
commit: Commit
Accepts one of the following:
class CommitNotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class CommitQueued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class CommitInProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class CommitCompleted:
completed: CommitCompletedCompleted
commit: Optional[Commit]
repo: Repo
branch: str
name: str
owner: str
sha: str
conclusion: Literal["error", "warning", "note", 9 more]
Accepts one of the following:
"error"
"warning"
"note"
"success"
"merge_conflict"
"upstream_merge_conflict"
"fatal"
"payment_required"
"cancelled"
"timed_out"
"noop"
"version_bump"
merge_conflict_pr: Optional[CommitCompletedCompletedMergeConflictPr]
number: float
repo: CommitCompletedCompletedMergeConflictPrRepo
name: str
owner: str
status: Literal["completed"]
Accepts one of the following:
"completed"
install_url: Optional[str]
lint: CheckStep
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
object: Literal["build_target"]
Accepts one of the following:
"build_target"
status: Literal["not_started", "codegen", "postgen", "completed"]
Accepts one of the following:
"not_started"
"codegen"
"postgen"
"completed"
test: CheckStep
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
build: Optional[CheckStep]
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
ruby: Optional[BuildTarget]
commit: Commit
Accepts one of the following:
class CommitNotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class CommitQueued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class CommitInProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class CommitCompleted:
completed: CommitCompletedCompleted
commit: Optional[Commit]
repo: Repo
branch: str
name: str
owner: str
sha: str
conclusion: Literal["error", "warning", "note", 9 more]
Accepts one of the following:
"error"
"warning"
"note"
"success"
"merge_conflict"
"upstream_merge_conflict"
"fatal"
"payment_required"
"cancelled"
"timed_out"
"noop"
"version_bump"
merge_conflict_pr: Optional[CommitCompletedCompletedMergeConflictPr]
number: float
repo: CommitCompletedCompletedMergeConflictPrRepo
name: str
owner: str
status: Literal["completed"]
Accepts one of the following:
"completed"
install_url: Optional[str]
lint: CheckStep
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
object: Literal["build_target"]
Accepts one of the following:
"build_target"
status: Literal["not_started", "codegen", "postgen", "completed"]
Accepts one of the following:
"not_started"
"codegen"
"postgen"
"completed"
test: CheckStep
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
build: Optional[CheckStep]
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
terraform: Optional[BuildTarget]
commit: Commit
Accepts one of the following:
class CommitNotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class CommitQueued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class CommitInProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class CommitCompleted:
completed: CommitCompletedCompleted
commit: Optional[Commit]
repo: Repo
branch: str
name: str
owner: str
sha: str
conclusion: Literal["error", "warning", "note", 9 more]
Accepts one of the following:
"error"
"warning"
"note"
"success"
"merge_conflict"
"upstream_merge_conflict"
"fatal"
"payment_required"
"cancelled"
"timed_out"
"noop"
"version_bump"
merge_conflict_pr: Optional[CommitCompletedCompletedMergeConflictPr]
number: float
repo: CommitCompletedCompletedMergeConflictPrRepo
name: str
owner: str
status: Literal["completed"]
Accepts one of the following:
"completed"
install_url: Optional[str]
lint: CheckStep
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
object: Literal["build_target"]
Accepts one of the following:
"build_target"
status: Literal["not_started", "codegen", "postgen", "completed"]
Accepts one of the following:
"not_started"
"codegen"
"postgen"
"completed"
test: CheckStep
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
build: Optional[CheckStep]
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
typescript: Optional[BuildTarget]
commit: Commit
Accepts one of the following:
class CommitNotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class CommitQueued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class CommitInProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class CommitCompleted:
completed: CommitCompletedCompleted
commit: Optional[Commit]
repo: Repo
branch: str
name: str
owner: str
sha: str
conclusion: Literal["error", "warning", "note", 9 more]
Accepts one of the following:
"error"
"warning"
"note"
"success"
"merge_conflict"
"upstream_merge_conflict"
"fatal"
"payment_required"
"cancelled"
"timed_out"
"noop"
"version_bump"
merge_conflict_pr: Optional[CommitCompletedCompletedMergeConflictPr]
number: float
repo: CommitCompletedCompletedMergeConflictPrRepo
name: str
owner: str
status: Literal["completed"]
Accepts one of the following:
"completed"
install_url: Optional[str]
lint: CheckStep
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
object: Literal["build_target"]
Accepts one of the following:
"build_target"
status: Literal["not_started", "codegen", "postgen", "completed"]
Accepts one of the following:
"not_started"
"codegen"
"postgen"
"completed"
test: CheckStep
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
build: Optional[CheckStep]
Accepts one of the following:
class NotStarted:
status: Literal["not_started"]
Accepts one of the following:
"not_started"
class Queued:
status: Literal["queued"]
Accepts one of the following:
"queued"
class InProgress:
status: Literal["in_progress"]
Accepts one of the following:
"in_progress"
class Completed:
completed: CompletedCompleted
conclusion: Literal["success", "failure", "skipped", 4 more]
Accepts one of the following:
"success"
"failure"
"skipped"
"cancelled"
"action_required"
"neutral"
"timed_out"
url: Optional[str]
status: Literal["completed"]
Accepts one of the following:
"completed"
updated_at: datetime
object: Literal["project_branch"]
Accepts one of the following:
"project_branch"
org: str
project: str

Project name

from stainless_v0 import Stainless

client = Stainless(
    api_key="My API Key",
)
project_branch = client.projects.branches.reset(
    branch="branch",
    project="project",
)
print(project_branch.branch)
{
  "branch": "branch",
  "config_commit": {
    "repo": {
      "branch": "branch",
      "name": "name",
      "owner": "owner"
    },
    "sha": "sha"
  },
  "latest_build": {
    "id": "id",
    "config_commit": "config_commit",
    "created_at": "2019-12-27T18:11:19.117Z",
    "documented_spec": {
      "content": "content",
      "type": "content"
    },
    "object": "build",
    "org": "org",
    "project": "project",
    "targets": {
      "cli": {
        "commit": {
          "status": "not_started"
        },
        "install_url": "install_url",
        "lint": {
          "status": "not_started"
        },
        "object": "build_target",
        "status": "not_started",
        "test": {
          "status": "not_started"
        },
        "build": {
          "status": "not_started"
        }
      },
      "csharp": {
        "commit": {
          "status": "not_started"
        },
        "install_url": "install_url",
        "lint": {
          "status": "not_started"
        },
        "object": "build_target",
        "status": "not_started",
        "test": {
          "status": "not_started"
        },
        "build": {
          "status": "not_started"
        }
      },
      "go": {
        "commit": {
          "status": "not_started"
        },
        "install_url": "install_url",
        "lint": {
          "status": "not_started"
        },
        "object": "build_target",
        "status": "not_started",
        "test": {
          "status": "not_started"
        },
        "build": {
          "status": "not_started"
        }
      },
      "java": {
        "commit": {
          "status": "not_started"
        },
        "install_url": "install_url",
        "lint": {
          "status": "not_started"
        },
        "object": "build_target",
        "status": "not_started",
        "test": {
          "status": "not_started"
        },
        "build": {
          "status": "not_started"
        }
      },
      "kotlin": {
        "commit": {
          "status": "not_started"
        },
        "install_url": "install_url",
        "lint": {
          "status": "not_started"
        },
        "object": "build_target",
        "status": "not_started",
        "test": {
          "status": "not_started"
        },
        "build": {
          "status": "not_started"
        }
      },
      "node": {
        "commit": {
          "status": "not_started"
        },
        "install_url": "install_url",
        "lint": {
          "status": "not_started"
        },
        "object": "build_target",
        "status": "not_started",
        "test": {
          "status": "not_started"
        },
        "build": {
          "status": "not_started"
        }
      },
      "php": {
        "commit": {
          "status": "not_started"
        },
        "install_url": "install_url",
        "lint": {
          "status": "not_started"
        },
        "object": "build_target",
        "status": "not_started",
        "test": {
          "status": "not_started"
        },
        "build": {
          "status": "not_started"
        }
      },
      "python": {
        "commit": {
          "status": "not_started"
        },
        "install_url": "install_url",
        "lint": {
          "status": "not_started"
        },
        "object": "build_target",
        "status": "not_started",
        "test": {
          "status": "not_started"
        },
        "build": {
          "status": "not_started"
        }
      },
      "ruby": {
        "commit": {
          "status": "not_started"
        },
        "install_url": "install_url",
        "lint": {
          "status": "not_started"
        },
        "object": "build_target",
        "status": "not_started",
        "test": {
          "status": "not_started"
        },
        "build": {
          "status": "not_started"
        }
      },
      "terraform": {
        "commit": {
          "status": "not_started"
        },
        "install_url": "install_url",
        "lint": {
          "status": "not_started"
        },
        "object": "build_target",
        "status": "not_started",
        "test": {
          "status": "not_started"
        },
        "build": {
          "status": "not_started"
        }
      },
      "typescript": {
        "commit": {
          "status": "not_started"
        },
        "install_url": "install_url",
        "lint": {
          "status": "not_started"
        },
        "object": "build_target",
        "status": "not_started",
        "test": {
          "status": "not_started"
        },
        "build": {
          "status": "not_started"
        }
      }
    },
    "updated_at": "2019-12-27T18:11:19.117Z"
  },
  "object": "project_branch",
  "org": "org",
  "project": "project"
}
Returns Examples
{
  "branch": "branch",
  "config_commit": {
    "repo": {
      "branch": "branch",
      "name": "name",
      "owner": "owner"
    },
    "sha": "sha"
  },
  "latest_build": {
    "id": "id",
    "config_commit": "config_commit",
    "created_at": "2019-12-27T18:11:19.117Z",
    "documented_spec": {
      "content": "content",
      "type": "content"
    },
    "object": "build",
    "org": "org",
    "project": "project",
    "targets": {
      "cli": {
        "commit": {
          "status": "not_started"
        },
        "install_url": "install_url",
        "lint": {
          "status": "not_started"
        },
        "object": "build_target",
        "status": "not_started",
        "test": {
          "status": "not_started"
        },
        "build": {
          "status": "not_started"
        }
      },
      "csharp": {
        "commit": {
          "status": "not_started"
        },
        "install_url": "install_url",
        "lint": {
          "status": "not_started"
        },
        "object": "build_target",
        "status": "not_started",
        "test": {
          "status": "not_started"
        },
        "build": {
          "status": "not_started"
        }
      },
      "go": {
        "commit": {
          "status": "not_started"
        },
        "install_url": "install_url",
        "lint": {
          "status": "not_started"
        },
        "object": "build_target",
        "status": "not_started",
        "test": {
          "status": "not_started"
        },
        "build": {
          "status": "not_started"
        }
      },
      "java": {
        "commit": {
          "status": "not_started"
        },
        "install_url": "install_url",
        "lint": {
          "status": "not_started"
        },
        "object": "build_target",
        "status": "not_started",
        "test": {
          "status": "not_started"
        },
        "build": {
          "status": "not_started"
        }
      },
      "kotlin": {
        "commit": {
          "status": "not_started"
        },
        "install_url": "install_url",
        "lint": {
          "status": "not_started"
        },
        "object": "build_target",
        "status": "not_started",
        "test": {
          "status": "not_started"
        },
        "build": {
          "status": "not_started"
        }
      },
      "node": {
        "commit": {
          "status": "not_started"
        },
        "install_url": "install_url",
        "lint": {
          "status": "not_started"
        },
        "object": "build_target",
        "status": "not_started",
        "test": {
          "status": "not_started"
        },
        "build": {
          "status": "not_started"
        }
      },
      "php": {
        "commit": {
          "status": "not_started"
        },
        "install_url": "install_url",
        "lint": {
          "status": "not_started"
        },
        "object": "build_target",
        "status": "not_started",
        "test": {
          "status": "not_started"
        },
        "build": {
          "status": "not_started"
        }
      },
      "python": {
        "commit": {
          "status": "not_started"
        },
        "install_url": "install_url",
        "lint": {
          "status": "not_started"
        },
        "object": "build_target",
        "status": "not_started",
        "test": {
          "status": "not_started"
        },
        "build": {
          "status": "not_started"
        }
      },
      "ruby": {
        "commit": {
          "status": "not_started"
        },
        "install_url": "install_url",
        "lint": {
          "status": "not_started"
        },
        "object": "build_target",
        "status": "not_started",
        "test": {
          "status": "not_started"
        },
        "build": {
          "status": "not_started"
        }
      },
      "terraform": {
        "commit": {
          "status": "not_started"
        },
        "install_url": "install_url",
        "lint": {
          "status": "not_started"
        },
        "object": "build_target",
        "status": "not_started",
        "test": {
          "status": "not_started"
        },
        "build": {
          "status": "not_started"
        }
      },
      "typescript": {
        "commit": {
          "status": "not_started"
        },
        "install_url": "install_url",
        "lint": {
          "status": "not_started"
        },
        "object": "build_target",
        "status": "not_started",
        "test": {
          "status": "not_started"
        },
        "build": {
          "status": "not_started"
        }
      }
    },
    "updated_at": "2019-12-27T18:11:19.117Z"
  },
  "object": "project_branch",
  "org": "org",
  "project": "project"
}