Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add repo action access level resource #1448

Merged
merged 1 commit into from Jan 3, 2023

Conversation

wwsean08
Copy link
Contributor

@wwsean08 wwsean08 commented Dec 21, 2022

Resolves #1418


Behavior

Before the change?

  • There was no way to specify the action access setting to allow other repositories to use your private/internal repositories actions and reusable workflows in their own.

After the change?

  • This allows you to set whether or not another repository in within your user, organization, or enterprise can use this repositories actions and reusable workflows.

Other information

  • I was having trouble getting the website testing to work, so while the docs change should work, I can't say for sure.

Additional info

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Added the appropriate label for the given change

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes (Please add the Type: Breaking change label)
  • No

If Yes, what's the impact:

  • N/A

Pull request type

Please add the corresponding label for change this PR introduces:

  • Feature/model/API additions: Type: Feature

Automated Testing

The tests are broken up by individual and organization as they have a different set of inputs that are valid.

Organization Test:
Screenshot 2022-12-20 192658

Individual Test:
Screenshot 2022-12-20 192711

Manual Testing

Individual User

terraform {
  required_providers {
    github = {
      source = "integrations/github"
      version = "5.12.0"
    }
  }
}

provider "github" {
  owner = "wwsean08"
}

resource "github_actions_repository_access_level" "test" {
  access_level = "user"
  repository   = "test"
}

Screen Shot 2022-12-21 at 10 39 10 AM

Screen Shot 2022-12-21 at 10 31 17 AM

Organization

terraform {
  required_providers {
    github = {
      source = "integrations/github"
      version = "5.12.0"
    }
  }
}

provider "github" {
  owner = "test-organization-wwsean08"
}

resource "github_actions_repository_access_level" "test" {
  access_level = "organization"
  repository   = "test2"
}

Screen Shot 2022-12-21 at 10 46 34 AM

Screen Shot 2022-12-21 at 10 46 53 AM

Enterprise

terraform {
  required_providers {
    github = {
      source = "integrations/github"
      version = "5.12.0"
    }
  }
}

provider "github" {
  owner = "REDACTED"
}

resource "github_actions_repository_access_level" "test" {
  access_level = "enterprise"
  repository   = "sean-smith-test"
}

Screen Shot 2022-12-21 at 10 36 36 AM

Screen Shot 2022-12-21 at 10 38 10 AM

Destroy

Screen Shot 2022-12-21 at 10 47 19 AM

Screen Shot 2022-12-21 at 10 48 36 AM

@kfcampbell
Copy link
Member

Confirming integration tests pass locally for me. Thank you @wwsean08 for the care in your two PR submissions!

@kfcampbell kfcampbell merged commit 9db5990 into integrations:main Jan 3, 2023
@wwsean08 wwsean08 deleted the feat/1418-v2 branch January 3, 2023 23:12
avidspartan1 pushed a commit to avidspartan1/terraform-provider-github that referenced this pull request Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT]: Allow Defining Actions Access Settings on a Repository
3 participants