Skip to content

Commit

Permalink
Add resource for authoritative repo access management (integrations#1121
Browse files Browse the repository at this point in the history
)

* Add resource for authoritative repo access management

Fixes integrations#395

* fixes after testing

* Tests

* Bump to v48

* docs

* review comments

* also add line to github_team_repository

* env

* support for custom role and move to using slug instead of team id

* v50

* more v50

* inverse

* Vague function rename

---------

Co-authored-by: Keegan Campbell <me@kfcampbell.com>
Co-authored-by: Nick Floyd <139819+nickfloyd@users.noreply.github.com>
  • Loading branch information
3 people authored Apr 4, 2023
1 parent b17176c commit b42280a
Show file tree
Hide file tree
Showing 9 changed files with 1,262 additions and 8 deletions.
1 change: 1 addition & 0 deletions github/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ func Provider() terraform.ResourceProvider {
"github_repository": resourceGithubRepository(),
"github_repository_autolink_reference": resourceGithubRepositoryAutolinkReference(),
"github_repository_collaborator": resourceGithubRepositoryCollaborator(),
"github_repository_collaborators": resourceGithubRepositoryCollaborators(),
"github_repository_deploy_key": resourceGithubRepositoryDeployKey(),
"github_repository_environment": resourceGithubRepositoryEnvironment(),
"github_repository_file": resourceGithubRepositoryFile(),
Expand Down
14 changes: 7 additions & 7 deletions github/provider_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import (
"testing"
)

var testCollaborator string = os.Getenv("GITHUB_TEST_COLLABORATOR")
var isEnterprise string = os.Getenv("ENTERPRISE_ACCOUNT")
var testEnterprise string = os.Getenv("ENTERPRISE_SLUG")
var testOrganization string = testOrganizationFunc()
var testOwner string = os.Getenv("GITHUB_OWNER")
var testToken string = os.Getenv("GITHUB_TOKEN")
var testBaseURLGHES string = os.Getenv("GHES_BASE_URL")
var testCollaborator = os.Getenv("GITHUB_TEST_COLLABORATOR")
var isEnterprise = os.Getenv("ENTERPRISE_ACCOUNT")
var testEnterprise = os.Getenv("ENTERPRISE_SLUG")
var testOrganization = testOrganizationFunc()
var testOwner = os.Getenv("GITHUB_OWNER")
var testToken = os.Getenv("GITHUB_TOKEN")
var testBaseURLGHES = os.Getenv("GHES_BASE_URL")

func testAccPreCheck(t *testing.T) {
if v := os.Getenv("GITHUB_TOKEN"); v == "" {
Expand Down
Loading

0 comments on commit b42280a

Please sign in to comment.