MCPcopy Create free account
hub / github.com/ezyang/ghstack / _set_default_branch

Method _set_default_branch

src/ghstack/github_fake.py:453–458  ·  view source on GitHub ↗
(
        self, owner: str, name: str, input: SetDefaultBranchInput
    )

Source from the content-addressed store, hash-verified

451 # NB: This may have a payload, but we don't
452 # use it so I didn't bother constructing it.
453 def _set_default_branch(
454 self, owner: str, name: str, input: SetDefaultBranchInput
455 ) -> None:
456 state = self.state
457 repo = state.repository(owner, name)
458 repo.defaultBranchRef = repo._make_ref(state, input["default_branch"])
459
460 def rest(self, method: str, path: str, **kwargs: Any) -> Any:
461 if method == "get":

Callers 1

restMethod · 0.95

Calls 2

_make_refMethod · 0.80
repositoryMethod · 0.45

Tested by

no test coverage detected