fix: apply url.PathEscape to databaseId in ruleset view HTTP functions
Agent-Logs-Url: https://github.com/cli/cli/sessions/e09c6964-46ba-4baf-a486-f8dce8c7ac48 Co-authored-by: babakks <36728931+babakks@users.noreply.github.com>
This commit is contained in:
parent
74054c0f71
commit
0c1c1bdab3
1 changed files with 2 additions and 2 deletions
|
|
@ -11,12 +11,12 @@ import (
|
|||
)
|
||||
|
||||
func viewRepoRuleset(httpClient *http.Client, repo ghrepo.Interface, databaseId string) (*shared.RulesetREST, error) {
|
||||
path := fmt.Sprintf("repos/%s/%s/rulesets/%s", repo.RepoOwner(), repo.RepoName(), databaseId)
|
||||
path := fmt.Sprintf("repos/%s/%s/rulesets/%s", repo.RepoOwner(), repo.RepoName(), url.PathEscape(databaseId))
|
||||
return viewRuleset(httpClient, repo.RepoHost(), path)
|
||||
}
|
||||
|
||||
func viewOrgRuleset(httpClient *http.Client, orgLogin string, databaseId string, host string) (*shared.RulesetREST, error) {
|
||||
path := fmt.Sprintf("orgs/%s/rulesets/%s", url.PathEscape(orgLogin), databaseId)
|
||||
path := fmt.Sprintf("orgs/%s/rulesets/%s", url.PathEscape(orgLogin), url.PathEscape(databaseId))
|
||||
return viewRuleset(httpClient, host, path)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue