Fix GitHub handle matching for www.github.com URLs - #1019
Merged
Conversation
normalize_handle() only stripped github.com/, http://github.com/, and https://github.com/ prefixes, so a profile value like https://www.github.com/<login> fell through untouched and got mangled by the trailing split. Strip an optional www. subdomain before checking for the github.com/ host.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes GitHub handle normalization in the Autogen Docs Slack Notify workflow so Slack user resolution works when a reviewer’s custom profile field contains a www.github.com/<login> style URL.
Changes:
- Update
normalize_handle()to strip an optional URL scheme (http:///https://) before normalization. - Strip an optional
www.subdomain and then normalizegithub.com/<login>down to<login>consistently. - Clarify the
normalize_handle()docstring to describe the supported URL forms.
danbarr
enabled auto-merge (squash)
July 7, 2026 13:18
rdimitrov
approved these changes
Jul 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The Autogen Docs Slack Notify workflow resolves each requested reviewer's GitHub login to a Slack mention by reading a "GitHub Handle" custom profile field and normalizing it for comparison.
normalize_handle()only stripped thegithub.com/,http://github.com/, andhttps://github.com/prefixes. A profile value using thewww.subdomain (https://www.github.com/<login>) didn't match any of those, so it fell through untouched into the trailingsplit("/", 1)[0]step, which chopped it down tohttps:instead of the login. The affected reviewer silently fell back to a plain@handletext mention instead of a real Slack tag.Now strips an optional
www.subdomain before checking for thegithub.com/host, sowww., non-www., and scheme-less forms all normalize to the same login.Type of change
Related issues/PRs
None.