Skip to content
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

Fix broken links in triagebot #29

Merged
merged 2 commits into from
Feb 5, 2025
Merged

Conversation

marcellino-ornelas
Copy link
Contributor

@marcellino-ornelas marcellino-ornelas commented Feb 5, 2025

Type of change (place an x in the [ ] that applies)

  • New sample
  • New feature
  • Bug fix
  • Documentation

Summary

Triagebot currently has a bug where some links aren't displaying as links

example:
Screenshot 2025-02-05 at 12 57 54 PM

The issue here is that when we truncate the main slack message, its possible to truncate a link, channel, or user link (Eg <channel,user,link>). This causes a dangling < to be left in the message which effects the next message below.

To fix this bug, well be using a new regex to replace all dangling < after the message has been truncated this way it cant effect the next message.

Screenshot 2025-02-05 at 1 00 43 PM

The channel, link, user will always be broken at the end because of the truncation but thats something we can try to solve another day

Testing

This function lacked testing so I decided to add some unit tests to test old behavior and new behavior im introducing

Requirements (place an x in each [ ] that applies)

  • I’ve checked my submission against the Samples Checklist to ensure it complies with all standards
  • I have ensured the changes I am contributing align with existing patterns and have tested and linted my code
  • I've read and agree to the Code of Conduct

@marcellino-ornelas marcellino-ornelas marked this pull request as ready for review February 5, 2025 21:08
@marcellino-ornelas marcellino-ornelas merged commit 9dbb210 into main Feb 5, 2025
2 checks passed
@marcellino-ornelas marcellino-ornelas deleted the lino_fix_broken_links branch February 5, 2025 21:13
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.

2 participants