Skip to content

[Experiment DNM] Adds Gemini CLI to Github Actions #2718

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: beta
Choose a base branch
from

Conversation

ericwindmill
Copy link
Collaborator

Pre-launch Checklist

  • I read the [Flutter Style Guide] recently, and have followed its advice.
  • I signed the [CLA].
  • I read the [Contributors Guide].
  • I have added sample code updates to the [changelog].
  • I updated/added relevant documentation (doc comments with ///).

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

📋 Review Summary

This PR introduces a comprehensive set of GitHub Actions workflows powered by the Gemini CLI to automate various repository management tasks, including PR reviews, issue triage, and general assistance. The workflows are well-structured and the prompts are detailed, which is great.

🔍 General Feedback

  • The workflows are very powerful and will be a great addition to the repository.
  • The prompts for the Gemini CLI are well-written and provide clear instructions.
  • I've made a few suggestions to improve the readability and maintainability of the workflow files, mainly by simplifying conditions and commands.
  • I've also pointed out a few potential issues in the prompt files that could be improved.
  • There is one unrelated change in a pubspec.yaml file that seems to be a mistake.

Overall, this is a great PR that will significantly improve the automation of this repository.

!contains(github.event.issue.body, '/review') &&
!contains(github.event.issue.body, '/triage') &&
(
github.event.sender.type == 'User' && (
Copy link

Choose a reason for hiding this comment

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

🟡 This condition is very complex and repeated across multiple workflows. To improve readability and maintainability, you can use the contains function to simplify the author association check.

Suggested change
github.event.sender.type == 'User' && (
(
github.event.sender.type == 'User' &&
contains(['OWNER', 'MEMBER', 'COLLABORATOR'], github.event.issue.author_association)
)

This can be applied to all the author association checks in this file.

(github.event_name == 'issue_comment' &&
contains(github.event.comment.body, '@gemini-cli /triage') &&
(github.event.comment.author_association == 'OWNER' ||
github.event.comment.author_association == 'MEMBER' ||
Copy link

Choose a reason for hiding this comment

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

🟡 You can use the contains function to simplify the author association check, making the condition more readable and maintainable.

Suggested change
github.event.comment.author_association == 'MEMBER' ||
(github.event_name == 'issue_comment' &&
contains(github.event.comment.body, '@gemini-cli /triage') &&
contains(['OWNER', 'MEMBER', 'COLLABORATOR'], github.event.comment.author_association))

2. **Analyze Git History**:
* Run `git log` to find the most recent commit to a `.dart` file within that project's directory made by a human (i.e., not a bot).
* **Command**:
```bash
Copy link

Choose a reason for hiding this comment

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

🟡 The git command for finding the most recent commit might not be compatible with all git versions due to the negative lookahead in the author filter. A more compatible way to exclude bots is to use --invert-grep. Also, the path globbing might not work as expected. It's better to run the command from the project root and specify the path.

Suggested change
```bash
git log -1 --author='bot' --invert-grep --pretty="format:%ad" --date=short -- path/to/project/**/*.dart

You would need to replace path/to/project with the actual path to the project. Or, if running from the project directory, just use . as the path.

git log -1 --author='bot' --invert-grep --pretty="format:%ad" --date=short -- .

@@ -4,7 +4,7 @@ version: 1.0.0+1
resolution: workspace

environment:
sdk: ^3.9.0-0
sdk: ^3.8.1-0

Copy link

Choose a reason for hiding this comment

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

🟡 This change downgrades the SDK constraint. Given the PR title, this seems unrelated and might be an accidental change. Please verify if this downgrade is intended.

@ericwindmill ericwindmill changed the title Adds Gemini CLI to Github Actions [Experiment DNM] Adds Gemini CLI to Github Actions Aug 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant