-
Notifications
You must be signed in to change notification settings - Fork 763
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
New resource: github_actions_organization_permissions #920
Merged
jcudit
merged 7 commits into
integrations:main
from
j-nix:#489-support-organization-action-permissions
Nov 8, 2021
Merged
New resource: github_actions_organization_permissions #920
jcudit
merged 7 commits into
integrations:main
from
j-nix:#489-support-organization-action-permissions
Nov 8, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit adds the following new resource for modifying Actions permissions within a GitHub organization: Resource: `github_actions_organization_permissions` Optional blocks `allowed_actions_config` and `selected_actions_config` are only available when `allowed_actions` and/or `enabled_repositories` are set to `selected`, respectively. Default behaviour of the API when initializing the resource is to set `actions_allowed` and `enabled_repositories` to `all`, this behaviour is taken into account for destroy actions.
Documentation added with examples for the new resource `github_actions_organization_permissions`.
Looking good so far. Have this on our queue to help verify tests are passing. Can you take a look at the linter error in the meantime? |
Sure, I've pushed a fix for the linter error. |
jcudit
reviewed
Oct 17, 2021
Bump to latest version of github go-sdk Co-authored-by: Jeremy Udit <[email protected]>
jcudit
approved these changes
Oct 30, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎃 great PR, thanks for the contribution.
kfcampbell
pushed a commit
to kfcampbell/terraform-provider-github
that referenced
this pull request
Jul 26, 2022
* Issue 489: Support Actions Organization Permissions This commit adds the following new resource for modifying Actions permissions within a GitHub organization: Resource: `github_actions_organization_permissions` Optional blocks `allowed_actions_config` and `selected_actions_config` are only available when `allowed_actions` and/or `enabled_repositories` are set to `selected`, respectively. Default behaviour of the API when initializing the resource is to set `actions_allowed` and `enabled_repositories` to `all`, this behaviour is taken into account for destroy actions. * Issue 489: Add documentation for actions_organization_permissions Documentation added with examples for the new resource `github_actions_organization_permissions`. * Remove side note leftover from development * Remove unnecessary skipped tests * Add link to website page tree * Remove unnecessary conversion as per golangci-lint * Update github/resource_github_actions_organization_permissions.go Bump to latest version of github go-sdk Co-authored-by: Jeremy Udit <[email protected]> Co-authored-by: Jeremy Udit <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the following new resource for modifying Actions
permissions within a GitHub organization
New resource:
github_actions_organization_permissions
Optional blocks
allowed_actions_config
andselected_actions_config
are only available when
allowed_actions
and/orenabled_repositories
are set to
selected
, respectively.Default behaviour of the API when initializing the resource is to set
actions_allowed
andenabled_repositories
toall
, this behaviour istaken into account for destroy actions.
Documentation added.
Acceptance Tests Output:
Resource additionally has been extensively tested with real terraform operations on a test organization.
Although the API does not require the
github_owned_allowed
when specifying selectedallowed_actions
, I have enforced this to avoid nil errors in the case a user provides an emptyallowed_actions_config {}
block along withallowed_actions = "selected"
. If there is a better implementation for this, let me know.Related to #489