RedPlanetHQ / RedPlanetHQ/core
Fix GitHub Integration: Issues and Comments Not Syncing Properly
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 194
- Avg merge
- 12m
- Merged PRs (30d)
- 2
Description
Description
The GitHub integration is currently failing to properly sync issues and comments. Comments are confirmed to be failing, and issues need verification.
Current Implementation
Integration Files
integrations/github/src/schedule.ts:1-363- Main sync logicintegrations/github/src/utils.ts- API utility functionsintegrations/github/src/index.ts:1-69- Integration setup
Known Issues
-
Comments Failing
- Comment processing is not working correctly
- Check
processUserEventsfunction inschedule.ts:206-280 - The function processes PR/issue comments (types:
pr_comment,issue_comment)
-
Issues Need Verification
- Need to verify if issue creation/updates are syncing
- Check notification processing for issue events
Areas to Investigate
1. User Events Processing (schedule.ts:206-280)
// This function should handle:
- 'pr_comment': PR comments by user
- 'issue_comment': Issue comments by user
- 'issue': Issues created by user
2. Notification Processing (schedule.ts:49-201)
// Check these notification reasons:
- 'comment': Comments on issues/PRs
- 'author': Updates on user's issues/PRs
3. API Calls (utils.ts)
- Check
getUserEventsfunction - Check
getGithubDatafunction - Verify API rate limiting isn't causing failures
- Check error handling (many errors are silently caught)
Debugging Steps
- Add logging to
processUserEventsto see what data is returned - Check if GitHub API responses have changed format
- Verify authentication scopes are sufficient
- Check if pagination is working correctly
- Review error handling - many try/catch blocks silently ignore errors
Files to Check
integrations/github/src/schedule.ts:206-280- User events processingintegrations/github/src/schedule.ts:49-201- Notification processingintegrations/github/src/schedule.ts:132-133- Comment handling in notificationsintegrations/github/src/schedule.ts:245-250- Comment types in user eventsintegrations/github/src/utils.ts- API utility functions
Expected Behavior
- User comments on issues/PRs should appear in inbox
- Issue creation/updates should be tracked
- Comments from others on user's issues/PRs should be tracked
Labels
bug, integration
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading integrations/github/src/schedule.ts, especially processUserEvents at lines 206-280 and notification processing at lines 49-201, then inspect getUserEvents and getGithubData in utils.ts. Trace returned event and notification data, pagination, rate-limit behavior, and silently caught errors. Done means user comments appear in the inbox and issue creation, updates, and comments on the user's issues or PRs are tracked.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100