docs(discussion/shared): explain why we accept http scheme
Signed-off-by: Babak K. Shandiz <babakks@github.com>
This commit is contained in:
parent
7603a0c8ce
commit
ca8d878d80
1 changed files with 3 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue