Skip to content

chore: Refactor github_actions_organization_workflow_permissions - #3682

Open
stevehipwell wants to merge 1 commit into
mainfrom
stevehipwell/refactor-actions-org-permissions
Open

stevehipwell wants to merge 1 commit into
mainfrom
stevehipwell/refactor-actions-org-permissions

Conversation

@stevehipwell

Copy link
Copy Markdown
Collaborator

Resolves #3417
Resolves #2681

Closes #3457


Before the change?

  • The github_actions_organization_permissions resource wasn't working as expected

After the change?

  • The github_actions_organization_permissions resource should work correctly

Pull request checklist

  • Schema migrations have been created if needed (example)
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

@stevehipwell stevehipwell added this to the v6.14.0 milestone Oct 15, 2026
@stevehipwell stevehipwell self-assigned this Oct 15, 2026
@stevehipwell stevehipwell added the Type: Bug Something isn't working as documented label Oct 15, 2026
@github-actions

Copy link
Copy Markdown

👋 Hi, and thank you for this contribution!

This repo is maintained by GitHub and community members on a best-effort basis. We'll get to this as soon as we can.

You can help us prioritize by joining the discussion on open issues and PRs, sharing details on the changes you need, and reviewing other contributions.


🤖 This is an automated message.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

State-refresh errors and incompatible plan validation can hide permission drift or reject valid configurations.

4 open findings
What changed in this PR

These provider review instructions are being used.

This PR refactors organization-level GitHub Actions permissions, including support for disabling Actions without sending an empty policy.

Changes:

  • Separates context-aware lifecycle handlers and adds plan validation.
  • Expands acceptance coverage for disabled Actions and empty repository selections.
  • Updates generated documentation and import examples.
File Description
templates/​resources/​actions_organization_permissions.md.tmpl Uses generated schema, examples, and imports.
RESOURCES.md Marks the resource checklist complete.
github/​resource_github_actions_organization_permissions.go Refactors lifecycle, validation, and state handling.
github/​resource_github_actions_organization_permissions_test.go Expands lifecycle and validation coverage.
examples/​resources/​github_actions_organization_permissions/​resource_1.tf Updates permissions example with SHA pinning.
examples/​resources/​github_actions_organization_permissions/​import.sh Adds CLI import example.
examples/​resources/​github_actions_organization_permissions/​import-by-string-id.tf Adds declarative import example.
docs/​resources/​actions_organization_permissions.md Regenerates schema and usage documentation.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread github/resource_github_actions_organization_permissions.go
Comment thread github/resource_github_actions_organization_permissions.go
Comment thread github/resource_github_actions_organization_permissions.go
Comment thread github/resource_github_actions_organization_permissions.go Outdated
@stevehipwell
stevehipwell force-pushed the stevehipwell/refactor-actions-org-permissions branch from 5633847 to f1ecb85 Compare October 15, 2026 12:50
@stevehipwell
stevehipwell requested a balanced review from Copilot October 15, 2026 12:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread github/resource_github_actions_organization_permissions.go
Comment thread github/resource_github_actions_organization_permissions_test.go
@stevehipwell
stevehipwell force-pushed the stevehipwell/refactor-actions-org-permissions branch from f1ecb85 to a3edd4d Compare October 15, 2026 13:33
@stevehipwell
stevehipwell requested a balanced review from Copilot October 15, 2026 13:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The explicit SHA-pinning disablement behavior needs regression coverage.

1 open finding
2 resolved since last review

🧠 Review effort: Balanced

Comment thread github/resource_github_actions_organization_permissions.go
Signed-off-by: Steve Hipwell <steve.hipwell@gmail.com>
@stevehipwell
stevehipwell force-pushed the stevehipwell/refactor-actions-org-permissions branch from a3edd4d to 6fdc79b Compare October 15, 2026 14:13
@stevehipwell
stevehipwell requested a balanced review from Copilot October 15, 2026 14:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The lifecycle, validation, and state-handling changes warrant human verification before approval.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

@stevehipwell
stevehipwell requested a review from deiga October 15, 2026 14:21
@stevehipwell stevehipwell added the needs-github-review Request a review from GitHub label Oct 15, 2026
@team-review-router
team-review-router Bot requested a review from a team October 15, 2026 14:22

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-github-review Request a review from GitHub Type: Bug Something isn't working as documented

Projects

None yet

2 participants