{"size": 336, "ext": "js", "max_stars_repo_path": "node_modules/octokit-pinned-issues/lib/get-issue-id.js", "max_stars_repo_name": "robotnyc/vacation-mode", "max_stars_repo_stars_event_min_datetime": "2020-09-20T14:14:45.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-14T18:11:38.000Z", "max_issues_repo_path": "node_modules/octokit-pinned-issues/lib/get-issue-id.js", "max_issues_repo_name": "robotnyc/vacation-mode", "max_issues_repo_issues_event_min_datetime": "2018-12-16T22:04:08.000Z", "max_issues_repo_issues_event_max_datetime": "2020-05-18T18:41:13.000Z", "max_forks_repo_path": "node_modules/octokit-pinned-issues/lib/get-issue-id.js", "max_forks_repo_name": "robotnyc/vacation-mode", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 78, "max_issues_count": 10, "max_forks_count": null, "avg_line_length": 28.0, "max_line_length": 77, "alphanum_fraction": 0.6428571429}
module.exports = getIssueId

const { GET_ISSUE } = require('./graphql')

async function getIssueId (octokit, { owner, repo, number }) {
  const variables = { owner, repo, number }
  const {
    data: { data: { repository: { issue: { id } } } }
  } = await octokit.request('POST /graphql', { query: GET_ISSUE, variables })
  return id
}
