Repository navigation
Conversation
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Reviewer's GuideThe PR adds exact GitHub issue endpoint selection and a capped, newest-updated list mode, wiring both through validated CLI options and the existing atomic/idempotent import pipeline, with comprehensive fixture-backed integration coverage and updated documentation. Sequence diagram for selected GitHub issue importsequenceDiagram
participant CLI
participant Importer
participant GitHub
participant Tracker
CLI->>Importer: parseImportOptions(options)
Importer->>Importer: parseIssueNumbers(repo, input)
loop selected issue numbers
Importer->>GitHub: GET /repos/{repo}/issues/{number}
GitHub-->>Importer: issue or HTTP 404
end
alt missing issue during normal import
Importer-->>CLI: error, no issues imported
else valid selection
Importer->>Tracker: import selected issues
Tracker-->>Importer: imported, updated, skipped
Importer-->>CLI: result with missingIssues when applicable
end
Sequence diagram for capped GitHub issue list importsequenceDiagram
participant CLI
participant Importer
participant GitHub
participant Tracker
CLI->>Importer: parseImportOptions(options)
Importer->>GitHub: GET /repos/{repo}/issues?sort=updated&direction=desc&per_page=n+1
loop pagination
GitHub-->>Importer: issue page and Link header
Importer->>Importer: applyClientFilters(issues, opts)
alt more than n eligible issues
Importer-->>Importer: retain n+1 and stop pagination
else no truncation proven
Importer->>GitHub: follow next page
end
end
Importer->>Tracker: import first n eligible issues
Tracker-->>Importer: import result with limit and truncated
Importer-->>CLI: bounded import result
Flow diagram for GitHub import mode validationflowchart TD
A[GitHub import command] --> B{--issue provided?}
B -->|Yes| C[parseIssueNumbers]
C --> D{Conflicting flags or invalid reference?}
D -->|Yes| E[Usage error]
D -->|No| F[Fetch selected issue endpoints]
B -->|No| G{--limit provided?}
G -->|Yes| H[Validate positive integer]
H --> I[Fetch newest-updated list with one-item probe]
G -->|No| J[Fetch existing list mode]
F --> K[Shared import pipeline]
I --> K
J --> K
K --> L[Atomic and idempotent tracker writes]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Agents tracking a single GitHub issue currently have to approximate with
--since, which can import unrelated issues in a busy repository. This adds exact selection and a bounded list mode.pm github import owner/repo --issue 189fetches only that issue endpoint. Comma-separated numbers,#N, and same-repository references deduplicate before fetch; malformed or cross-repository references and conflicting list flags fail with usage errors. All selected numbers are fetched before tracker writes. A missing number refuses the batch, while dry runs reportmissingIssues; PR numbers require--include-prs. Comments, dependency linking, atomic transactions, gates, custom types, and provenance idempotency retain the shared import pipeline.--limit nrequests newest-updated order and stops list pagination after one extra eligible issue proves truncation. Results carrylimitandtruncated. Help, importer and legacy command examples, and README describe both flags. PR #115 blocker code is untouched.Before: tracking one issue needed a timestamp window and a check for accidental imports. After:
--issue 189fetches one endpoint; re-import updates the samegh:owner/repo#189item.Validation:
runImportfails the selection test 0/1 with AssertionError (2 imports instead of 1). Restoring onlybuildIssuesUrl/fetchAllIssuesfails the cap-plus-probe test 0/1 (3 issues instead of 2). Unchanged tests ran in disposable candidate copies; production source remained unchanged.pm github import unbraind/pm-web --issue 189 --dry-runplanned one import and left zero items; a real import created exactly one provenance-tagged item.npm run release:checkandbun run release:checkeach pass 546/546 tests with zero failures/skips/cancellations/todo and exact 100/100/100/100 coverage across 12 authored modules. The Bun release chain's coverage runner invokes Node.Package owner and full evidence: pm-github-6srd. Item remains in progress with its claim released.
Summary by Sourcery
Support exact GitHub issue imports and bounded list imports while preserving safe, idempotent tracker synchronization.
New Features:
Bug Fixes:
Enhancements:
Documentation:
Tests:
Summary by cubic
Adds exact issue selection and a bounded list mode to
pm github import. Previously, tracking a single issue meant approximating with--since, which could pull in unrelated issues in a busy repository;--issue 189now fetches only that issue endpoint, and--limit ncaps list-mode imports.Details
--issueaccepts comma-separated numbers,#N, and same-repoowner/repo#Nreferences; references deduplicate before fetch, and malformed or cross-repo references fail with usage errors.missingIssuesinstead), and PRs require--include-prs.--limitfetches newest-updated order and stops after one extra eligible issue proves truncation; results carrylimitandtruncated.--issueconflicts with state/label/since/assignee/milestone filters and with--limit; both flags compose with comments, dependency linking, atomic imports, gates, and custom types, and re-imports update the samegh:owner/repo#Nitem.Written for commit e0aae13. Summary will update on new commits.