{"id":15755468,"url":"https://github.com/grantbirki/github-username-regex-ruby","last_synced_at":"2025-10-11T19:31:12.120Z","repository":{"id":176448647,"uuid":"658086684","full_name":"GrantBirki/github-username-regex-ruby","owner":"GrantBirki","description":"A lightweight Ruby Gem to check if a GitHub username / handle is valid","archived":false,"fork":false,"pushed_at":"2025-01-14T21:57:41.000Z","size":28481,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-20T16:54:52.333Z","etag":null,"topics":["gem","github","regex","ruby","validation"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/github-username-regex-ruby","language":"Ruby","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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-24T18:13:07.000Z","updated_at":"2025-01-14T06:34:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"ce23de97-f2a1-4127-b061-a2d03ed542bf","html_url":"https://github.com/GrantBirki/github-username-regex-ruby","commit_stats":null,"previous_names":["grantbirki/github-username-regex-ruby"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrantBirki%2Fgithub-username-regex-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrantBirki%2Fgithub-username-regex-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrantBirki%2Fgithub-username-regex-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrantBirki%2Fgithub-username-regex-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GrantBirki","download_url":"https://codeload.github.com/GrantBirki/github-username-regex-ruby/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236125414,"owners_count":19098837,"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":["gem","github","regex","ruby","validation"],"created_at":"2024-10-04T08:21:59.272Z","updated_at":"2025-10-11T19:31:06.205Z","avatar_url":"https://github.com/GrantBirki.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# github-username-regex-ruby\n\n[![test](https://github.com/GrantBirki/github-username-regex-ruby/actions/workflows/test.yml/badge.svg)](https://github.com/GrantBirki/github-username-regex-ruby/actions/workflows/test.yml) [![lint](https://github.com/GrantBirki/github-username-regex-ruby/actions/workflows/lint.yml/badge.svg)](https://github.com/GrantBirki/github-username-regex-ruby/actions/workflows/lint.yml) [![build](https://github.com/GrantBirki/github-username-regex-ruby/actions/workflows/build.yml/badge.svg)](https://github.com/GrantBirki/github-username-regex-ruby/actions/workflows/build.yml) [![release](https://github.com/GrantBirki/github-username-regex-ruby/actions/workflows/release.yml/badge.svg)](https://github.com/GrantBirki/github-username-regex-ruby/actions/workflows/release.yml) [![CodeQL](https://github.com/GrantBirki/github-username-regex-ruby/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/GrantBirki/github-username-regex-ruby/actions/workflows/codeql-analysis.yml)\n\nA lightweight Ruby Gem to check if a GitHub username / handle is valid\n\n## Installation 💎\n\nYou can download this Gem from either [RubyGems](https://rubygems.org/gems/github-username-regex-ruby) or [GitHub Packages](https://github.com/GrantBirki/github-username-regex-ruby/pkgs/rubygems/github-username-regex-ruby)\n\nRubyGems (Recommended):\n\n```bash\ngem install github-username-regex-ruby\n```\n\n\u003e RubyGems [link](https://rubygems.org/gems/github-username-regex-ruby)\n\n## Usage 💻\n\n```ruby\nrequire \"github_username_regex_ruby\"\n\n# Check if a username is valid\nGitHubUsernameRegex.valid?(\"GrantBirki\") # =\u003e returns true\nGitHubUsernameRegex.valid?(\"some$bad_username-\") # =\u003e returns false\n```\n\n## Regex ⚙️\n\nThe following regex pattern is used to check if a username is valid:\n\n```re\n/^[a-z\\d](?:[a-z\\d]|-(?=[a-z\\d])){0,38}$/i\n```\n\n\u003e View the regex [here](lib/github_username_regex_ruby.rb)\n\n## Release 🚀\n\nTo release a new version of this gem, simply edit the [`lib/version.rb`](lib/version.rb) in this repo. When you commit your changes to `main`, a new version will be automatically released via GitHub Actions to RubyGems and GitHub Packages.\n\n## Note 📝\n\nThis Gem 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 Gem 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-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrantbirki%2Fgithub-username-regex-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrantbirki%2Fgithub-username-regex-ruby/lists"}