docs(discussion/shared): explain why we accept http scheme

Signed-off-by: Babak K. Shandiz <babakks@github.com>
This commit is contained in:
Babak K. Shandiz 2026-04-24 21:54:35 +01:00
parent 7603a0c8ce
commit ca8d878d80
No known key found for this signature in database
GPG key ID: 9472CAEFF56C742E

View file

@ -29,6 +29,9 @@ func ParseDiscussionArg(arg string) (int, ghrepo.Interface, error) {
return 0, nil, fmt.Errorf("invalid discussion argument: %q", arg)
}
// Note that an HTTP URL is also okay, because we're just using the URL to find
// the discussion number, repo and host, and we wont be unsecure HTTP API calls.
m := discussionURLRE.FindStringSubmatch(u.Path)
if m == nil {
return 0, nil, fmt.Errorf("invalid discussion URL: %q", arg)