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

Method _update_pull

src/ghstack/github_fake.py:406–420  ·  view source on GitHub ↗
(
        self, owner: str, name: str, number: GitHubNumber, input: UpdatePullRequestInput
    )

Source from the content-addressed store, hash-verified

404 # NB: This technically does have a payload, but we don't
405 # use it so I didn't bother constructing it.
406 def _update_pull(
407 self, owner: str, name: str, number: GitHubNumber, input: UpdatePullRequestInput
408 ) -> None:
409 state = self.state
410 repo = state.repository(owner, name)
411 pr = state.pull_request(repo, number)
412 # If I say input.get('title') is not None, mypy
413 # is unable to infer input['title'] is not None
414 if "title" in input and input["title"] is not None:
415 pr.title = input["title"]
416 if "base" in input and input["base"] is not None:
417 pr.baseRefName = input["base"]
418 pr.baseRef = repo._make_ref(state, pr.baseRefName)
419 if "body" in input and input["body"] is not None:
420 pr.body = input["body"]
421
422 def _create_issue_comment(
423 self, owner: str, name: str, comment_id: int, input: CreateIssueCommentInput

Callers 1

restMethod · 0.95

Calls 3

pull_requestMethod · 0.80
_make_refMethod · 0.80
repositoryMethod · 0.45

Tested by

no test coverage detected