Skip to content

Delete unnecessary or condition #116418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 8, 2025
Merged

Delete unnecessary or condition #116418

merged 1 commit into from
Jun 8, 2025

Conversation

jkotas
Copy link
Member

@jkotas jkotas commented Jun 8, 2025

No description provided.

@Copilot Copilot AI review requested due to automatic review settings June 8, 2025 21:19
@jkotas jkotas requested a review from jeffhandley as a code owner June 8, 2025 21:19
@jkotas jkotas requested a review from AaronRobinsonMSFT June 8, 2025 21:19
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jun 8, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

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 removes unnecessary or: conditions in the resource management policy to streamline the conditional logic.

  • Simplifies two Pull_Request rule blocks by deleting redundant - or: lines
  • Ensures payloadType and file matching are now strictly ANDed under each rule
Comments suppressed due to low confidence (2)

.github/policies/resourceManagement.yml:1676

  • Removing the or: operator changes this block’s logic from OR to AND. If the intent was to trigger the rule when either condition matches, reintroduce or: with a proper list:
- if:
    or:
      - payloadType: Pull_Request
      - filesMatchPattern:
          pattern: (?i).*ILLink.*
          matchAny: true
-      - or:

.github/policies/resourceManagement.yml:1688

  • [nitpick] The two if blocks use identical payloadType and filesMatchPattern conditions for different labels. Consider defining a YAML anchor or reusable snippet to avoid duplicating the same matching logic.
- if:

@jkotas
Copy link
Member Author

jkotas commented Jun 8, 2025

I have accepted copilot suggestion in the previous PR, not realizing that it was incomplete

@jkotas jkotas added area-Infrastructure and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Jun 8, 2025
@jkotas
Copy link
Member Author

jkotas commented Jun 8, 2025

/ba-g Helix Queue Insights is stuck

@jkotas jkotas merged commit 201bd57 into dotnet:main Jun 8, 2025
17 of 18 checks passed
@jkotas jkotas deleted the fix-condition branch June 8, 2025 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants