Skip to content

Conversation

@seveibar
Copy link
Contributor

@seveibar seveibar commented Jul 1, 2025

Summary

  • add getRecentIssues to fetch latest repo issues once
  • update issue scanning in index.ts to avoid per-contributor API calls
  • align PR scoring tests with current scoring behavior

Testing

  • bun test tests
  • bun run format

https://chatgpt.com/codex/tasks/task_b_6863743dcd08832e9d3df091df05b95d

@vercel
Copy link

vercel bot commented Jul 1, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
contribution-tracker ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 1, 2025 5:44am

Comment on lines +25 to 26
it("should cap review points at 5", () => {
const mockPRs: AnalyzedPR[] = []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test file appears to have multiple test definitions using it() blocks. According to the project's testing standards, each test file should contain at most one test() call, with additional tests split into separate numbered files. Consider refactoring these tests into multiple files (e.g., test-pr-scoring-1.test.ts, test-pr-scoring-2.test.ts, etc.) to align with the established testing pattern.

Spotted by Diamond (based on custom rules)

Is this helpful? React 👍 or 👎 to let us know.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Issue Retrieval Flaw Causes Inaccurate Statistics

The getRecentIssues function incorrectly retrieves recent issues, leading to incomplete and inaccurate contributor statistics. It only fetches the first 100 issues (per_page: 100) without pagination, missing older issues in high-activity repositories. Furthermore, the since parameter filters by updated_at (not created_at), causing it to include old, recently updated issues and exclude new, un-updated ones, despite sorting by created.

lib/data-retrieval/getRecentIssues.ts#L1-L16

import { octokit } from "lib/sdks"
export async function getRecentIssues(repo: string, since: string) {
const [owner, repoName] = repo.split("/")
const { data } = await octokit.issues.listForRepo({
owner,
repo: repoName,
state: "all",
sort: "created",
direction: "desc",
per_page: 100,
since,
})
return data.filter((issue) => !issue.pull_request)
}

Fix in Cursor


BugBot free trial expires on July 22, 2025
You have used $0.00 of your $50.00 spend limit so far. Manage your spend limit in the Cursor dashboard.

Was this report helpful? Give feedback by reacting with 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants