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

Method _create_issue_comment

src/ghstack/github_fake.py:422–440  ·  view source on GitHub ↗
(
        self, owner: str, name: str, comment_id: int, input: CreateIssueCommentInput
    )

Source from the content-addressed store, hash-verified

420 pr.body = input["body"]
421
422 def _create_issue_comment(
423 self, owner: str, name: str, comment_id: int, input: CreateIssueCommentInput
424 ) -> CreateIssueCommentPayload:
425 state = self.state
426 id = state.next_id()
427 repo = state.repository(owner, name)
428 comment_id = state.next_issue_comment_full_database_id(repo.id)
429 comment = IssueComment(
430 id=id,
431 _repository=repo.id,
432 fullDatabaseId=comment_id,
433 body=input["body"],
434 )
435 state.issue_comments[id] = comment
436 # This is only a subset of what the actual REST endpoint
437 # returns.
438 return {
439 "id": comment_id,
440 }
441
442 def _update_issue_comment(
443 self, owner: str, name: str, comment_id: int, input: UpdateIssueCommentInput

Callers 1

restMethod · 0.95

Calls 4

IssueCommentClass · 0.85
next_idMethod · 0.80
repositoryMethod · 0.45

Tested by

no test coverage detected