Skip to content

[FEAT] Add User as repository ruleset bypass actor - #3438

Merged
stevehipwell merged 3 commits into
integrations:mainfrom
manugeorge04:add-user-repository-ruleset-bypass-actor
Jun 22, 2026
Merged

stevehipwell merged 3 commits into
integrations:mainfrom
manugeorge04:add-user-repository-ruleset-bypass-actor

Conversation

@manugeorge04

Copy link
Copy Markdown
Contributor

Resolves #3423


Before the change?

  • github_repository_ruleset rejected bypass_actors with actor_type = "User" during schema validation, even though GitHub now supports user bypass actors for repository rulesets.

After the change?

  • github_repository_ruleset accepts actor_type = "User" for bypass_actors.
  • The repository ruleset acceptance test now exercises a User bypass actor using the numeric GitHub user ID.
  • Repository ruleset documentation now lists User as a valid actor_type and clarifies that actor_id must be the numeric GitHub user ID.

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! 🚀

@manugeorge04
manugeorge04 force-pushed the add-user-repository-ruleset-bypass-actor branch from 5263dc0 to 252bc71 Compare May 20, 2026 21:11
@manugeorge04 manugeorge04 changed the title Add User as repository ruleset bypass actor [FEAT] Add User as repository ruleset bypass actor May 20, 2026

@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 contributing!
This is looking good. There are some minor changes required to get this mergeable

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.

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 User as a valid bypass_actors.actor_type in github_repository_ruleset schema validation and clarify actor_id semantics.
  • Extend the repository ruleset acceptance test to add a User bypass actor using the numeric GitHub user ID.
  • Update repository ruleset documentation (and its template) to list User as a supported actor type and describe the required actor_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.

@deiga

deiga commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

@manugeorge04 Please rebase the PR and address comments

@deiga deiga added this to the v6.13.0 milestone Jun 2, 2026
@deiga deiga added Type: Feature New feature or request vNext Awaiting response and removed vNext labels Jun 2, 2026
@manugeorge04
manugeorge04 force-pushed the add-user-repository-ruleset-bypass-actor branch 4 times, most recently from 0bbb812 to f6c9ebb Compare June 4, 2026 21:39
@manugeorge04

manugeorge04 commented Jun 4, 2026 •

Copy link
Copy Markdown
Contributor Author

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?

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.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@manugeorge04
manugeorge04 requested a review from deiga June 9, 2026 07:39
@manugeorge04

Copy link
Copy Markdown
Contributor Author

@deiga Gentle bump on this!
Accepted and applied all the changes.

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.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread docs/resources/repository_ruleset.md Resolved
@manugeorge04
manugeorge04 force-pushed the add-user-repository-ruleset-bypass-actor branch from 248df4e to 4a7d00b Compare June 22, 2026 07:25
@deiga
deiga requested a review from stevehipwell June 22, 2026 08:26

@stevehipwell stevehipwell 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

@robert-crandall robert-crandall 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.

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. 🎉

@stevehipwell

Copy link
Copy Markdown
Collaborator

@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"
@manugeorge04
manugeorge04 force-pushed the add-user-repository-ruleset-bypass-actor branch from 4a7d00b to 76fdcb8 Compare June 22, 2026 17:16
@stevehipwell
stevehipwell enabled auto-merge (squash) June 22, 2026 17:44
@stevehipwell
stevehipwell merged commit 64da252 into integrations:main Jun 22, 2026
10 checks passed
nitinjain999 added a commit to nitinjain999/terraform-provider-github that referenced this pull request Jun 24, 2026
…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
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 User actor type in bypass_actors for ruleset

5 participants