Skip to content

Conversation

@marcelwa
Copy link
Owner

@marcelwa marcelwa commented Aug 7, 2025

Description

This pull request introduces three new GitHub Actions workflows to automate and enhance issue and pull request management using the Gemini CLI. These workflows provide automated issue triage (both on-demand and scheduled) and enable a conversational AI assistant for responding to issues and PR comments. The most important changes are grouped below:

Automated Issue Triage Workflows:

  • Added .github/workflows/gemini-issue-automated-triage.yml to automatically triage issues when they are opened, reopened, or when a specific comment command is used. The workflow applies appropriate labels using Gemini CLI and removes the "status/needs-triage" label if present.
  • Added .github/workflows/gemini-issue-scheduled-triage.yml to periodically (hourly) scan for untriaged or "needs-triage" issues and apply relevant labels using Gemini CLI, ensuring issues are categorized without manual intervention.

Conversational AI Assistant Workflow:

  • Added .github/workflows/gemini-cli.yml, a workflow that enables a Gemini-powered AI assistant to respond to PR review comments, PR reviews, and issue comments when invoked with @gemini-cli. The workflow checks permissions, gathers context, and provides step-by-step guidance for fixes, triage, and questions, including maintaining a visible checklist plan for code changes.

Checklist:

  • The pull request only contains commits that are related to it.
  • I have added appropriate tests and documentation.
  • I have made sure that all CI jobs on GitHub pass.
  • The pull request introduces no new warnings and follows the project's style guidelines.

@marcelwa marcelwa self-assigned this Aug 7, 2025
@Copilot Copilot AI review requested due to automatic review settings August 7, 2025 14:42
@marcelwa marcelwa added the github_actions Pull requests that update GitHub Actions code label Aug 7, 2025
Copy link

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 pull request sets up comprehensive GitHub Actions workflows for Gemini CLI integration to automate issue and pull request management. The implementation provides automated issue triage capabilities and enables an AI assistant for responding to repository interactions.

  • Adds three new GitHub Actions workflows that leverage Gemini CLI for automated repository management
  • Implements both on-demand and scheduled issue triage with automatic label application
  • Creates a conversational AI assistant that can respond to PR comments, reviews, and issues when invoked

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
.github/workflows/gemini-pr-review.yml Implements automated PR review using Gemini CLI with comprehensive review criteria and GitHub integration
.github/workflows/gemini-issue-scheduled-triage.yml Provides hourly scheduled triage for unlabeled and needs-triage issues
.github/workflows/gemini-issue-automated-triage.yml Handles automatic triage when issues are opened, reopened, or manually triggered
.github/workflows/gemini-cli.yml Creates a conversational AI assistant for responding to GitHub interactions with planning and execution capabilities

github.event.comment.author_association == 'MEMBER' ||
github.event.comment.author_association == 'COLLABORATOR'
)
) ||
Copy link

Copilot AI Aug 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition checks for 'issue_comment' event but this event type is not included in the workflow triggers. This condition will never be true since 'issue_comment' is not in the 'on:' section.

Suggested change
) ||

Copilot uses AI. Check for mistakes.

PR_NUMBER: "${{ steps.get_pr.outputs.pr_number || steps.get_pr_comment.outputs.pr_number }}"
PR_DATA: "${{ steps.get_pr.outputs.pr_data || steps.get_pr_comment.outputs.pr_data }}"
CHANGED_FILES: "${{ steps.get_pr.outputs.changed_files || steps.get_pr_comment.outputs.changed_files }}"
ADDITIONAL_INSTRUCTIONS: "${{ steps.get_pr.outputs.additional_instructions || steps.get_pr_comment.outputs.additional_instructions }}"
Copy link

Copilot AI Aug 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'get_pr' step does not set 'additional_instructions' in its outputs, but this line attempts to reference it. This will result in an empty value being passed when the workflow is triggered by pull_request or workflow_dispatch events.

Copilot uses AI. Check for mistakes.

}
},
"coreTools": [
"run_shell_command(echo)",
Copy link

Copilot AI Aug 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allowing unrestricted 'echo' command execution could potentially expose sensitive environment variables or secrets if malicious input is provided through the Gemini CLI prompts.

Suggested change
"run_shell_command(echo)",

Copilot uses AI. Check for mistakes.

group: "${{ github.workflow }}-${{ github.event.issue.number }}"
cancel-in-progress: |-
${{ github.event.sender.type == 'User' && ( github.event.issue.author_association == 'OWNER' || github.event.issue.author_association == 'MEMBER' || github.event.issue.author_association == 'COLLABORATOR') }}

Copy link

Copilot AI Aug 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'cancel-in-progress' field expects a boolean value, but a complex expression is provided. This should be moved to the job level condition instead.

Suggested change
cancel-in-progress: true

Copilot uses AI. Check for mistakes.

)
)
) ||
(
Copy link

Copilot AI Aug 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow triggers do not include 'issues' event, so this condition checking for 'github.event_name == "issues"' will never be true.

Suggested change
(

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant