* @param {string} token * @param {string} repo * @param {number|string} number * @return {Promise }
(token, repo, number)
| 208 | * @return {Promise<string>} |
| 209 | */ |
| 210 | async 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} */ |
| 226 | const PinUnpinOpDef = {pin: 'pin', unpin: 'unpin'}; |
no test coverage detected