Skip to content

Add support for EnterpriseOwner#3211

Open
jackmtpt wants to merge 8 commits into
integrations:mainfrom
jackmtpt:jackmtpt-patch-1
Open

Add support for EnterpriseOwner#3211
jackmtpt wants to merge 8 commits into
integrations: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.

@deiga deiga left a comment

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.

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

deiga commented Feb 23, 2026

Copy link
Copy Markdown
Collaborator

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

@jackmtpt

jackmtpt commented Mar 2, 2026

Copy link
Copy Markdown
Author

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

deiga commented Mar 3, 2026

Copy link
Copy Markdown
Collaborator

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

jackmtpt commented Mar 5, 2026

Copy link
Copy Markdown
Author

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.

@deiga deiga left a comment

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.

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
Comment thread github/resource_github_organization_ruleset_test.go Outdated

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?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

my understanding of the existing create_branch_ruleset_with_enterprise_features test was that it should have been using skipUnlessEnterprise(t) already, no? if it's testing enterprise features then shouldn't it only run in enterprise mode?

happy to split out the specific EnterpriseOwner test if you want, i just thought it'd be simpler to have one test that does all the enterprise-y stuff together

@deiga deiga removed the request for review from stevehipwell May 17, 2026 13:24
@deiga deiga removed this from the v6.13.0 milestone Jun 3, 2026
@deiga deiga added the Type: Feature New feature or request label Jun 3, 2026
@deiga

deiga commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

@jackmtpt if you're available for rebasing this and refactoring to use the new docs system, then it's possible we can get this into v6.13.0

@jackmtpt

Copy link
Copy Markdown
Author

@deiga I am leaving my company in a week so I won't be able to work on this anymore. If someone else wants to take it over feel free.

@nitinjain999

Copy link
Copy Markdown

Thanks @jackmtpt for the work on this — happy to take it over from here.

I'll pick up the remaining items: rebase onto main, migrate the docs to the new docs/ system, refactor the repository ruleset test to use a separate create_branch_ruleset_with_enterprise_features test with skipUnlessEnterprise, and address the remaining open comments from @deiga.

@nitinjain999

Copy link
Copy Markdown

Opened #3487 to carry this forward — rebased on main, migrated docs to the new docs/ system, split out the enterprise tests, and verified against a live enterprise org.

@mymasse

mymasse commented Jun 11, 2026

Copy link
Copy Markdown

There is a PR for adding RepositoryMigration actor type #3337 and it's also missing User actor type support also (#3423) is possible to combine and add the missing in this PR so we get all 3 missing types

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]: Support EnterpriseOwner actor_type

5 participants