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

Function convert_header

src/ghstack/git.py:82–95  ·  view source on GitHub ↗
(h: CommitHeader, github_url: str)

Source from the content-addressed store, hash-verified

80
81
82def convert_header(h: CommitHeader, github_url: str) -> ghstack.diff.Diff:
83 return ghstack.diff.Diff(
84 title=h.title,
85 summary=h.commit_msg,
86 oid=h.commit_id,
87 source_id=h.tree,
88 pull_request_resolved=ghstack.diff.PullRequestResolved.search(
89 h.raw_header, github_url
90 ),
91 tree=h.tree,
92 author_name=h.author_name,
93 author_email=h.author_email,
94 boundary=h.boundary,
95 )
96
97
98def parse_header(s: str, github_url: str) -> List[ghstack.diff.Diff]:

Callers 1

parse_headerFunction · 0.85

Calls 1

searchMethod · 0.80

Tested by

no test coverage detected