Skip to content

Commit

Permalink
Merge pull request #16 from form3tech-oss/blisiecki-fix-incorrect-ent…
Browse files Browse the repository at this point in the history
…erprise-query

fix: Fix incorrect graphql query for enterprise allowlist
  • Loading branch information
janakerman-form3 committed Jan 27, 2023
2 parents 6e6df28 + 5416c0f commit 62512a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion github/enterprise_ip_allow_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package github

import (
"context"

"github.com/pkg/errors"
)

Expand Down Expand Up @@ -85,7 +86,7 @@ func (c *Client) getEnterpriseIPAllowListEntriesWithCache(ctx context.Context, e
}

func (c *Client) getEnterpriseIPAllowListEntries(ctx context.Context, enterpriseName string) ([]*IPAllowListEntry, error) {
reqData := GraphQLRequest{Query: getEnterpriseIPAllowListEntriesQuery, Variables: map[string]any{"org": enterpriseName}}
reqData := GraphQLRequest{Query: getEnterpriseIPAllowListEntriesQuery, Variables: map[string]any{"enterpriseName": enterpriseName}}
entries, err := paginate[GetEnterpriseIPAllowListQueryResponse, IPAllowListEntry](ctx, c, reqData,
func(t *GetEnterpriseIPAllowListQueryResponse) []*IPAllowListEntry {
return t.Enterprise.OwnerInfo.IPAllowListEntries.Nodes
Expand Down

0 comments on commit 62512a7

Please sign in to comment.