github-actions[bot] commented on code in PR #66272:
URL: https://github.com/apache/doris/pull/66272#discussion_r3680950885
##########
.github/workflows/code-review-runner.yml:
##########
@@ -41,11 +44,75 @@ jobs:
code-review:
runs-on: ubuntu-latest
timeout-minutes: 120
+ if: >-
+ github.event_name != 'issue_comment' ||
+ (
+ github.event.issue.pull_request &&
+ startsWith(github.event.comment.body, '/review') &&
+ (
+ github.event.comment.author_association == 'MEMBER' ||
+ github.event.comment.author_association == 'OWNER' ||
+ github.event.comment.author_association == 'COLLABORATOR'
+ )
+ )
steps:
+ - name: Resolve review inputs
+ id: review_inputs
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ EVENT_NAME: ${{ github.event_name }}
+ ISSUE_NUMBER: ${{ github.event.issue.number }}
+ COMMENT_BODY: ${{ github.event.comment.body }}
+ INPUT_PR_NUMBER: ${{ inputs.pr_number }}
+ INPUT_HEAD_SHA: ${{ inputs.head_sha }}
+ INPUT_BASE_SHA: ${{ inputs.base_sha }}
+ INPUT_REVIEW_FOCUS: ${{ inputs.review_focus }}
+ REPO: ${{ github.repository }}
+ run: |
+ if [ "$EVENT_NAME" = "issue_comment" ]; then
Review Comment:
Reusable workflows inherit the caller workflow's `github` context ([GitHub
docs](https://docs.github.com/en/actions/reference/workflows-and-actions/reusing-workflow-configurations)),
so a `workflow_call` originating from `issue_comment` still has
`github.event_name == 'issue_comment'`. This branch then discards the required
call inputs and re-resolves from the caller comment; the job-level gate above
can also skip it. Before this refactor, every reusable invocation consumed
`inputs.*`, so this breaks the promised `workflow_call` compatibility. Please
use an explicit direct-trigger discriminator (for example, call/dispatch input
presence) consistently in both the gate and resolver.
##########
.github/workflows/code-review-runner.yml:
##########
@@ -1,6 +1,8 @@
name: Code Review Runner
on:
+ issue_comment:
Review Comment:
Adding this direct `issue_comment` trigger does not make `/review` a
one-runner command repository-wide.
`.github/workflows/comment-to-trigger-teamcity.yml:33` allocates an Ubuntu job
whenever the whole comment contains `run`, so a supported focus such as
`/review inspect runner allocation` starts both jobs (`runner` matches);
`/review skip buildall` also starts
`.github/workflows/code-review-sync-result.yml` and can allocate three. These
filters run before their parser/permission steps, so the allocations are real.
Please exclude `/review` from the other job-level gates (or otherwise
centralize/tighten command routing) and cover focus text in the fan-out test.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]