MCPcopy
hub / github.com/iterative/cml / commitPrs

Method commitPrs

src/drivers/github.js:149–171  ·  view source on GitHub ↗
(opts = {})

Source from the content-addressed store, hash-verified

147 }
148
149 async commitPrs(opts = {}) {
150 const { commitSha, state = 'open' } = opts;
151 const { repos } = octokit(this.token, this.repo);
152
153 return (
154 await repos.listPullRequestsAssociatedWithCommit({
155 ...ownerRepo({ uri: this.repo }),
156 commit_sha: commitSha,
157 state
158 })
159 ).data.map((pr) => {
160 const {
161 html_url: url,
162 head: { ref: source },
163 base: { ref: target }
164 } = pr;
165 return {
166 url,
167 source: branchName(source),
168 target: branchName(target)
169 };
170 });
171 }
172
173 async checkCreate(opts = {}) {
174 const {

Callers

nothing calls this directly

Calls 3

octokitFunction · 0.85
ownerRepoFunction · 0.85
branchNameFunction · 0.85

Tested by

no test coverage detected