Repository navigation
Conversation
|
👋 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 |
|
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
left a comment
There was a problem hiding this comment.
Thanks for the contribution! I left a few comments
|
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... |
|
Ran tests locally and they pass on Enterprise. But I think you need to split the tests with |
|
That should be done now. There was an existing test I'm still pretty new to golang but I have managed to get the tests passing locally. |
There was a problem hiding this comment.
Could you create a new test for this, instead of changing this existing test and where it can run?
There was a problem hiding this comment.
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
Co-authored-by: Copilot <[email protected]>
2864337 to
2df5697
Compare
|
@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 |
|
@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. |
|
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 |
|
Opened #3487 to carry this forward — rebased on main, migrated docs to the new |
…ust ignore Previous wording said the API 'will ignore' the value, which implied setting it was harmless. Per the GitHub API (confirmed by maintainer @deiga in integrations#3211), OrganizationAdmin and EnterpriseOwner return no actor_id on read — setting any value causes config/state drift. Updated to 'Must be omitted' to make the contract unambiguous.
* feat: add EnterpriseOwner as bypass actor type for rulesets - Add EnterpriseOwner to the ValidateDiagFunc allowlist for actor_type in both organization and repository ruleset resources - Update actor_id descriptions to clarify it should be omitted for OrganizationAdmin, EnterpriseOwner, and DeployKey (API ignores it) - Remove actor_id=1 from OrganizationAdmin bypass_actors in tests since the GitHub API ignores the value for that actor type - Add separate enterprise-gated acceptance tests for EnterpriseOwner bypass actor using ConfigStateChecks (skipUnlessEnterprise) - Update docs/resources/ (new docs system) for both resources Closes #3210 * docs: update bypass_actors templates to add EnterpriseOwner and fix actor_id description - Add EnterpriseOwner to actor_type allowed values in both ruleset templates - Clarify that actor_id is ignored by the GitHub API for OrganizationAdmin, EnterpriseOwner, and DeployKey - Remove stale OrganizationAdmin -> 1 mapping note Fixes docs CI failure caused by editing auto-generated docs/ files directly instead of the source templates/resources/*.md.tmpl files. * fix(docs): add DeployKey to org ruleset actor_type list in template and docs DeployKey was already in the schema validation but missing from the docs actor_type description. Regenerated docs from template. * docs: strengthen actor_id description for ID-less types to omit not just ignore Previous wording said the API 'will ignore' the value, which implied setting it was harmless. Per the GitHub API (confirmed by maintainer @deiga in #3211), OrganizationAdmin and EnterpriseOwner return no actor_id on read — setting any value causes config/state drift. Updated to 'Must be omitted' to make the contract unambiguous.
Resolves #3210
Before the change?
After the change?
Pull request checklist
Does this introduce a breaking change?
Please see our docs on breaking changes to help!