{"id":15755454,"url":"https://github.com/grantbirki/github-username-regex-rust","last_synced_at":"2026-05-01T15:32:17.333Z","repository":{"id":193141907,"uuid":"688204687","full_name":"GrantBirki/github-username-regex-rust","owner":"GrantBirki","description":"A lightweight Rust crate to check if a GitHub username / handle is valid","archived":false,"fork":false,"pushed_at":"2023-09-12T17:57:53.000Z","size":11572,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T17:08:46.850Z","etag":null,"topics":["crate","github","regex","rust","validation"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/github_username_regex","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GrantBirki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-06T21:47:01.000Z","updated_at":"2023-09-12T17:04:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"98898a05-59ec-4b28-915b-4c228ff53e9d","html_url":"https://github.com/GrantBirki/github-username-regex-rust","commit_stats":{"total_commits":39,"total_committers":2,"mean_commits":19.5,"dds":0.02564102564102566,"last_synced_commit":"62cd5c34247994f89a82df6e72b55e3cfa0ddef1"},"previous_names":["grantbirki/github-username-regex-rust"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrantBirki%2Fgithub-username-regex-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrantBirki%2Fgithub-username-regex-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrantBirki%2Fgithub-username-regex-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrantBirki%2Fgithub-username-regex-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GrantBirki","download_url":"https://codeload.github.com/GrantBirki/github-username-regex-rust/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246436380,"owners_count":20776995,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crate","github","regex","rust","validation"],"created_at":"2024-10-04T08:21:54.530Z","updated_at":"2026-05-01T15:32:17.298Z","avatar_url":"https://github.com/GrantBirki.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# github-username-regex-rust\n\n[![test](https://github.com/GrantBirki/github-username-regex-rust/actions/workflows/test.yml/badge.svg)](https://github.com/GrantBirki/github-username-regex-rust/actions/workflows/test.yml) [![lint](https://github.com/GrantBirki/github-username-regex-rust/actions/workflows/lint.yml/badge.svg)](https://github.com/GrantBirki/github-username-regex-rust/actions/workflows/lint.yml) [![build](https://github.com/GrantBirki/github-username-regex-rust/actions/workflows/build.yml/badge.svg)](https://github.com/GrantBirki/github-username-regex-rust/actions/workflows/build.yml) [![release](https://github.com/GrantBirki/github-username-regex-rust/actions/workflows/release.yml/badge.svg)](https://github.com/GrantBirki/github-username-regex-rust/actions/workflows/release.yml)\n\nA lightweight Rust crate to check if a GitHub username / handle is valid\n\n## Installation 📦\n\nYou can use this crate from [crates.io](https://crates.io/crates/github_username_regex) with the following command:\n\n```bash\ncargo add github_username_regex\n```\n\n\u003e This will add the latest version of this crate to your `Cargo.toml` file\n\nOr you can use a version:\n\n```toml\n# Cargo.toml\n\n[dependencies]\ngithub_username_regex = \"X.X.X\" # where X.X.X is the version you want to use\n```\n\n## Usage 💻\n\nUsing this crate is very simple. You can use the `valid` function to check if a GitHub username is valid. This function returns a `bool` value.\n\nHere is an example:\n\n```rust\nfn main() {\n    let handle = \"monalisa\";\n    let valid = github_username_regex::valid(\u0026handle);\n    if valid {\n        println!(\"{} is a valid GitHub username\", handle);\n    } else {\n        println!(\"{} is not a valid GitHub username\", handle);\n    }\n}\n```\n\nConsole output of the above code:\n\n```console\n$ cargo run\n...\nmonalisa is a valid GitHub username\n```\n\n## Release 🚀\n\nTo release a new version of this gem, simply edit the [`Cargo.toml`](Cargo.toml) file in this repo. You just need to update the `version` value. When you commit (or merge) your changes to `main`, a new version will be automatically released via GitHub Actions to [crates.io](https://crates.io). Addtionally, a new release tag will be pushed to this repository as well.\n\n## Note 📝\n\nThis Crate doesn't take reserved usernames into consideration. For example, it matches `help`, `about` and `pricing`, though they are reserved words and cannot be used as GitHub usernames.\n\n## Credits 🙏\n\nThis Crate is based on the following npm [package](https://github.com/shinnn/github-username-regex)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrantbirki%2Fgithub-username-regex-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrantbirki%2Fgithub-username-regex-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrantbirki%2Fgithub-username-regex-rust/lists"}