Documentation ¶
Index ¶
- Constants
- func GenerateOAuthTokenFromApp(baseURL, appID, appInstallationID, pemData string) (string, error)
- func NewEtagTransport(rt http.RoundTripper) *etagTransport
- func OwnerOrOrgEnvDefaultFunc() (interface{}, error)
- func Provider() *schema.Provider
- func RateLimitedHTTPClient(client *http.Client, writeDelay time.Duration, readDelay time.Duration, ...) *http.Client
- type Actor
- type ActorUser
- type BranchProtectionResourceData
- type BranchProtectionRule
- type BypassForcePushActorTypes
- type BypassPullRequestActorTypes
- type Config
- func (c *Config) Anonymous() bool
- func (c *Config) AnonymousHTTPClient() *http.Client
- func (c *Config) AuthenticatedHTTPClient() *http.Client
- func (c *Config) ConfigureOwner(owner *Owner) (*Owner, error)
- func (c *Config) Meta() (interface{}, error)
- func (c *Config) NewGraphQLClient(client *http.Client) (*githubv4.Client, error)
- func (c *Config) NewRESTClient(client *http.Client) (*github.Client, error)
- type DismissalActorTypes
- type ExternalIdentities
- type MemberChange
- type Owner
- type PageInfo
- type PushActorTypes
- type RateLimitTransport
- type RateLimitTransportOption
- type RetryTransport
- type RetryTransportOption
- type TeamsQuery
- type UpdateTeamReviewAssignmentInput
Constants ¶
const ( SINGLE_SELECT = "single_select" MULTI_SELECT = "multi_select" STRING = "string" TRUE_FALSE = "true_false" )
const ( PROTECTION_ALLOWS_DELETIONS = "allows_deletions" PROTECTION_ALLOWS_FORCE_PUSHES = "allows_force_pushes" PROTECTION_BLOCKS_CREATIONS = "blocks_creations" PROTECTION_DISMISSES_STALE_REVIEWS = "dismiss_stale_reviews" PROTECTION_FORCE_PUSHES_BYPASSERS = "force_push_bypassers" PROTECTION_IS_ADMIN_ENFORCED = "enforce_admins" PROTECTION_LOCK_BRANCH = "lock_branch" PROTECTION_PATTERN = "pattern" PROTECTION_PULL_REQUESTS_BYPASSERS = "pull_request_bypassers" PROTECTION_PUSH_ALLOWANCES = "push_allowances" PROTECTION_REQUIRED_APPROVING_REVIEW_COUNT = "required_approving_review_count" PROTECTION_REQUIRED_STATUS_CHECK_CONTEXTS = "contexts" PROTECTION_REQUIRES_APPROVING_REVIEWS = "required_pull_request_reviews" PROTECTION_REQUIRES_CODE_OWNER_REVIEWS = "require_code_owner_reviews" PROTECTION_REQUIRES_COMMIT_SIGNATURES = "require_signed_commits" PROTECTION_REQUIRES_CONVERSATION_RESOLUTION = "require_conversation_resolution" PROTECTION_REQUIRES_LINEAR_HISTORY = "required_linear_history" PROTECTION_REQUIRES_STATUS_CHECKS = "required_status_checks" PROTECTION_REQUIRES_STRICT_STATUS_CHECKS = "strict" PROTECTION_REQUIRE_LAST_PUSH_APPROVAL = "require_last_push_approval" PROTECTION_RESTRICTS_PUSHES = "restrict_pushes" PROTECTION_RESTRICTS_REVIEW_DISMISSALS = "restrict_dismissals" PROTECTION_REVIEW_DISMISSAL_ALLOWANCES = "dismissal_restrictions" REPOSITORY_ID = "repository_id" )
Variables ¶
This section is empty.
Functions ¶
func GenerateOAuthTokenFromApp ¶
GenerateOAuthTokenFromApp 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.
func NewEtagTransport ¶
func NewEtagTransport(rt http.RoundTripper) *etagTransport
func OwnerOrOrgEnvDefaultFunc ¶
func OwnerOrOrgEnvDefaultFunc() (interface{}, error)
Types ¶
type BranchProtectionResourceData ¶
type BranchProtectionResourceData struct { AllowsDeletions bool AllowsForcePushes bool BlocksCreations bool BranchProtectionRuleID string BypassForcePushActorIDs []string BypassPullRequestActorIDs []string DismissesStaleReviews bool IsAdminEnforced bool Pattern string PushActorIDs []string RepositoryID string RequiredApprovingReviewCount int RequiredStatusCheckContexts []string RequiresApprovingReviews bool RequiresCodeOwnerReviews bool RequiresCommitSignatures bool RequiresLinearHistory bool RequiresConversationResolution bool RequiresStatusChecks bool RequiresStrictStatusChecks bool RestrictsPushes bool RestrictsReviewDismissals bool ReviewDismissalActorIDs []string RequireLastPushApproval bool LockBranch bool }
type BranchProtectionRule ¶
type BranchProtectionRule struct { Repository struct { ID githubv4.String Name githubv4.String } PushAllowances struct { Nodes []PushActorTypes } `graphql:"pushAllowances(first: 100)"` ReviewDismissalAllowances struct { Nodes []DismissalActorTypes } `graphql:"reviewDismissalAllowances(first: 100)"` BypassForcePushAllowances struct { Nodes []BypassForcePushActorTypes } `graphql:"bypassForcePushAllowances(first: 100)"` BypassPullRequestAllowances struct { Nodes []BypassPullRequestActorTypes } `graphql:"bypassPullRequestAllowances(first: 100)"` AllowsDeletions githubv4.Boolean AllowsForcePushes githubv4.Boolean BlocksCreations githubv4.Boolean DismissesStaleReviews githubv4.Boolean ID githubv4.ID IsAdminEnforced githubv4.Boolean Pattern githubv4.String RequiredApprovingReviewCount githubv4.Int RequiredStatusCheckContexts []githubv4.String RequiresApprovingReviews githubv4.Boolean RequiresCodeOwnerReviews githubv4.Boolean RequiresCommitSignatures githubv4.Boolean RequiresLinearHistory githubv4.Boolean RequiresConversationResolution githubv4.Boolean RequiresStatusChecks githubv4.Boolean RequiresStrictStatusChecks githubv4.Boolean RestrictsPushes githubv4.Boolean RestrictsReviewDismissals githubv4.Boolean RequireLastPushApproval githubv4.Boolean LockBranch githubv4.Boolean }
type Config ¶
type Config struct { Token string Owner string BaseURL string Insecure bool WriteDelay time.Duration ReadDelay time.Duration RetryDelay time.Duration RetryableErrors map[int]bool MaxRetries int ParallelRequests bool }
func (*Config) AnonymousHTTPClient ¶
func (*Config) AuthenticatedHTTPClient ¶
func (*Config) Meta ¶
Meta returns the meta parameter that is passed into subsequent resources https://godoc.org/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema#ConfigureFunc
func (*Config) NewGraphQLClient ¶
type DismissalActorTypes ¶
type ExternalIdentities ¶
type ExternalIdentities struct { Edges []struct { Node struct { User struct { Login githubv4.String } SamlIdentity struct { NameId githubv4.String Username githubv4.String GivenName githubv4.String FamilyName githubv4.String } ScimIdentity struct { Username githubv4.String GivenName githubv4.String FamilyName githubv4.String } } } PageInfo struct { EndCursor githubv4.String HasNextPage bool } }
type MemberChange ¶
type MemberChange struct {
Old, New map[string]interface{}
}
type PushActorTypes ¶
type RateLimitTransport ¶
type RateLimitTransport struct {
// contains filtered or unexported fields
}
RateLimitTransport implements GitHub's best practices for avoiding rate limits https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits
func NewRateLimitTransport ¶
func NewRateLimitTransport(rt http.RoundTripper, options ...RateLimitTransportOption) *RateLimitTransport
NewRateLimitTransport 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.
type RateLimitTransportOption ¶
type RateLimitTransportOption func(*RateLimitTransport)
func WithParallelRequests ¶
func WithParallelRequests(p bool) RateLimitTransportOption
WithParallelRequests is used to enforce serial api requests for rate limits
func WithReadDelay ¶
func WithReadDelay(d time.Duration) RateLimitTransportOption
WithReadDelay is used to set the delay between read requests
func WithWriteDelay ¶
func WithWriteDelay(d time.Duration) RateLimitTransportOption
WithWriteDelay is used to set the write delay between requests
type RetryTransport ¶
type RetryTransport struct {
// contains filtered or unexported fields
}
func NewRetryTransport ¶
func NewRetryTransport(rt http.RoundTripper, options ...RetryTransportOption) *RetryTransport
NewRetryTransport 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.
type RetryTransportOption ¶
type RetryTransportOption func(*RetryTransport)
func WithMaxRetries ¶
func WithMaxRetries(d int) RetryTransportOption
WithMaxRetries is used to set the max number of retries when encountering an error
func WithRetryDelay ¶
func WithRetryDelay(d time.Duration) RetryTransportOption
WithRetryDelay is used to set the delay between requests for retrying
func WithRetryableErrors ¶
func WithRetryableErrors(d map[int]bool) RetryTransportOption
WithRetryableErrors is used to set status codes to retry
type TeamsQuery ¶
type TeamsQuery struct { Organization struct { ID githubv4.String Teams struct { Nodes []struct { ID githubv4.String DatabaseID githubv4.Int Slug githubv4.String Name githubv4.String Description githubv4.String Privacy githubv4.String Parent struct { ID githubv4.String Slug githubv4.String Name githubv4.String } `graphql:"parentTeam"` Members struct { Nodes []struct { Login githubv4.String } } `graphql:"members @skip(if: $summaryOnly)"` Repositories struct { Nodes []struct { Name githubv4.String } } `graphql:"repositories @skip(if: $summaryOnly)"` } PageInfo PageInfo } `graphql:"teams(first:$first, after:$cursor, rootTeamsOnly:$rootTeamsOnly)"` } `graphql:"organization(login:$login)"` }
type UpdateTeamReviewAssignmentInput ¶
type UpdateTeamReviewAssignmentInput struct { ClientMutationID string `json:"clientMutationId,omitempty"` TeamID string `graphql:"id" json:"id"` ReviewRequestDelegation bool `graphql:"enabled" json:"enabled"` ReviewRequestDelegationAlgorithm string `graphql:"algorithm" json:"algorithm"` ReviewRequestDelegationCount int `graphql:"teamMemberCount" json:"teamMemberCount"` ReviewRequestDelegationNotifyAll bool `graphql:"notifyTeam" json:"notifyTeam"` }
Source Files ¶
- apps.go
- config.go
- data_source_github_actions_environment_secrets.go
- data_source_github_actions_environment_variables.go
- data_source_github_actions_organization_oidc_subject_claim_customization_template.go
- data_source_github_actions_organization_public_key.go
- data_source_github_actions_organization_registration_token.go
- data_source_github_actions_organization_secrets.go
- data_source_github_actions_organization_variables.go
- data_source_github_actions_public_key.go
- data_source_github_actions_registration_token.go
- data_source_github_actions_repository_oidc_subject_claim_customization_template.go
- data_source_github_actions_secrets.go
- data_source_github_actions_variables.go
- data_source_github_app.go
- data_source_github_app_token.go
- data_source_github_branch.go
- data_source_github_branch_protection_rules.go
- data_source_github_codespaces_organization_public_key.go
- data_source_github_codespaces_organization_secrets.go
- data_source_github_codespaces_public_key.go
- data_source_github_codespaces_secrets.go
- data_source_github_codespaces_user_public_key.go
- data_source_github_codespaces_user_secrets.go
- data_source_github_collaborators.go
- data_source_github_dependabot_organization_public_key.go
- data_source_github_dependabot_organization_secrets.go
- data_source_github_dependabot_public_key.go
- data_source_github_dependabot_secrets.go
- data_source_github_enterprise.go
- data_source_github_external_groups.go
- data_source_github_ip_ranges.go
- data_source_github_issue_labels.go
- data_source_github_membership.go
- data_source_github_organization.go
- data_source_github_organization_custom_role.go
- data_source_github_organization_external_identities.go
- data_source_github_organization_ip_allow_list.go
- data_source_github_organization_team_sync_groups.go
- data_source_github_organization_teams.go
- data_source_github_organization_webhooks.go
- data_source_github_ref.go
- data_source_github_release.go
- data_source_github_repositories.go
- data_source_github_repository.go
- data_source_github_repository_autolink_references.go
- data_source_github_repository_branches.go
- data_source_github_repository_custom_properties.go
- data_source_github_repository_deploy_keys.go
- data_source_github_repository_deployment_branch_policies.go
- data_source_github_repository_environments.go
- data_source_github_repository_file.go
- data_source_github_repository_milestone.go
- data_source_github_repository_pull_request.go
- data_source_github_repository_pull_requests.go
- data_source_github_repository_teams.go
- data_source_github_repository_webhooks.go
- data_source_github_rest_api.go
- data_source_github_ssh_keys.go
- data_source_github_team.go
- data_source_github_tree.go
- data_source_github_user.go
- data_source_github_user_external_identity.go
- data_source_github_users.go
- migrate_github_branch_protection.go
- migrate_github_repository.go
- migrate_github_repository_webhook.go
- provider.go
- provider_utils.go
- repository_utils.go
- resource_github_actions_environment_secret.go
- resource_github_actions_environment_variable.go
- resource_github_actions_organization_oidc_subject_claim_customization_template.go
- resource_github_actions_organization_permissions.go
- resource_github_actions_organization_secret.go
- resource_github_actions_organization_secret_repositories.go
- resource_github_actions_organization_variable.go
- resource_github_actions_repository_access_level.go
- resource_github_actions_repository_oidc_subject_claim_customization_template.go
- resource_github_actions_repository_permissions.go
- resource_github_actions_runner_group.go
- resource_github_actions_secret.go
- resource_github_actions_variable.go
- resource_github_app_installation_repositories.go
- resource_github_app_installation_repository.go
- resource_github_branch.go
- resource_github_branch_default.go
- resource_github_branch_protection.go
- resource_github_branch_protection_v3.go
- resource_github_branch_protection_v3_utils.go
- resource_github_codespaces_organization_secret.go
- resource_github_codespaces_organization_secret_repositories.go
- resource_github_codespaces_secret.go
- resource_github_codespaces_user_secret.go
- resource_github_dependabot_organization_secret.go
- resource_github_dependabot_organization_secret_repositories.go
- resource_github_dependabot_secret.go
- resource_github_emu_group_mapping.go
- resource_github_enterprise_actions_permissions.go
- resource_github_enterprise_actions_runner_group.go
- resource_github_enterprise_organization.go
- resource_github_issue.go
- resource_github_issue_label.go
- resource_github_issue_labels.go
- resource_github_membership.go
- resource_github_organization_custom_role.go
- resource_github_organization_project.go
- resource_github_organization_ruleset.go
- resource_github_organization_security_manager.go
- resource_github_organization_settings.go
- resource_github_organization_webhook.go
- resource_github_project_card.go
- resource_github_project_column.go
- resource_github_release.go
- resource_github_repository.go
- resource_github_repository_autolink_reference.go
- resource_github_repository_automated_security_fixes.go
- resource_github_repository_collaborator.go
- resource_github_repository_collaborators.go
- resource_github_repository_custom_property.go
- resource_github_repository_deploy_key.go
- resource_github_repository_deployment_branch_policy.go
- resource_github_repository_environment.go
- resource_github_repository_environment_deployment_policy.go
- resource_github_repository_file.go
- resource_github_repository_milestone.go
- resource_github_repository_project.go
- resource_github_repository_pull_request.go
- resource_github_repository_ruleset.go
- resource_github_repository_topics.go
- resource_github_repository_webhook.go
- resource_github_team.go
- resource_github_team_members.go
- resource_github_team_membership.go
- resource_github_team_repository.go
- resource_github_team_settings.go
- resource_github_team_sync_group_mapping.go
- resource_github_user_gpg_key.go
- resource_github_user_invitation_accepter.go
- resource_github_user_ssh_key.go
- resource_organization_block.go
- respository_rules_utils.go
- schema_webhook_configuration.go
- transport.go
- util.go
- util_permissions.go
- util_v4.go
- util_v4_branch_protection.go
- util_v4_consts.go
- util_v4_repository.go
- util_v4_teams.go