Skip to content

feat(enterprise): add resource github_enterprise_app_installation and data sources #83

@vmvarela

Description

@vmvarela

Description

Add a resource to manage GitHub App installations at the enterprise level (install/uninstall apps across organizations), plus data sources to list installable organizations and existing installations.

go-github v84 API

func (s *EnterpriseService) InstallApp(ctx context.Context, enterprise, org string, request InstallAppRequest) (*Installation, *Response, error)
// POST /enterprises/{enterprise}/apps/installations

func (s *EnterpriseService) UninstallApp(ctx context.Context, enterprise, org string, installationID int64) (*Response, error)
// DELETE /enterprises/{enterprise}/apps/installations/{installation_id}

func (s *EnterpriseService) ListAppInstallations(ctx context.Context, enterprise, org string, opts *ListOptions) ([]*Installation, *Response, error)
// GET /enterprises/{enterprise}/orgs/{org}/apps/installations

func (s *EnterpriseService) ListAppInstallableOrganizations(ctx context.Context, enterprise string, opts *ListOptions) ([]*InstallableOrganization, *Response, error)
// GET /enterprises/{enterprise}/apps/installable_organizations

func (s *EnterpriseService) ListAppAccessibleOrganizationRepositories(ctx context.Context, enterprise, org string, opts *ListOptions) ([]*AccessibleRepository, *Response, error)
// GET /enterprises/{enterprise}/apps/installations/{installation_id}/accessible-repositories

Acceptance Criteria

  • Resource github_enterprise_app_installation — installs a GitHub App into an org within an enterprise
  • Schema: enterprise_slug, org, app_id or client_id, computed installation_id
  • Data source github_enterprise_app_installations — lists installations per org
  • Data source github_enterprise_app_installable_organizations — lists orgs where app can be installed
  • Import via enterprise_slug:org:installation_id
  • Registered in provider.go
  • Docs

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:lowNice to have, do when possiblesize:mMedium — 4 to 8 hourstype:featureNew functionality

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions