Skip to content

Commit 6931fad

Browse files
Fix endpoints for orgs custom roles (#2370)
1 parent 0cf45d2 commit 6931fad

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type CustomRepoRoles struct {
2929
//
3030
// GitHub API docs: https://docs.github.com/en/rest/orgs/custom-roles
3131
func (s *OrganizationsService) ListCustomRepoRoles(ctx context.Context, org string) (*OrganizationCustomRepoRoles, *Response, error) {
32-
u := fmt.Sprintf("organizations/%v/custom_roles", org)
32+
u := fmt.Sprintf("orgs/%v/custom_roles", org)
3333

3434
req, err := s.client.NewRequest("GET", u, nil)
3535
if err != nil {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func TestOrganizationsService_ListCustomRepoRoles(t *testing.T) {
1818
client, mux, _, teardown := setup()
1919
defer teardown()
2020

21-
mux.HandleFunc("/organizations/o/custom_roles", func(w http.ResponseWriter, r *http.Request) {
21+
mux.HandleFunc("/orgs/o/custom_roles", func(w http.ResponseWriter, r *http.Request) {
2222
testMethod(t, r, "GET")
2323
fmt.Fprint(w, `{"total_count": 1, "custom_roles": [{ "id": 1, "name": "Developer"}]}`)
2424
})

0 commit comments

Comments
 (0)