Skip to content

fix: Handle null user in comment transformation#38

Closed
rbolkey wants to merge 1 commit intolinearis-oss:mainfrom
rbolkey:fix/null-comment-user
Closed

fix: Handle null user in comment transformation#38
rbolkey wants to merge 1 commit intolinearis-oss:mainfrom
rbolkey:fix/null-comment-user

Conversation

@rbolkey
Copy link
Copy Markdown

@rbolkey rbolkey commented Jan 16, 2026

Summary

  • Fix crash when reading issues with system-generated comments (e.g., Jira sync) that have user: null
  • Apply the same null-checking pattern used for other nullable relationships (assignee, project, cycle)
  • Add unit tests for comment user handling

Test plan

  • Run npm test - all tests pass
  • Run npm run build - compiles successfully
  • Test manually with node dist/main.js issues read BRK-246 - returns JSON without crashing

Resolves #6

🤖 Generated with Claude Code

System-generated comments (e.g., Jira sync notifications) have user: null
in the Linear API response. Apply the same null-checking pattern used for
other nullable relationships (assignee, project, cycle).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@rbolkey
Copy link
Copy Markdown
Author

rbolkey commented Jan 20, 2026

Ah, I see this is a duplicate of #35

phinze added a commit to phinze/nix-config that referenced this pull request Mar 9, 2026
Fixes crash when Linear comments have a null user field (deleted
users, integrations). Upstream fix: linearis-oss/linearis#38 — remove
patch once released.
@iamfj
Copy link
Copy Markdown
Collaborator

iamfj commented Apr 7, 2026

Thanks for the fix, @rbolkey!

The codebase has been completely rewritten since this PR was opened (see #49), so this patch no longer applies. The comment handling code has been restructured.

I'll verify whether the underlying bug (#6) still reproduces on the current version and handle it there. Closing this PR for now.

Appreciate the contribution! 🙏

@iamfj iamfj closed this Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot read properties of null (reading 'id')

2 participants