Skip to content

Commit

Permalink
Fix endpoints for orgs custom roles (#2370)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshua-hancox committed May 23, 2022
1 parent 0cf45d2 commit 6931fad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion github/org_custom_roles.go → github/orgs_custom_roles.go
Expand Up @@ -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 {
Expand Down
Expand Up @@ -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"}]}`)
})
Expand Down

0 comments on commit 6931fad

Please sign in to comment.