[code-simplifier] simplify: use indexer-style dict initializer and inline lambdas in SerializerUtilities #441
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Skip Copilot code review for bot PRs | |
| on: | |
| pull_request_target: | |
| types: [opened, reopened, ready_for_review, synchronize] | |
| permissions: | |
| pull-requests: write | |
| jobs: | |
| remove-copilot-reviewer: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.repository == 'microsoft/testfx' && (github.event.pull_request.user.login == 'dotnet-bot' || github.event.pull_request.user.login == 'dotnet-maestro[bot]') && (startsWith(github.event.pull_request.title, 'Localized file check-in') || startsWith(github.event.pull_request.title, '[main] Update dependencies from dotnet/') || startsWith(github.event.pull_request.title, '[main] Update dependencies from microsoft/') || startsWith(github.event.pull_request.title, '[main] Update dependencies from devdiv/')) }} | |
| steps: | |
| - name: Remove Copilot as a requested reviewer | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PR: ${{ github.event.pull_request.number }} | |
| REPO: ${{ github.repository }} | |
| run: | | |
| # The CopilotAutoReview ruleset automatically requests a review from | |
| # copilot-pull-request-reviewer on every PR. For mechanical bot PRs | |
| # (OneLocBuild, Maestro dependency flow), that review is pure noise, | |
| # so we drop the request as soon as it's added. | |
| # | |
| # We check first instead of unconditionally deleting so that real | |
| # errors (auth, transient outages, etc.) still surface as workflow | |
| # failures rather than being masked by `|| true`. | |
| if gh api "repos/$REPO/pulls/$PR/requested_reviewers" \ | |
| --jq '.users[].login' | grep -qxF 'copilot-pull-request-reviewer'; then | |
| echo "Removing copilot-pull-request-reviewer from PR #$PR." | |
| gh api -X DELETE \ | |
| "repos/$REPO/pulls/$PR/requested_reviewers" \ | |
| -f 'reviewers[]=copilot-pull-request-reviewer' | |
| else | |
| echo "copilot-pull-request-reviewer is not currently requested on PR #$PR; nothing to do." | |
| fi |