79836911

Date: 2025-12-03 13:04:18
Score: 1.5
Natty:
Report link

GitHub doesn’t have any special API that directly gives you “your branches.”

The page you see on GitHub’s website is just a smart guess they show in the UI.

But you can copy the same logic with one simple trick.

Here’s how:

1. Call one GitHub API endpoint that lists all branches

GET /repos/{owner}/{repo}/branches?per_page=100

2. Every branch in that response already includes the latest commit and who wrote it.

You don’t need to make more API calls — the author info is already there.

3. Just filter the list and keep the branches where the latest commit was made by you.

That’s literally it.

No complicated steps, no heavy loops, no calling the API 50 times.

One request → filter → done.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Omm Roshan Sahoo