Skip to content

Conversation

@HavenDV
Copy link
Owner

@HavenDV HavenDV commented Sep 13, 2025

Summary by CodeRabbit

  • New Features

    • Added an “exempt” option to bypass modes for actor rule evaluation.
    • Added an “exempt” option to rule application modes.
  • Documentation

    • Clarified that with bypass mode set to “exempt,” rules do not run for the actor and no bypass audit entry is created.
  • Refactor

    • Standardized team data by referencing a shared team schema for consistency across endpoints.

@coderabbitai
Copy link

coderabbitai bot commented Sep 13, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

OpenAPI spec in src/libs/GitHub/openapi.yaml was updated to add an exempt enum value to two rule-related enums and clarify bypass behavior. The teams array items were refactored to reference a shared team schema instead of inlining the team object.

Changes

Cohort / File(s) Summary of Changes
Bypass mode enum update
src/libs/GitHub/openapi.yaml
Added enum value exempt to bypass_mode and clarified description: when bypass_mode is exempt, actor rules do not run and no bypass audit entry is created.
Rule application enum update
src/libs/GitHub/openapi.yaml
Added exempt to a rule-application enumeration that previously allowed always, pull_requests_only, never.
Teams schema refactor
src/libs/GitHub/openapi.yaml
Replaced inline team object in teams items with a reference to #/components/schemas/team; removed duplicated inline properties.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant A as Actor
  participant RE as Rule Engine
  participant GH as GitHub API
  participant AL as Audit Log

  rect rgba(230,240,255,0.6)
  note over RE: Evaluate actor's bypass_mode
  A->>GH: Request triggering rules
  GH->>RE: Invoke rule evaluation
  alt bypass_mode = exempt (new)
    note over RE: Skip rule evaluation
    RE-->>GH: Return without running rules
    note over AL: No bypass audit entry created
  else other modes
    RE->>RE: Evaluate rules
    RE-->>GH: Return decision
    GH->>AL: Write audit entry if applicable
  end
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

A rabbit taps the YAML scroll,
Adds “exempt” to the enum roll.
Teams now share one schema, neat—
Fewer fields beneath our feet.
Rules may nap when flags are sent,
No audit crumbs—just... exempt.
Hippity-hop, the spec is spent. 🐇✨

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bot/update-openapi_202509130607

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cb2bb1e and 66c3557.

⛔ Files ignored due to path filters (7)
  • src/libs/GitHub/Generated/GitHub.JsonSerializerContextTypes.g.cs is excluded by !**/generated/**
  • src/libs/GitHub/Generated/GitHub.Models.BranchRestrictionPolicy.g.cs is excluded by !**/generated/**
  • src/libs/GitHub/Generated/GitHub.Models.BranchRestrictionPolicyTeam.Json.g.cs is excluded by !**/generated/**
  • src/libs/GitHub/Generated/GitHub.Models.BranchRestrictionPolicyTeam.g.cs is excluded by !**/generated/**
  • src/libs/GitHub/Generated/GitHub.Models.RepositoryRulesetBypassActor.g.cs is excluded by !**/generated/**
  • src/libs/GitHub/Generated/GitHub.Models.RepositoryRulesetBypassActorBypassMode.g.cs is excluded by !**/generated/**
  • src/libs/GitHub/Generated/GitHub.Models.RepositoryRulesetCurrentUserCanBypass.g.cs is excluded by !**/generated/**
📒 Files selected for processing (1)
  • src/libs/GitHub/openapi.yaml (3 hunks)

Warning

Tools execution failed with the following error:

Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error)


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot merged commit 5717ce8 into main Sep 13, 2025
1 of 3 checks passed
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:OpenAPI: add exempt to enums, clarify bypass, use shared team schema Sep 13, 2025
Sign up for free to 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.

2 participants