惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
雷峰网
雷峰网
博客园 - 三生石上(FineUI控件)
月光博客
月光博客
有赞技术团队
有赞技术团队
阮一峰的网络日志
阮一峰的网络日志
Last Week in AI
Last Week in AI
G
Google Developers Blog
腾讯CDC
B
Blog
Microsoft Azure Blog
Microsoft Azure Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Microsoft Security Blog
Microsoft Security Blog
人人都是产品经理
人人都是产品经理
博客园_首页
T
Tailwind CSS Blog
C
Check Point Blog
博客园 - 【当耐特】
MongoDB | Blog
MongoDB | Blog
A
About on SuperTechFans
Y
Y Combinator Blog
L
LangChain Blog
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
How I built a tool that checks if a GitHub issue already ...
Mahendra S · 2026-05-05 · via DEV Community

GitTrek - Find open source issues and track GitHub badge progress
I kept doing this.

Find a beginner-friendly issue. Fork the repo. Set up the dev environment. Read through the codebase. Start working.

Then check the issue again and see a comment from 2 days ago: "Hey I'm working on this, should have a PR up soon."

Two hours wasted. Every single time.

The weird part? Almost every existing tool for finding open source issues - goodfirstissue.dev, up-for-grabs.net, codetriage - rely on static lists or periodic scrapes. They show you issues, but they don't show you the live status of whether someone is already quietly working on it right now.

So I built GitTrek to fix this.

The core problem: Silent Claiming

When a developer starts working on an issue, they often don't comment or ask for assignment. They just start. But they usually leave one of these "digital traces":

  1. PR Mentions: They mention the issue number in a PR description or commit message (Fixes #847).
  2. Linked Branches: They click "Create a branch for this issue" in GitHub's UI, then open a PR from that branch.

Both leave detectable events in GitHub's GraphQL API that most discovery tools never bother to check.

The two GraphQL events that make it work

GitHub's timelineItems field on issues exposes every event in an issue's history. Two specific types are the key:

CROSS_REFERENCED_EVENT - Fires when someone mentions the issue number (#847) in a PR or commit. The PR is the source of this event.

CONNECTED_EVENT - Fires when a branch linked to the issue becomes a pull request. In this event, the PR is the subject, not the source.

Pro Tip: This is a common GraphQL "gotcha." source for one, subject for the other. Mix them up, and you get null results with zero errors.

The Query

issue(number: $issueNumber) {
  timelineItems(
    first: 25,
    itemTypes: [CROSS_REFERENCED_EVENT, CONNECTED_EVENT]
  ) {
    nodes {
      ... on CrossReferencedEvent {
        source {
          ... on PullRequest {
            number
            state      # OPEN | CLOSED | MERGED
            isDraft
          }
        }
      }
      ... on ConnectedEvent {
        subject {
          ... on PullRequest {
            number
            state
            isDraft
          }
        }
      }
    }
  }
  linkedBranches(first: 3) {
    totalCount
  }
}

Enter fullscreen mode Exit fullscreen mode

The Classification Logic

GitTrek uses this data to color-code your search results instantly:
| Status | Condition |
|---|---|
| 🔴 Active PR | Open non-draft PR exists — high competition |
| 🟡 Someone started | Draft PR linked — proceed carefully |
| 🟡 Branch exists | linkedBranches > 0, no PR yet — early signal |
| ✅ Safe to claim | No linked PRs or branches found |


High Performance: Running checks in parallel

Checking 20 issues means 21 total API calls (1 search + 20 status checks). To keep the UI snappy, GitTrek doesn't block the initial results. We display the issues immediately and then "hydrate" the competition status badges in parallel:

// Fetch fresh data from APIs in the background
// This ensures one badge failure doesn't block the entire dashboard
const settlements = await Promise.allSettled([
  fetch(`/api/github/badges/pull-shark?username=${user}`).then(r => r.json()),
  fetch(`/api/github/badges/starstruck?username=${user}`).then(r => r.json()),
  // ... more badge checks
]);

// Safely extract results even if some failed
const [pullShark, starstruck, ...] = settlements.map(s => 
  s.status === "fulfilled" ? s.value : null
);

// Apply fallback values for failed items
const psData = pullShark || { count: 0 };

Enter fullscreen mode Exit fullscreen mode

I used Promise.allSettled instead of Promise.all for a reason: if one check fails (e.g., due to a repository permission issue or a single-item rate limit), the rest of your dashboard stays functional.

What else GitTrek does

Beyond "Ghost PR" detection, I built GitTrek to be a full companion for open-source growth:

  • Repository Quality Gates: Filter by stars, forks, and whether the repo actually has a CONTRIBUTING.md.
  • Live Achievement Tracking: Track your progress toward Pull Shark, Galaxy Brain, and YOLO badges using live GraphQL calculations.

The best part? It suggests a "Focus Mission". If you're only 2 PRs away from Gold Pull Shark, GitTrek will build a custom search query to help you find the exact issues needed to close that gap.

Try it out

GitTrek is free, open source, and requires no setup for browsing. You only need to connect your GitHub account if you want to track your personalized badge progress.

Live App: gittrek.vercel.app
Source Code: github.com/mahendra-shah/GitTrek


One question for you: Have you ever wasted time on
an issue that was already being worked on? How did you
handle it? Drop it in the comments - curious how common
this actually is.