jfrog / jfrog/jfrog-cli-security

jf git count-contributors command needs a rate-limiting parameter

Open
#576 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
Go
Stars
13
Forks
50
Avg merge
3d 48m
Merged PRs (30d)
26

Description

Is your feature request related to a problem? Please describe.
We are trying to run the jf git count-contributors command to count the contributing developers across an entire GitHub Org which is failing due to GitHub API rate limiting.

Example:
jf git cc --scm-type=github --scm-api-url=https://api.github.com/ —token=<my-github-token> —owner=<my-org>

There are 7623 errors like this in the log:
[Error] Error getting commits: %v GET https://api.github.com/repos/<my-org>/<xxxxxxxxx>/commits?page=73&per_page=50&since=2025-07-08T15%3A21%3A59%2B10%3A00&until=2025-08-08T15%3A59%3A31%2B10%3A00: 403 API rate limit of 5000 still exceeded until 2025-08-08 16:23:58 +1000 AEST, not making remote request. [rate reset in 24m26s] [Error] Error getting commits: %v GET https://api.github.com/repos/<my-org>/<xxxxxxxxxxxx>/commits?page=73&per_page=50&since=2025-07-08T15%3A21%3A59%2B10%3A00&until=2025-08-08T15%3A59%3A31%2B10%3A00: 403 API rate limit of 5000 still exceeded until 2025-08-08 16:23:58 +1000 AEST, not making remote request. [rate reset in 24m26s] [Error] Error getting commits: %v GET https://api.github.com/repos/<my-org>/<xxxxxxxxxxxxx>/commits?page=73&per_page=50&since=2025-07-08T15%3A21%3A59%2B10%3A00&until=2025-08-08T15%3A59%3A31%2B10%3A00: 403 API rate limit of 5000 still exceeded until 2025-08-08 16:23:58 +1000 AEST, not making remote request. [rate reset in 24m26s]

Describe the solution you'd like to see
Please add a --rate-limiting parameter that would allow us to slow down the GitHub API requests so that they fit into GitHub API's Limit (5000 requests/hour for authenticated users).

Describe alternatives you've considered
We considered incorporating the jf git count-contributors command into a seperate script and break up the requests by --repo-name, but that parameter is not currently working as expected.

Additional context

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Go implementation and entry point for jf git count-contributors, then trace how its GitHub API requests are issued and how the existing --repo-name option behaves. Define how --rate-limiting should pace requests without changing contributor counts, and verify completion against the reported rate-limit scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, go
Domain
api, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.