DEV Community

Алексей Спинов
Алексей Спинов

Posted on

How to Scrape GitHub Issues and Pull Requests for Project Analysis

GitHub Issues and PRs contain valuable project health data.

GitHub API (Free, No Key for Basic)

async function getIssues(owner, repo) {
  const url = `https://api.github.com/repos/${owner}/${repo}/issues?state=all&per_page=100`;
  const res = await fetch(url);
  return (await res.json()).map(issue => ({
    title: issue.title,
    state: issue.state,
    created: issue.created_at,
    closed: issue.closed_at,
    comments: issue.comments,
    labels: issue.labels.map(l => l.name),
    author: issue.user.login
  }));
}
Enter fullscreen mode Exit fullscreen mode

Metrics You Can Calculate

  • Issue resolution time — how fast bugs get fixed
  • PR merge time — development velocity
  • Label distribution — bug vs feature vs enhancement
  • Contributor count — project health
  • Activity trend — growing or declining

Use Cases

  1. Open source project evaluation
  2. Technology risk assessment
  3. Competitor engineering velocity
  4. Community health analysis
  5. Developer hiring signals

Resources


Need GitHub project analysis? $20. Email: Spinov001@gmail.com | Hire me

Top comments (0)