diff --git a/github/org_custom_roles.go b/github/orgs_custom_roles.go similarity index 96% rename from github/org_custom_roles.go rename to github/orgs_custom_roles.go index 7c60fea07b..d320a90514 100644 --- a/github/org_custom_roles.go +++ b/github/orgs_custom_roles.go @@ -29,7 +29,7 @@ type CustomRepoRoles struct { // // GitHub API docs: https://docs.github.com/en/rest/orgs/custom-roles func (s *OrganizationsService) ListCustomRepoRoles(ctx context.Context, org string) (*OrganizationCustomRepoRoles, *Response, error) { - u := fmt.Sprintf("organizations/%v/custom_roles", org) + u := fmt.Sprintf("orgs/%v/custom_roles", org) req, err := s.client.NewRequest("GET", u, nil) if err != nil { diff --git a/github/org_custom_roles_test.go b/github/orgs_custom_roles_test.go similarity index 93% rename from github/org_custom_roles_test.go rename to github/orgs_custom_roles_test.go index cfcb02611a..7042a5ec82 100644 --- a/github/org_custom_roles_test.go +++ b/github/orgs_custom_roles_test.go @@ -18,7 +18,7 @@ func TestOrganizationsService_ListCustomRepoRoles(t *testing.T) { client, mux, _, teardown := setup() defer teardown() - mux.HandleFunc("/organizations/o/custom_roles", func(w http.ResponseWriter, r *http.Request) { + mux.HandleFunc("/orgs/o/custom_roles", func(w http.ResponseWriter, r *http.Request) { testMethod(t, r, "GET") fmt.Fprint(w, `{"total_count": 1, "custom_roles": [{ "id": 1, "name": "Developer"}]}`) })