Skip to content

Commit

Permalink
add invididual user support for github actions secret and public key
Browse files Browse the repository at this point in the history
  • Loading branch information
anGie44 authored and Jeremy Udit committed Sep 4, 2020
1 parent e83e34d commit d217f5c
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 32 deletions.
5 changes: 0 additions & 5 deletions github/data_source_github_actions_public_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ func dataSourceGithubActionsPublicKey() *schema.Resource {
}

func dataSourceGithubActionsPublicKeyRead(d *schema.ResourceData, meta interface{}) error {
err := checkOrganization(meta)
if err != nil {
return err
}

repository := d.Get("repository").(string)
owner := meta.(*Owner).name
log.Printf("[INFO] Refreshing GitHub Actions Public Key from: %s/%s", owner, repository)
Expand Down
8 changes: 0 additions & 8 deletions github/data_source_github_actions_public_key_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ import (
)

func TestAccGithubActionsPublicKeyDataSource_noMatchReturnsError(t *testing.T) {
if err := testAccCheckOrganization(); err != nil {
t.Skipf("Skipping because %s.", err.Error())
}

repo := "non-existent"
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() {
Expand All @@ -30,10 +26,6 @@ func TestAccGithubActionsPublicKeyDataSource_noMatchReturnsError(t *testing.T) {
}

func TestAccCheckGithubActionsPublicKeyDataSource_existing(t *testing.T) {
if err := testAccCheckOrganization(); err != nil {
t.Skipf("Skipping because %s.", err.Error())
}

repo := os.Getenv("GITHUB_TEMPLATE_REPOSITORY")
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() {
Expand Down
15 changes: 0 additions & 15 deletions github/resource_github_actions_secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ func resourceGithubActionsSecret() *schema.Resource {
}

func resourceGithubActionsSecretCreateOrUpdate(d *schema.ResourceData, meta interface{}) error {
err := checkOrganization(meta)
if err != nil {
return err
}

client := meta.(*Owner).v3client
owner := meta.(*Owner).name
ctx := context.Background()
Expand Down Expand Up @@ -86,11 +81,6 @@ func resourceGithubActionsSecretCreateOrUpdate(d *schema.ResourceData, meta inte
}

func resourceGithubActionsSecretRead(d *schema.ResourceData, meta interface{}) error {
err := checkOrganization(meta)
if err != nil {
return err
}

client := meta.(*Owner).v3client
owner := meta.(*Owner).name
ctx := context.Background()
Expand Down Expand Up @@ -121,11 +111,6 @@ func resourceGithubActionsSecretRead(d *schema.ResourceData, meta interface{}) e
}

func resourceGithubActionsSecretDelete(d *schema.ResourceData, meta interface{}) error {
err := checkOrganization(meta)
if err != nil {
return err
}

client := meta.(*Owner).v3client
orgName := meta.(*Owner).name
ctx := context.WithValue(context.Background(), ctxId, d.Id())
Expand Down
4 changes: 0 additions & 4 deletions github/resource_github_actions_secret_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ import (
)

func TestAccGithubActionsSecret_basic(t *testing.T) {
if err := testAccCheckOrganization(); err != nil {
t.Skipf("Skipping because %s.", err.Error())
}

repo := acctest.RandomWithPrefix("tf-acc-test")

secretResourceName := "github_actions_secret.test_secret"
Expand Down

0 comments on commit d217f5c

Please sign in to comment.