RedPlanetHQ / RedPlanetHQ/core

Fix GitHub Integration: Issues and Comments Not Syncing Properly

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

Nobody has claimed this yet.

bug integration
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 logic
  • integrations/github/src/utils.ts - API utility functions
  • integrations/github/src/index.ts:1-69 - Integration setup
Known Issues
  1. Comments Failing

    • Comment processing is not working correctly
    • Check processUserEvents function in schedule.ts:206-280
    • The function processes PR/issue comments (types: pr_comment, issue_comment)
  2. 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 getUserEvents function
  • Check getGithubData function
  • Verify API rate limiting isn't causing failures
  • Check error handling (many errors are silently caught)

Debugging Steps

  1. Add logging to processUserEvents to see what data is returned
  2. Check if GitHub API responses have changed format
  3. Verify authentication scopes are sufficient
  4. Check if pagination is working correctly
  5. Review error handling - many try/catch blocks silently ignore errors

Files to Check

  • integrations/github/src/schedule.ts:206-280 - User events processing
  • integrations/github/src/schedule.ts:49-201 - Notification processing
  • integrations/github/src/schedule.ts:132-133 - Comment handling in notifications
  • integrations/github/src/schedule.ts:245-250 - Comment types in user events
  • integrations/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

  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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.