{"modulePath":"github.com/integrations/terraform-provider-github/v6","version":"v6.13.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package github\n\n## Constants\n\n```go\nconst (\n\t// DotComAPIURL is the base API URL for github.com.\n\tDotComAPIURL = \"https://api.github.com/\"\n\t// DotComHost is the hostname for github.com.\n\tDotComHost = \"github.com\"\n\t// DotComAPIHost is the API hostname for github.com.\n\tDotComAPIHost = \"api.github.com\"\n\t// RESTAPIPath is the rest api path for api.github.com \u0026 ghe.com.\n\tRESTAPIPath = \"/\"\n\t// GraphQLAPIPath is the graphql api path for api.github.com \u0026 ghe.com.\n\tGraphQLAPIPath = \"/graphql\"\n\t// GHESRESTAPISuffix is the rest api suffix for GitHub Enterprise Server.\n\tGHESRESTAPIPath = \"api/v3/\"\n\t// GHESGraphQLAPISuffix is the GraphQL api suffix for GitHub Enterprise Server.\n\tGHESGraphQLAPIPath = \"api/graphql\"\n)\n```\n\n```go\nconst (\n\tPROTECTION_ALLOWS_DELETIONS                 = \"allows_deletions\"\n\tPROTECTION_ALLOWS_FORCE_PUSHES              = \"allows_force_pushes\"\n\tPROTECTION_BLOCKS_CREATIONS                 = \"blocks_creations\"\n\tPROTECTION_DISMISSES_STALE_REVIEWS          = \"dismiss_stale_reviews\"\n\tPROTECTION_FORCE_PUSHES_BYPASSERS           = \"force_push_bypassers\"\n\tPROTECTION_IS_ADMIN_ENFORCED                = \"enforce_admins\"\n\tPROTECTION_LOCK_BRANCH                      = \"lock_branch\"\n\tPROTECTION_PATTERN                          = \"pattern\"\n\tPROTECTION_PULL_REQUESTS_BYPASSERS          = \"pull_request_bypassers\"\n\tPROTECTION_PUSH_ALLOWANCES                  = \"push_allowances\"\n\tPROTECTION_REQUIRED_APPROVING_REVIEW_COUNT  = \"required_approving_review_count\"\n\tPROTECTION_REQUIRED_STATUS_CHECK_CONTEXTS   = \"contexts\"\n\tPROTECTION_REQUIRES_APPROVING_REVIEWS       = \"required_pull_request_reviews\"\n\tPROTECTION_REQUIRES_CODE_OWNER_REVIEWS      = \"require_code_owner_reviews\"\n\tPROTECTION_REQUIRES_COMMIT_SIGNATURES       = \"require_signed_commits\"\n\tPROTECTION_REQUIRES_CONVERSATION_RESOLUTION = \"require_conversation_resolution\"\n\tPROTECTION_REQUIRES_LINEAR_HISTORY          = \"required_linear_history\"\n\tPROTECTION_REQUIRES_STATUS_CHECKS           = \"required_status_checks\"\n\tPROTECTION_REQUIRES_STRICT_STATUS_CHECKS    = \"strict\"\n\tPROTECTION_REQUIRE_LAST_PUSH_APPROVAL       = \"require_last_push_approval\"\n\tPROTECTION_RESTRICTS_PUSHES                 = \"restrict_pushes\"\n\tPROTECTION_RESTRICTS_REVIEW_DISMISSALS      = \"restrict_dismissals\"\n\tPROTECTION_REVIEW_DISMISSAL_ALLOWANCES      = \"dismissal_restrictions\"\n\n\tREPOSITORY_ID = \"repository_id\"\n)\n```\n\n## Variables\n\n```go\nvar (\n\t// GHECHostMatch is a regex to match GitHub Enterprise Cloud hosts.\n\tGHECHostMatch = regexp.MustCompile(`\\.ghe\\.com$`)\n\t// GHECAPIHostMatch is a regex to match GitHub Enterprise Cloud API hosts.\n\tGHECAPIHostMatch = regexp.MustCompile(`^api\\.[a-zA-Z0-9-]+\\.ghe\\.com$`)\n)\n```\n\n## Functions\n\n```go\nfunc GenerateOAuthTokenFromApp(apiURL *url.URL, appID, appInstallationID, pemData string) (string, error)\n```\nGenerateOAuthTokenFromApp generates a GitHub OAuth access token from a set of valid GitHub App credentials. The returned token can be used to interact with both GitHub's REST and GraphQL APIs.\n\n```go\nfunc NewEtagTransport(rt http.RoundTripper) *etagTransport\n```\n\n```go\nfunc NewProvider(version, commit string) func() *schema.Provider\n```\nNewProvider returns a function that returns the schema.Provider for this provider.\n\n```go\nfunc RateLimitedHTTPClient(client *http.Client, writeDelay, readDelay, retryDelay time.Duration, parallelRequests bool, retryableErrors map[int]bool, maxRetries int) *http.Client\n```\n\n## Types\n\n```go\ntype Actor struct {\n\tID   githubv4.ID\n\tName githubv4.String\n\tSlug githubv4.String\n}\n```\n\n```go\ntype ActorUser struct {\n\tID    githubv4.ID\n\tName  githubv4.String\n\tLogin githubv4.String\n}\n```\n\n```go\ntype BranchProtectionResourceData struct {\n\tAllowsDeletions                bool\n\tAllowsForcePushes              bool\n\tBlocksCreations                bool\n\tBranchProtectionRuleID         string\n\tBypassForcePushActorIDs        []string\n\tBypassPullRequestActorIDs      []string\n\tDismissesStaleReviews          bool\n\tIsAdminEnforced                bool\n\tPattern                        string\n\tPushActorIDs                   []string\n\tRepositoryID                   string\n\tRequiredApprovingReviewCount   int\n\tRequiredStatusCheckContexts    []string\n\tRequiresApprovingReviews       bool\n\tRequiresCodeOwnerReviews       bool\n\tRequiresCommitSignatures       bool\n\tRequiresLinearHistory          bool\n\tRequiresConversationResolution bool\n\tRequiresStatusChecks           bool\n\tRequiresStrictStatusChecks     bool\n\tRestrictsPushes                bool\n\tRestrictsReviewDismissals      bool\n\tReviewDismissalActorIDs        []string\n\tRequireLastPushApproval        bool\n\tLockBranch                     bool\n}\n```\n\n```go\ntype BranchProtectionRule struct {\n\tRepository struct {\n\t\tID   githubv4.String\n\t\tName githubv4.String\n\t}\n\tPushAllowances struct {\n\t\tNodes []PushActorTypes\n\t} `graphql:\"pushAllowances(first: 100)\"`\n\tReviewDismissalAllowances struct {\n\t\tNodes []DismissalActorTypes\n\t} `graphql:\"reviewDismissalAllowances(first: 100)\"`\n\tBypassForcePushAllowances struct {\n\t\tNodes []BypassForcePushActorTypes\n\t} `graphql:\"bypassForcePushAllowances(first: 100)\"`\n\tBypassPullRequestAllowances struct {\n\t\tNodes []BypassPullRequestActorTypes\n\t} `graphql:\"bypassPullRequestAllowances(first: 100)\"`\n\tAllowsDeletions                githubv4.Boolean\n\tAllowsForcePushes              githubv4.Boolean\n\tBlocksCreations                githubv4.Boolean\n\tDismissesStaleReviews          githubv4.Boolean\n\tID                             githubv4.ID\n\tIsAdminEnforced                githubv4.Boolean\n\tPattern                        githubv4.String\n\tRequiredApprovingReviewCount   githubv4.Int\n\tRequiredStatusCheckContexts    []githubv4.String\n\tRequiresApprovingReviews       githubv4.Boolean\n\tRequiresCodeOwnerReviews       githubv4.Boolean\n\tRequiresCommitSignatures       githubv4.Boolean\n\tRequiresLinearHistory          githubv4.Boolean\n\tRequiresConversationResolution githubv4.Boolean\n\tRequiresStatusChecks           githubv4.Boolean\n\tRequiresStrictStatusChecks     githubv4.Boolean\n\tRestrictsPushes                githubv4.Boolean\n\tRestrictsReviewDismissals      githubv4.Boolean\n\tRequireLastPushApproval        githubv4.Boolean\n\tLockBranch                     githubv4.Boolean\n}\n```\n\n```go\ntype BypassForcePushActorTypes struct {\n\tActor struct {\n\t\tApp  Actor     `graphql:\"... on App\"`\n\t\tTeam Actor     `graphql:\"... on Team\"`\n\t\tUser ActorUser `graphql:\"... on User\"`\n\t}\n}\n```\n\n```go\ntype BypassPullRequestActorTypes struct {\n\tActor struct {\n\t\tApp  Actor     `graphql:\"... on App\"`\n\t\tTeam Actor     `graphql:\"... on Team\"`\n\t\tUser ActorUser `graphql:\"... on User\"`\n\t}\n}\n```\n\n```go\ntype Config struct {\n\tAppID             *string\n\tAppInstallationID *string\n\tAppPEM            []byte\n\tBaseURL           *url.URL\n\tIsGHES            bool\n\tCachePath         string\n\tInsecure          bool\n\tLegacyClient      bool\n\tMaxRetries        int\n\tOwner             string\n\tParallelRequests  bool\n\tReadDelay         time.Duration\n\tRetryableErrors   map[int]bool\n\tRetryDelay        time.Duration\n\tToken             string\n\tWriteDelay        time.Duration\n}\n```\n\n```go\nfunc (c *Config) Anonymous() bool\n```\n\n```go\nfunc (c *Config) AnonymousHTTPClient() *http.Client\n```\n\n```go\nfunc (c *Config) AuthenticatedHTTPClient() *http.Client\n```\n\n```go\nfunc (c *Config) ConfigureOwner(owner *Owner) (*Owner, error)\n```\nDeprecated: This is no longer required as \\[configureProviderMeta] is now used to configure the provider meta parameter with the necessary clients and owner information. Use \\[configureProviderMeta] instead.\n\n```go\nfunc (c *Config) Meta() (any, error)\n```\nMeta returns the meta parameter that is passed into subsequent resources [https://godoc.org/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema#ConfigureFunc](https://godoc.org/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema#ConfigureFunc) Deprecated: Use \\[configureProviderMeta] instead.\n\n```go\nfunc (c *Config) NewGraphQLClient(client *http.Client) (*githubv4.Client, error)\n```\n\n```go\nfunc (c *Config) NewRESTClient(client *http.Client) (*github.Client, error)\n```\n\n```go\ntype DismissalActorTypes struct {\n\tActor struct {\n\t\tApp  Actor     `graphql:\"... on App\"`\n\t\tTeam Actor     `graphql:\"... on Team\"`\n\t\tUser ActorUser `graphql:\"... on User\"`\n\t}\n}\n```\n\n```go\ntype ExternalIdentities struct {\n\tEdges []struct {\n\t\tNode struct {\n\t\t\tUser struct {\n\t\t\t\tLogin githubv4.String\n\t\t\t}\n\t\t\tSamlIdentity struct {\n\t\t\t\tNameId     githubv4.String\n\t\t\t\tUsername   githubv4.String\n\t\t\t\tGivenName  githubv4.String\n\t\t\t\tFamilyName githubv4.String\n\t\t\t}\n\t\t\tScimIdentity struct {\n\t\t\t\tUsername   githubv4.String\n\t\t\t\tGivenName  githubv4.String\n\t\t\t\tFamilyName githubv4.String\n\t\t\t}\n\t\t}\n\t}\n\tPageInfo struct {\n\t\tEndCursor   githubv4.String\n\t\tHasNextPage bool\n\t}\n}\n```\n\n```go\ntype Owner struct {\n\tStopContext    context.Context\n\tIsOrganization bool\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype PageInfo struct {\n\tStartCursor     githubv4.String\n\tEndCursor       githubv4.String\n\tHasNextPage     githubv4.Boolean\n\tHasPreviousPage githubv4.Boolean\n}\n```\n\n```go\ntype PushActorTypes struct {\n\tActor struct {\n\t\tApp  Actor     `graphql:\"... on App\"`\n\t\tTeam Actor     `graphql:\"... on Team\"`\n\t\tUser ActorUser `graphql:\"... on User\"`\n\t}\n}\n```\n\n```go\ntype RateLimitTransport struct {\n\t// contains filtered or unexported fields\n}\n```\nRateLimitTransport implements GitHub's best practices for avoiding rate limits [https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)\n\n```go\nfunc NewRateLimitTransport(rt http.RoundTripper, options ...RateLimitTransportOption) *RateLimitTransport\n```\nNewRateLimitTransport takes in an http.RoundTripper and a variadic list of optional functions that modify the RateLimitTransport struct itself. This may be used to alter the write delay in between requests, for example.\n\n```go\nfunc (rlt *RateLimitTransport) RoundTrip(req *http.Request) (*http.Response, error)\n```\n\n```go\ntype RateLimitTransportOption func(*RateLimitTransport)\n```\n\n```go\nfunc WithParallelRequests(p bool) RateLimitTransportOption\n```\nWithParallelRequests is used to enforce serial api requests for rate limits.\n\n```go\nfunc WithReadDelay(d time.Duration) RateLimitTransportOption\n```\nWithReadDelay is used to set the delay between read requests.\n\n```go\nfunc WithWriteDelay(d time.Duration) RateLimitTransportOption\n```\nWithWriteDelay is used to set the write delay between requests.\n\n```go\ntype RetryTransport struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewRetryTransport(rt http.RoundTripper, options ...RetryTransportOption) *RetryTransport\n```\nNewRetryTransport takes in an http.RoundTripper and a variadic list of optional functions that modify the RetryTransport struct itself. This may be used to retry after response errors 5xx, for example.\n\n```go\nfunc (t *RetryTransport) RoundTrip(req *http.Request) (*http.Response, error)\n```\n\n```go\ntype RetryTransportOption func(*RetryTransport)\n```\n\n```go\nfunc WithMaxRetries(d int) RetryTransportOption\n```\nWithMaxRetries is used to set the max number of retries when encountering an error.\n\n```go\nfunc WithRetryDelay(d time.Duration) RetryTransportOption\n```\nWithRetryDelay is used to set the delay between requests for retrying.\n\n```go\nfunc WithRetryableErrors(d map[int]bool) RetryTransportOption\n```\nWithRetryableErrors is used to set status codes to retry.\n\n```go\ntype TeamsQuery struct {\n\tOrganization struct {\n\t\tID    githubv4.String\n\t\tTeams struct {\n\t\t\tNodes []struct {\n\t\t\t\tID          githubv4.String\n\t\t\t\tDatabaseID  githubv4.Int\n\t\t\t\tSlug        githubv4.String\n\t\t\t\tName        githubv4.String\n\t\t\t\tDescription githubv4.String\n\t\t\t\tPrivacy     githubv4.String\n\t\t\t\tParent      struct {\n\t\t\t\t\tID   githubv4.String\n\t\t\t\t\tSlug githubv4.String\n\t\t\t\t\tName githubv4.String\n\t\t\t\t} `graphql:\"parentTeam\"`\n\t\t\t\tMembers struct {\n\t\t\t\t\tNodes []struct {\n\t\t\t\t\t\tLogin githubv4.String\n\t\t\t\t\t}\n\t\t\t\t} `graphql:\"members @skip(if: $summaryOnly)\"`\n\t\t\t\tRepositories struct {\n\t\t\t\t\tNodes []struct {\n\t\t\t\t\t\tName githubv4.String\n\t\t\t\t\t}\n\t\t\t\t} `graphql:\"repositories @skip(if: $summaryOnly)\"`\n\t\t\t}\n\t\t\tPageInfo PageInfo\n\t\t} `graphql:\"teams(first:$first, after:$cursor, rootTeamsOnly:$rootTeamsOnly)\"`\n\t} `graphql:\"organization(login:$login)\"`\n}\n```\n\n","path":"github.com/integrations/terraform-provider-github/v6/github","name":"github","synopsis":"","isRedistributable":true}
