Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Dispatcher and other action skip lots of steps, don't do anything

Đang mở
#262 3 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
github-actions
Lĩnh vực
ci-cd, devops

Hướng nghiên cứu

Bắt đầu với README và các tệp được tham chiếu .github/workflows/gemini-review.yml, gemini-triage.yml và gemini-invoke.yml, sau đó kiểm tra các đầu vào của Action được báo cáo trong cảnh báo. Tái hiện workflow bằng Action YAML được cung cấp và các log hiện có, đồng thời xác nhận rằng dispatch đến được workflow có thể tái sử dụng dự kiến và hoàn tất Action được yêu cầu mà không có cảnh báo về đầu vào không mong muốn.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area/quality help wanted kind/bug
TL;DR

I've installed the actions using Gemini CLI following the README, and added my API key as a secret called GEMINI_API_KEY. I get this warning in the action output every time I invoke Gemini CLI:

Unexpected input(s) 'google_api_key', 'gemini_debug', 'gemini_model', valid inputs are ['prompt', 'settings', 'gemini_api_key', 'gcp_project_id', 'gcp_location', 'gcp_workload_identity_provider', 'gcp_service_account', 'use_vertex_ai', 'use_gemini_code_assist', 'gemini_cli_version']

I did not modify the action files in any way. Here's a screenshot:

Image

Note that the repo is private.

Expected behavior

That Gemini CLI actions work and create PRs, for example, or reply my comments.

Observed behavior

No response

Action YAML
name: '🔀 Gemini Dispatch'

on:
  pull_request_review_comment:
    types:
      - 'created'
  pull_request_review:
    types:
      - 'submitted'
  issues:
    types:
      - 'opened'
      - 'reopened'
  issue_comment:
    types:
      - 'created'

defaults:
  run:
    shell: 'bash'

