Repository navigation
[FEAT] Add User as repository ruleset bypass actor - #3438
stevehipwell merged 3 commits into
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 |
5263dc0 to
252bc71
Compare
deiga
left a comment
There was a problem hiding this comment.
Thanks for contributing!
This is looking good. There are some minor changes required to get this mergeable
There was a problem hiding this comment.
Pull request overview
This PR updates the github_repository_ruleset resource to allow bypass_actors entries with actor_type = "User", aligning the provider schema/docs/tests with GitHub’s current repository ruleset bypass actor support.
Changes:
- Allow
Useras a validbypass_actors.actor_typeingithub_repository_rulesetschema validation and clarifyactor_idsemantics. - Extend the repository ruleset acceptance test to add a
Userbypass actor using the numeric GitHub user ID. - Update repository ruleset documentation (and its template) to list
Useras a supported actor type and describe the requiredactor_id.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
github/resource_github_repository_ruleset.go |
Extends schema validation to accept User and updates schema field descriptions for actor_id/actor_type. |
github/resource_github_repository_ruleset_test.go |
Adds an acceptance-test bypass actor for the current user via data.github_user.current.id. |
templates/resources/repository_ruleset.md.tmpl |
Updates the generated docs template to include User as a bypass actor type and clarify actor_id. |
docs/resources/repository_ruleset.md |
Updates rendered documentation to match the template and new behavior. |
|
@manugeorge04 Please rebase the PR and address comments |
0bbb812 to
f6c9ebb
Compare
|
Thanks for the review @deiga Have worked on the comments and rebased. qq: From what I can see, there is an automated release flow, but I wanted to know if there is a rough timeline I could expect for when this change would land in a new version? |
|
@deiga Gentle bump on this! |
248df4e to
4a7d00b
Compare
robert-crandall
left a comment
There was a problem hiding this comment.
Thanks for this! I checked it against the current bypass-actor behavior and it lines up nicely - User is a supported actor type and does require the numeric user ID, which your acceptance test uses correctly. Nice touch cleaning up the stale OrganizationAdmin -> 1 note too, since that actor really doesn't carry an ID anymore. LGTM. 🎉
|
@manugeorge04 could you please rebase this PR so we can get it merged? |
- Create dedicated test case for User bypass actor using ConfigStateChecks - Remove User bypass actor from existing create_branch_ruleset test - Fix actor_id description: "Some resources" -> "Some actor types"
4a7d00b to
76fdcb8
Compare
…r types Resolves conflicts between this branch (EnterpriseOwner) and upstream main (User, merged via integrations#3438). Both actor types are now supported: - ValidateDiagFunc includes EnterpriseOwner and User - actor_id description covers Integration, User, and the ID-less types - Template and docs are in sync
Resolves #3423
Before the change?
github_repository_rulesetrejectedbypass_actorswithactor_type = "User"during schema validation, even though GitHub now supports user bypass actors for repository rulesets.After the change?
github_repository_rulesetacceptsactor_type = "User"forbypass_actors.Userbypass actor using the numeric GitHub user ID.Useras a validactor_typeand clarifies thatactor_idmust be the numeric GitHub user ID.Pull request checklist
Does this introduce a breaking change?
Please see our docs on breaking changes to help!