[PR #217] [MERGED] feat(types): detect @-prefixed usernames on import #4135

Closed
opened 2026-08-30 17:56:27 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/reconurge/flowsint/pull/217
Author: @mohammadrezwankhan
Created: 8/25/2026
Status: ✅ Merged
Merged: 8/25/2026
Merged by: @dextmorgn

Base: main ← Head: patch-1


📝 Commits (2)

  • d0d37ee feat(types): detect @-prefixed usernames
  • d9a0982 Add regression tests for username detection

📊 Changes

2 files changed (+42 additions, -6 deletions)

View changed files

📝 flowsint-types/src/flowsint_types/username.py (+11 -6)
➕ flowsint-types/tests/test_username.py (+31 -0)

📄 Description

Summary

Closes #204.

This change recognizes social handles with a single leading @ during username detection, so .txt imports classify entries such as @johnDoe as Username rather than Unknown.

Implementation

  • Normalize one leading @ before checking the username pattern.
  • Preserve the existing 3–80 character limit and allowed character set.
  • Keep MD5, SHA-1, and SHA-256 detection independent by excluding hashes with or without an @ prefix.
  • Retain Username.from_string() normalization so stored values and node labels omit the prefix.

Tests

Added focused regression coverage for plain and @-prefixed handles, whitespace trimming, invalid prefixes, hash rejection, and normalized stored values.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/reconurge/flowsint/pull/217 **Author:** [@mohammadrezwankhan](https://github.com/mohammadrezwankhan) **Created:** 8/25/2026 **Status:** ✅ Merged **Merged:** 8/25/2026 **Merged by:** [@dextmorgn](https://github.com/dextmorgn) **Base:** `main` ← **Head:** `patch-1` --- ### 📝 Commits (2) - [`d0d37ee`](https://github.com/reconurge/flowsint/commit/d0d37ee9f2cd15e4e05c04da8e21f4b217f61b13) feat(types): detect @-prefixed usernames - [`d9a0982`](https://github.com/reconurge/flowsint/commit/d9a0982ad77ec07861ecb814b0ee5269fcdf47e7) Add regression tests for username detection ### 📊 Changes **2 files changed** (+42 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `flowsint-types/src/flowsint_types/username.py` (+11 -6) ➕ `flowsint-types/tests/test_username.py` (+31 -0) </details> ### 📄 Description ## Summary Closes #204. This change recognizes social handles with a single leading `@` during username detection, so `.txt` imports classify entries such as `@johnDoe` as `Username` rather than `Unknown`. ## Implementation - Normalize one leading `@` before checking the username pattern. - Preserve the existing 3–80 character limit and allowed character set. - Keep MD5, SHA-1, and SHA-256 detection independent by excluding hashes with or without an `@` prefix. - Retain `Username.from_string()` normalization so stored values and node labels omit the prefix. ## Tests Added focused regression coverage for plain and `@`-prefixed handles, whitespace trimming, invalid prefixes, hash rejection, and normalized stored values. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-08-30 17:56:27 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/flowsint#4135