MCPcopy Create free account
hub / github.com/METR/vivaria / _setup_task_commit

Method _setup_task_commit

cli/viv_cli/main.py:167–174  ·  view source on GitHub ↗

Set up git commit for task environment.

(self, ignore_workdir: bool = False)

Source from the content-addressed store, hash-verified

165 self._ssh = SSH()
166
167 def _setup_task_commit(self, ignore_workdir: bool = False) -> viv_api.GitRepoTaskSource:
168 """Set up git commit for task environment."""
169 org, repo = gh.get_org_and_repo()
170 _, commit, permalink = gh.create_working_tree_permalink(
171 org=org, repo=repo, ignore_workdir=ignore_workdir
172 )
173 print("GitHub permalink to task commit:", permalink)
174 return {"type": "gitRepo", "repoName": f"{org}/{repo}", "commitId": commit}
175
176 def _get_final_json_from_response(self, response_lines: list[str]) -> dict | None:
177 try:

Callers 2

startMethod · 0.95
testMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected