-
Notifications
You must be signed in to change notification settings - Fork 5
Resolve Linear updates with edits & length bug #364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
### Notes This resolves an issue where a Linear project update is reposted when an update is made to an existing update. If the request has updatedFrom, we can exclude this from being posted. In addition, this caps the description text to 500 characters and excludes any text in the embed that is under a collapsable section with +++
|
Claude finished @zuuring's task —— View job Reviewing PR: Resolve Linear updates issues with Edited & lengthTodo List:
Code Review FeedbackI've analyzed the changes in ✅ Strengths
🔍 Potential Issues & SuggestionsMinor Logic IssueLocation: const trimmedDescription = description.length > 500
? `${description.substring(0, 497)}...`
: descriptionIssue: Using Suggestion: For consistency, either:
Regex RobustnessLocation: const regex = /\+\+\+[\s\S]*?\+\+\+/gObservation: The regex correctly uses non-greedy matching ( Type Safety EnhancementLocation: // Current: implicit truthy check
if (updatedFrom) {
// More explicit alternative:
if (updatedFrom && Object.keys(updatedFrom).length > 0) {🚀 Performance Considerations
🔒 Security Assessment
🧪 Test Coverage RecommendationsThe changes would benefit from unit tests covering:
📋 Overall AssessmentCode Quality: ⭐⭐⭐⭐ (4/5) - Well-structured, readable, and maintainable code that follows established patterns Bug Risk: ⭐⭐⭐⭐⭐ (5/5) - Very low risk; changes are focused and defensive Performance: ⭐⭐⭐⭐⭐ (5/5) - Efficient implementation with appropriate early exits Security: ⭐⭐⭐⭐⭐ (5/5) - No security concerns introduced ✅ RecommendationAPPROVE - This is a solid implementation that effectively addresses the stated requirements. The minor suggestions above are optional improvements rather than blocking issues. The changes are focused, well-implemented, and maintain good code quality standards. |
|
Claude finished @zuuring's task —— View job Reviewing PR: Resolve Linear updates issues with Edited & lengthTodo List:
Code Review FeedbackI've analyzed the changes in ✅ Strengths
🔍 Potential Issues & SuggestionsMinor Logic IssueLocation: const trimmedDescription = description.length > 500
? `${description.substring(0, 500)}...`
: descriptionIssue: Using Suggestion: For consistency, either:
Regex RobustnessLocation: const regex = /\+\+\+[\s\S]*?\+\+\+/gObservation: The regex correctly uses non-greedy matching ( Type Safety EnhancementLocation: // Current: implicit truthy check
if (updatedFrom) {
// More explicit alternative:
if (updatedFrom && Object.keys(updatedFrom).length > 0) {🚀 Performance Considerations
🔒 Security Assessment
🧪 Test Coverage RecommendationsThe changes would benefit from unit tests covering:
📋 Overall AssessmentCode Quality: ⭐⭐⭐⭐ (4/5) - Well-structured, readable, and maintainable code that follows established patterns Bug Risk: ⭐⭐⭐⭐⭐ (5/5) - Very low risk; changes are focused and defensive Performance: ⭐⭐⭐⭐⭐ (5/5) - Efficient implementation with appropriate early exits Security: ⭐⭐⭐⭐⭐ (5/5) - No security concerns introduced ✅ RecommendationAPPROVE - This is a solid implementation that effectively addresses the stated requirements. The minor suggestions above are optional improvements rather than blocking issues. The changes are focused, well-implemented, and maintain good code quality standards. |
|
Is the outcome here that updates aren't posted, or that existing embeds are edited? |
At the moment it just ignores edited projectupdate events hitting the webhook, but we could also edit the embeds. Just would need to add some additional logic here to match it. wdyt? |
|
I think let's not do it yet. That kind of updating logic is exactly where I want us to move to a worker backed by a proper db, which could even be D2 for this use case. |
Notes
This resolves an issue where a Linear project update is reposted when an update is made to an existing update. If the request has updatedFrom, we can exclude this from being posted.
In addition, this caps the description text to 500 characters and excludes any text in the embed that is under a collapsable section with +++