Skip to content

feat: Add repository target to ruleset - #3850

Merged
gmlewis merged 3 commits into
google:masterfrom
stevehipwell:ruleset-target-repo
Dec 4, 2025
Merged

feat: Add repository target to ruleset#3850
gmlewis merged 3 commits into
google:masterfrom
stevehipwell:ruleset-target-repo

Conversation

@stevehipwell

Copy link
Copy Markdown
Contributor

This PR adds support for rulesets targeting repositories (otherwise known as repository management policies).

@gmlewis I also removed the usage of reflect in favour of a more manual pattern.

@codecov

codecovBot commented Dec 3, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.42857% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.36%. Comparing base (841abae) to head (21fb8df).
⚠️ Report is 1 commits behind head on master.

Files with missing linesPatch %Lines
github/rules.go71.42%10 Missing and 10 partials ⚠️
Additional details and impacted files
@@ Coverage Diff @@## master #3850 +/- ##
==========================================
- Coverage 92.46% 92.36% -0.11% 
==========================================
Files 199 199 Lines 14240 14308 +68 ==========================================
+ Hits 13167 13215 +48 - Misses 884 894 +10 - Partials 189 199 +10 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gmlewisgmlewis 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.

Thank you, @stevehipwell!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.

cc: @alexandear - @zyfy29

@stevehipwell

Copy link
Copy Markdown
ContributorAuthor

@gmlewis sorry for overwriting the last commit, force of habit.

Comment threadgithub/rules.go Outdated
Comment threadscript/lint.sh Outdated
@stevehipwell

Copy link
Copy Markdown
ContributorAuthor

@gmlewis this PR requires #3853 to be merged first to fix the linting.

Signed-off-by: Steve Hipwell <steve.hipwell@gmail.com>
Signed-off-by: Steve Hipwell <steve.hipwell@gmail.com>
Signed-off-by: Steve Hipwell <steve.hipwell@gmail.com>
@stevehipwell

Copy link
Copy Markdown
ContributorAuthor

@gmlewis I've rebased this PR onto the linter changes.

@gmlewis

Copy link
Copy Markdown
Collaborator

Thank you, @alexandear!
Merging.

@gmlewis
gmlewis merged commit e119eb8 into google:masterDec 4, 2025
5 of 7 checks passed
@stevehipwell
stevehipwell deleted the ruleset-target-repo branch December 4, 2025 13:47
@stevehipwell

Copy link
Copy Markdown
ContributorAuthor

@gmlewis this functionality is something I'd really appreciate being released soon if at all possible?

@gmlewis

Copy link
Copy Markdown
Collaborator

@gmlewis this functionality is something I'd really appreciate being released soon if at all possible?

OK, I'll work on cutting a release today.

@gmlewis

Copy link
Copy Markdown
Collaborator

@stevehipwell - this is now available in v80.0.0:
https://github.com/google/go-github/releases/tag/v80.0.0

elminster-aom added a commit to elminster-aom/go-github that referenced this pull request Dec 10, 2025
* forkstream/master:
chore!: Remove `PullRequestRuleParameters.AutomaticCopilotCodeReviewEnabled` field (google#3866)
feat: Add support for `copilot_code_review` rule type (google#3857)
feat: Implement Enterprise SCIM - Delete Groups or Users (google#3856)
feat: Add `advanced_search` parameter to `SearchOptions` (google#3868)
fix!: Change Org usage report `Quantity` to `float64` (google#3862)
build(deps): Bump actions/checkout from 6.0.0 to 6.0.1 in the actions group (google#3863)
build(deps): Bump golang.org/x/sync from 0.18.0 to 0.19.0 in /tools (google#3864)
build(deps): Bump golang.org/x/term from 0.37.0 to 0.38.0 in /example (google#3865)
feat: Implement Enterprise SCIM - Set Groups or Users (google#3858)
feat: Add support for Enterprise Team APIs (google#3861)
Bump go-github from v79 to v80 in /scrape (google#3855)
Bump version of go-github to v80.0.0 (google#3854)
feat: Add repository target to ruleset (google#3850)
jlaportebot added a commit to jlaportebot/go-github that referenced this pull request Jun 28, 2026
Sign up for freeto 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.

3 participants

@stevehipwell@gmlewis@alexandear