Skip to content

Fix GitHub handle matching for www.github.com URLs - #1019

Merged
danbarr merged 1 commit into
mainfrom
fix-slack-github-handle-www-url
Jul 7, 2026
Merged

Fix GitHub handle matching for www.github.com URLs#1019
danbarr merged 1 commit into
mainfrom
fix-slack-github-handle-www-url

Conversation

@danbarr

@danbarr danbarr commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

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 the github.com/, http://github.com/, and https://github.com/ prefixes. A profile value using the www. subdomain (https://www.github.com/<login>) didn't match any of those, so it fell through untouched into the trailing split("/", 1)[0] step, which chopped it down to https: instead of the login. The affected reviewer silently fell back to a plain @handle text mention instead of a real Slack tag.

Now strips an optional www. subdomain before checking for the github.com/ host, so www., non-www., and scheme-less forms all normalize to the same login.

Type of change

  • Bug fix (internal/workflow)

Related issues/PRs

None.

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.
Copilot AI review requested due to automatic review settings July 7, 2026 13:16
@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs-website Ready Ready Preview, Comment Jul 7, 2026 1:16pm

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 normalize github.com/<login> down to <login> consistently.
  • Clarify the normalize_handle() docstring to describe the supported URL forms.

@danbarr
danbarr enabled auto-merge (squash) July 7, 2026 13:18
@danbarr
danbarr merged commit b5182b5 into main Jul 7, 2026
4 checks passed
@danbarr
danbarr deleted the fix-slack-github-handle-www-url branch July 7, 2026 13:18
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.

3 participants