-
Notifications
You must be signed in to change notification settings - Fork 913
feat(actions_permissions): sha_pinning_required #2870
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
base: main
Are you sure you want to change the base?
Changes from all commits
1bbc69f
6d700ff
2c47467
9e57d44
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,6 +57,11 @@ | |
| Optional: true, | ||
| Description: "Whether actions in GitHub Marketplace from verified creators are allowed. Set to 'true' to allow all GitHub Marketplace actions by verified creators.", | ||
| }, | ||
| "sha_pinning_required": { | ||
| Type: schema.TypeBool, | ||
| Optional: true, | ||
| Description: "Whether pinning to a specific SHA is required for all actions and reusable workflows in an organization.", | ||
| }, | ||
| }, | ||
| }, | ||
| }, | ||
|
|
@@ -96,6 +101,10 @@ | |
| allowed.VerifiedAllowed = &x | ||
| } | ||
|
|
||
| if v, ok := data["sha_pinning_required"]; ok { | ||
| allowed.SHAPinningRequired = github.Ptr(v.(bool)) | ||
|
Check failure on line 105 in github/resource_github_actions_organization_permissions.go
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue: |
||
| } | ||
|
|
||
| patternsAllowed := []string{} | ||
|
|
||
| switch t := data["patterns_allowed"].(type) { | ||
|
|
@@ -226,6 +235,7 @@ | |
| "github_owned_allowed": actionsAllowed.GetGithubOwnedAllowed(), | ||
| "patterns_allowed": actionsAllowed.PatternsAllowed, | ||
| "verified_allowed": actionsAllowed.GetVerifiedAllowed(), | ||
| "sha_pinning_required": actionsAllowed.GetShaPinningRequired(), | ||
|
Check failure on line 238 in github/resource_github_actions_organization_permissions.go
|
||
| }, | ||
| }); err != nil { | ||
| return err | ||
|
|
||
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.
issue: This field should be moved to top-level. It's not part of the
allowed_actions_config