GitHub Issue Comment-Limit Headroom and Lockout Forecast avatar

GitHub Issue Comment-Limit Headroom and Lockout Forecast

Pricing

$10.00 / 1,000 issue checkeds

Go to Apify Store
GitHub Issue Comment-Limit Headroom and Lockout Forecast

GitHub Issue Comment-Limit Headroom and Lockout Forecast

Forecast the date when a GitHub issue reaches the 2,500 comment limit.

Pricing

$10.00 / 1,000 issue checkeds

Rating

0.0

(0)

Developer

kingii98

kingii98

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

8 days ago

Last modified

Categories

Security

Limited permissions

Share

GitHub rejects new comments on an issue after 2,500 comments. This Actor shows how many comments remain. It forecasts the date when the issue reaches the limit. Use it to move a long thread before comments fail.

Input

FieldDescriptionDefault
issueUrlsUp to 100 public issue URLs.One example issue
repositoryUrlOptional. One public repository. The Actor checks its issues with the most comments. It replaces issueUrls.none
minCommentsRepository mode only. Skip issues with fewer comments.1
maxIssuesMaximum issues for one run (1 to 100).100
warningThresholdComment count that sets the status warning.2000
githubTokenOptional. Your own token for a higher GitHub API rate limit. The Actor sends it only to api.github.com.none

An empty input {} runs the default example and succeeds.

Output

The Actor writes one dataset row for each issue.

FieldMeaning
issueUrl, number, title, stateThe issue.
commentCountComments now.
remainingComments2,500 minus commentCount. Minimum 0.
commentsPerDayComment count for each of the last 7 UTC days.
commentsLast7Days, averagePerDayTotal and mean rate. Both use the window that starts at 00:00 UTC, 6 days before today, and ends now. commentsLast7Days equals the sum of commentsPerDay.
rateIsEstimatetrue when the Actor did not fetch all comments of the window. The Actor fetches the newest comments, at most 2 pages of 100 comments. The oldest fetched comment is then newer than the window start, and the rate uses the time span of the fetched comments.
forecastLockoutDateDate (UTC) when the issue reaches 2,500 comments at the current rate. null when there is no rate, or when the date is more than 10 years away.
daysToLockoutDays to that date.
statusok, warning, locked, or unavailable.
messageReason, for an unavailable row.

Status rules:

  • locked: 2,500 comments or more.
  • warning: comment count is at or above warningThreshold.
  • ok: all other issues.
  • unavailable: the Actor could not check the issue. Reasons: bad URL, issue not public, redirect, or GitHub API rate limit.

A bad target or an unavailable issue is a dataset row and a status message. The run still succeeds.

Pricing event

The Actor uses pay-per-event pricing with one event.

EventCharged whenCount
issue-checkedThe Actor writes a headroom row (ok, warning, or locked).1 for each issue

The Actor does not charge for unavailable rows. The Actor stops when the maximum charge limit is reached. Each issue costs one issue request and at most two comment-page requests.

This README does not set a price. Pricing is set outside this repository.

Limits

  • Input limit: 100 issues for each run.
  • Only https://github.com/OWNER/REPO/issues/NUMBER URLs are accepted. All requests go to api.github.com.
  • The Actor does not follow redirects. Response size limit: 2 MB. Request timeout: 20 seconds. Concurrency: 5.
  • The 2,500 comment limit comes from public issue reports. GitHub can change it. Check the constant COMMENT_LIMIT in src/logic.py.
  • The Actor keeps no state. It calculates the rate from comment timestamps. Use an Apify schedule to run it each day.
  • Without a token, the GitHub API rate limit is low (60 requests each hour). One issue uses up to 3 requests.

Development

uv run pytest
uv run ruff check .