MCPcopy Create free account
hub / github.com/ampproject/amphtml / getGraphqlIssueId

Function getGraphqlIssueId

build-system/common/update-session-issues/index.js:210–223  ·  view source on GitHub ↗

* @param {string} token * @param {string} repo * @param {number|string} number * @return {Promise }

(token, repo, number)

Source from the content-addressed store, hash-verified

208 * @return {Promise<string>}
209 */
210async function getGraphqlIssueId(token, repo, number) {
211 const [owner, name] = repo.split('/');
212 const query = `
213 query {
214 repository(owner:"${owner}", name:"${name}") {
215 issue(number:${number}) {
216 id
217 }
218 }
219 }
220 `;
221 const {repository} = await graphqlQueryGithub(token, query);
222 return repository.issue.id;
223}
224
225/** @enum {string} */
226const PinUnpinOpDef = {pin: 'pin', unpin: 'unpin'};

Callers 1

pinOrUnpinGithubIssueFunction · 0.85

Calls 1

graphqlQueryGithubFunction · 0.85

Tested by

no test coverage detected