[8.19] [Audit Logging] Do not crash Kibana when unable to write audit logs (#282347) #154196
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: Reviewer Comment Router | |
| on: | |
| issue_comment: | |
| types: [ created ] | |
| pull_request_review_comment: | |
| types: [ created ] | |
| permissions: | |
| contents: read | |
| issues: read | |
| pull-requests: read | |
| jobs: | |
| route: | |
| name: Route reviewer comment | |
| if: | | |
| github.event.sender.type != 'Bot' | |
| && ( | |
| ( | |
| github.event_name == 'issue_comment' | |
| && github.event.issue.pull_request | |
| && !contains(github.event.issue.labels.*.name, 'reviewer:skip-ai') | |
| && ( | |
| ( | |
| contains(github.event.comment.body, '@codex') | |
| && contains(github.event.issue.labels.*.name, 'reviewer:codex') | |
| ) | |
| || ( | |
| contains(github.event.comment.body, '@claude') | |
| ) | |
| || ( | |
| contains(github.event.comment.body, '@scout') | |
| && contains(github.event.issue.labels.*.name, 'reviewer:scout') | |
| ) | |
| ) | |
| ) | |
| || ( | |
| github.event_name == 'pull_request_review_comment' | |
| && !contains(github.event.pull_request.labels.*.name, 'reviewer:skip-ai') | |
| && ( | |
| ( | |
| contains(github.event.comment.body, '@codex') | |
| && contains(github.event.pull_request.labels.*.name, 'reviewer:codex') | |
| ) | |
| || ( | |
| contains(github.event.comment.body, '@claude') | |
| ) | |
| || ( | |
| contains(github.event.comment.body, '@scout') | |
| && contains(github.event.pull_request.labels.*.name, 'reviewer:scout') | |
| ) | |
| ) | |
| ) | |
| ) | |
| runs-on: ubuntu-slim | |
| steps: | |
| - name: Checkout workflow scripts | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| ref: main | |
| persist-credentials: false | |
| - name: Validate reviewer comment | |
| id: route | |
| uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 | |
| with: | |
| script: | | |
| const { routeReviewerComment } = require('./.github/scripts/reviewer_comment'); | |
| await routeReviewerComment({ context, core }); | |
| - name: Upload reviewer comment | |
| if: steps.route.outputs.matched == 'true' | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: reviewer-comment | |
| path: reviewer-comment/comment.json | |
| retention-days: 1 |