jobs:
  debugger:
    if: |-
     ${{ fromJSON(vars.DEBUG || vars.ACTIONS_STEP_DEBUG || false) }}
    runs-on: 'ubuntu-latest'
    permissions:
      contents: 'read'
    steps:
      - name: 'Print context for debugging'
        env:
          DEBUG_event_name: '${{ github.event_name }}'
          DEBUG_event__action: '${{ github.event.action }}'
          DEBUG_event__comment__author_association: '${{ github.event.comment.author_association }}'
          DEBUG_event__issue__author_association: '${{ github.event.issue.author_association }}'
          DEBUG_event__pull_request__author_association: '${{ github.event.pull_request.author_association }}'
          DEBUG_event__review__author_association: '${{ github.event.review.author_association }}'
          DEBUG_event: '${{ toJSON(github.event) }}'
        run: |-
          env | grep '^DEBUG_'

  dispatch:
    # For PRs: only if not from a fork
    # For comments: only if user types @gemini-cli and is OWNER/MEMBER/COLLABORATOR
    # For issues: only on open/reopen
    if: |-
      (
        github.event.sender.type == 'User' &&
        startsWith(github.event.comment.body || github.event.review.body || github.event.issue.body, '@gemini-cli') &&
        contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association || github.event.review.author_association || github.event.issue.author_association)
      ) || (
        github.event_name == 'issues' &&
        contains(fromJSON('["opened", "reopened"]'), github.event.action)
      )
    runs-on: 'ubuntu-latest'
    permissions:
      contents: 'read'
      issues: 'write'
      pull-requests: 'write'
    outputs:
      command: '${{ steps.extract_command.outputs.command }}'
      request: '${{ steps.extract_command.outputs.request }}'
      additional_context: '${{ steps.extract_command.outputs.additional_context }}'
      issue_number: '${{ github.event.pull_request.number || github.event.issue.number }}'
    steps:
      - name: 'Mint identity token'
        id: 'mint_identity_token'
        if: |-
          ${{ vars.APP_ID }}
        uses: 'actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b' # ratchet:actions/create-github-app-token@v2
        with:
          app-id: '${{ vars.APP_ID }}'
          private-key: '${{ secrets.APP_PRIVATE_KEY }}'
          permission-contents: 'read'
          permission-issues: 'write'
          permission-pull-requests: 'write'

      - name: 'Extract command'
        id: 'extract_command'
        uses: 'actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea' # ratchet:actions/github-script@v7
        env:
          EVENT_TYPE: '${{ github.event_name }}.${{ github.event.action }}'
          REQUEST: '${{ github.event.comment.body || github.event.review.body || github.event.issue.body }}'
        with:
          script: |
            const request = process.env.REQUEST;
            const eventType = process.env.EVENT_TYPE
            core.setOutput('request', request);

            if (request.startsWith("@gemini-cli /review")) {
              core.setOutput('command', 'review');
              const additionalContext = request.replace(/^@gemini-cli \/review/, '').trim();
              core.setOutput('additional_context', additionalContext);
            } else if (request.startsWith("@gemini-cli /triage")) {
              core.setOutput('command', 'triage');
            } else if (request.startsWith("@gemini-cli")) {
              core.setOutput('command', 'invoke');
              const additionalContext = request.replace(/^@gemini-cli/, '').trim();
              core.setOutput('additional_context', additionalContext);
            } else if (['issues.opened', 'issues.reopened'].includes(eventType)) {
              core.setOutput('command', 'triage');
            } else {
              core.setOutput('command', 'fallthrough');
            }

      - name: 'Acknowledge request'
        env:
          GITHUB_TOKEN: '${{ steps.mint_identity_token.outputs.token || secrets.GITHUB_TOKEN || github.token }}'
          ISSUE_NUMBER: '${{ github.event.pull_request.number || github.event.issue.number }}'
          MESSAGE: |-
            🤖 Hi @${{ github.actor }}, I've received your request, and I'm working on it now! You can track my progress [in the logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for more details.
          REPOSITORY: '${{ github.repository }}'
        run: |-
          gh issue comment "${ISSUE_NUMBER}" \
            --body "${MESSAGE}" \
            --repo "${REPOSITORY}"

  review:
    needs: 'dispatch'
    if: |-
      ${{ needs.dispatch.outputs.command == 'review' }}
    uses: './.github/workflows/gemini-review.yml'
    permissions:
      contents: 'read'
      id-token: 'write'
      issues: 'write'
      pull-requests: 'write'
    with:
      additional_context: '${{ needs.dispatch.outputs.additional_context }}'
    secrets: 'inherit'

  triage:
    needs: 'dispatch'
    if: |-
      ${{ needs.dispatch.outputs.command == 'triage' }}
    uses: './.github/workflows/gemini-triage.yml'
    permissions:
      contents: 'read'
      id-token: 'write'
      issues: 'write'
      pull-requests: 'write'
    with:
      additional_context: '${{ needs.dispatch.outputs.additional_context }}'
    secrets: 'inherit'

  invoke:
    needs: 'dispatch'
    if: |-
      ${{ needs.dispatch.outputs.command == 'invoke' }}
    uses: './.github/workflows/gemini-invoke.yml'
    permissions:
      contents: 'read'
      id-token: 'write'
      issues: 'write'
      pull-requests: 'write'
    with:
      additional_context: '${{ needs.dispatch.outputs.additional_context }}'
    secrets: 'inherit'

  fallthrough:
    needs:
      - 'dispatch'
      - 'review'
      - 'triage'
      - 'invoke'
    if: |-
      ${{ always() && !cancelled() && (failure() || needs.dispatch.outputs.command == 'fallthrough') }}
    runs-on: 'ubuntu-latest'
    permissions:
      contents: 'read'
      issues: 'write'
      pull-requests: 'write'
    steps:
      - name: 'Mint identity token'
        id: 'mint_identity_token'
        if: |-
          ${{ vars.APP_ID }}
        uses: 'actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b' # ratchet:actions/create-github-app-token@v2
        with:
          app-id: '${{ vars.APP_ID }}'
          private-key: '${{ secrets.APP_PRIVATE_KEY }}'
          permission-contents: 'read'
          permission-issues: 'write'
          permission-pull-requests: 'write'

      - name: 'Send failure comment'
        env:
          GITHUB_TOKEN: '${{ steps.mint_identity_token.outputs.token || secrets.GITHUB_TOKEN || github.token }}'
          ISSUE_NUMBER: '${{ github.event.pull_request.number || github.event.issue.number }}'
          MESSAGE: |-
            🤖 I'm sorry @${{ github.actor }}, but I was unable to process your request. Please [see the logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for more details.
          REPOSITORY: '${{ github.repository }}'
        run: |-
          gh issue comment "${ISSUE_NUMBER}" \
            --body "${MESSAGE}" \
            --repo "${REPOSITORY}"
Log output

Additional information

No response

Ngôn ngữ chính
TypeScript
Star
2.1k
Fork
285
Merge trung bình
8 giờ 8 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của google-github-actions/run-gemini-cli

Tất cả issue của google-github-actions/run-gemini-cli

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.