Skip to content

next milestone#8

Merged
kworr merged 6 commits into
releasefrom
master
Jan 18, 2026
Merged

next milestone#8
kworr merged 6 commits into
releasefrom
master

Conversation

@kworr
Copy link
Copy Markdown
Owner

@kworr kworr commented Jan 18, 2026

Summary by CodeRabbit

  • Chores

    • Swapped an unused dependency for a lighter HTML-encoding library.
    • Adjusted CI trigger to run only on pull requests.
  • Bug Fixes

    • Improved validation to better detect and block Telegram pre/code closing tags and to return safely escaped HTML.
  • Style

    • Improved error log formatting for clearer messages.
  • Tests

    • Updated tests to reflect new validation and escaping behaviour.

✏️ Tip: You can customize this high-level summary in your review settings.

kworr added 2 commits January 18, 2026 08:14
FossilOrigin-Name: 700254f838f2fbbacadd85710150c8bdd8a8c6d250326298155122f0d5316702
FossilOrigin-Name: dafeec0481522bf9e16e41915209e178c9e39358afe1459bdc5818cee993e4ef
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 18, 2026

Warning

Rate limit exceeded

@kworr has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 0 minutes and 56 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between e1147a2 and cc4dc53.

📒 Files selected for processing (1)
  • src/mail.rs
📝 Walkthrough

Walkthrough

Replaces scraper-based HTML validation with a regex-based closing-tag check and HTML-escaping, updates Cargo.toml dependencies accordingly, adjusts a log formatting call in mail.rs, and updates tests to match the new validation/escaping behaviour.

Changes

Cohort / File(s) Summary
Dependencies
Cargo.toml
Removed scraper = "0.25.0" and added html-escape = "0.2.13".
Validation logic
src/utils.rs
Introduced pub static ref RE_CLOSING regex; changed validate signature to return Cow<'_, str>; replaced scraper-based HTML fragment parsing with regex check for Telegram </pre>/</code> and HTML-escaping via html_escape::encode_text.
Logging
src/mail.rs
Changed relay_mail error log formatting from {:?} (Debug) to {} (Display).
Tests
src/tests.rs
Updated assertions to expect HTML-escaped output and adjusted panic message to match new "Telegram closing tag found." error text.
CI workflow
.github/workflows/rust-clippy.yml
Removed push trigger and concurrency cancellation; workflow now triggers on pull_request only.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • next milestone #7: Modifies src/utils.rs validation/encoding logic in a manner directly related to replacing scraper-based parsing with regex/escaping approaches.
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'next milestone' is vague and does not clearly summarise the specific changes made in this pull request, which involve dependency updates, validation logic refactoring, and workflow modifications. Replace with a more descriptive title that highlights the primary change, such as 'Replace HTML parsing with regex-based validation and HTML escaping' or 'Refactor HTML validation logic and update dependencies'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch master

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-advanced-security
Copy link
Copy Markdown

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

kworr added 4 commits January 18, 2026 09:13
FossilOrigin-Name: 85fa6bddaa61c222f6da09f8f9deeb295723b2892c4acaf8d1faf92469d81210
FossilOrigin-Name: 8e37b3f0284b7a8b66ba893960a8b4f2543259528b3cd8b6899d74ef4f8c82a9
FossilOrigin-Name: db04f7359b24b432a11091568c2ca0fda5af48610b1c3f9391fcad17dcef152c
FossilOrigin-Name: d036a091277b9dc0c42bbff2d4b6185612b16025583603387c4fa07e906bc844
@kworr kworr merged commit 493ead2 into release Jan 18, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Apr 23, 2026
Merged
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