Skip to content

Add support for EnterpriseOwner#3211

Open
jackmtpt wants to merge 7 commits intointegrations:mainfrom
jackmtpt:jackmtpt-patch-1
Open

Add support for EnterpriseOwner#3211
jackmtpt wants to merge 7 commits intointegrations:mainfrom
jackmtpt:jackmtpt-patch-1

Conversation

@jackmtpt
Copy link
Copy Markdown

Resolves #3210


Before the change?

  • Adds support for setting EnterpriseOwner in rulesets

After the change?

  • The EnterpriseOwner value can be set as a bypass_actor

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

@github-actions
Copy link
Copy Markdown

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@jackmtpt
Copy link
Copy Markdown
Author

I don't have a local golang dev environment so I'll have to wait for the CI build before I can test this locally.

Copy link
Copy Markdown
Collaborator

@deiga deiga left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution! I left a few comments

Comment thread github/resource_github_organization_ruleset.go Outdated
Comment thread github/resource_github_organization_ruleset_test.go Outdated
Comment thread website/docs/r/organization_ruleset.html.markdown Outdated
@deiga
Copy link
Copy Markdown
Collaborator

deiga commented Feb 23, 2026

Thanks for the changes! Have you been able to run the tests locally?

@jackmtpt
Copy link
Copy Markdown
Author

jackmtpt commented Mar 2, 2026

Thanks for the changes! Have you been able to run the tests locally?

Sadly not; setting up a golang dev environment in my company has proven to be a giant pain...

@deiga
Copy link
Copy Markdown
Collaborator

deiga commented Mar 3, 2026

Ran tests locally and they pass on Enterprise. But I think you need to split the tests with EnterpriseOwner into separate tests with skipUnlessEnterprise

@jackmtpt
Copy link
Copy Markdown
Author

jackmtpt commented Mar 5, 2026

That should be done now. There was an existing test create_branch_ruleset_with_enterprise_features that I've changed to be gated behind the enterprise setting and put the EnterpriseOwner stuff in that. I've then copied that test to the org rulesets file as well.

I'm still pretty new to golang but I have managed to get the tests passing locally.

Copy link
Copy Markdown
Collaborator

@deiga deiga left a comment

Choose a reason for hiding this comment

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

LGTM!

@deiga deiga requested a review from stevehipwell March 5, 2026 22:42
@deiga deiga added this to the v6.12.0 Release milestone Mar 5, 2026
Steps: []resource.TestStep{
{
Config: config,
Check: resource.ComposeTestCheckFunc(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could you refactor this to use ConfigStateChecks instead of Check?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could you create a new test for this, instead of changing this existing test and where it can run?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT]: Support EnterpriseOwner actor_type

3 participants