-
Notifications
You must be signed in to change notification settings - Fork 0
Add GitHub Actions workflow to summarize new issues #7
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Igor Holt <[email protected]>
|
Note Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported. |
There was a problem hiding this 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 PR adds a new GitHub Actions workflow that automatically generates AI-powered summaries for newly opened issues and posts them as comments.
Changes:
- Added a new workflow file that triggers on issue creation
- Configured AI inference to summarize issue titles and bodies
- Automated posting of AI-generated summaries as issue comments
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Comment with AI summary | ||
| run: | | ||
| gh issue comment $ISSUE_NUMBER --body '${{ steps.inference.outputs.response }}' |
Copilot
AI
Feb 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The output from the AI inference step is not properly escaped when used in the shell command. Using single quotes around the variable in the shell is insufficient protection against command injection. If the AI response contains single quotes, it could break out of the string and execute arbitrary commands. Use double quotes and proper escaping, or better yet, pass the response through an environment variable that's referenced in the command, such as: gh issue comment "$ISSUE_NUMBER" --body "$RESPONSE"
| gh issue comment $ISSUE_NUMBER --body '${{ steps.inference.outputs.response }}' | |
| gh issue comment "$ISSUE_NUMBER" --body "$RESPONSE" |
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| ISSUE_NUMBER: ${{ github.event.issue.number }} | ||
| RESPONSE: ${{ steps.inference.outputs.response }} |
Copilot
AI
Feb 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The RESPONSE environment variable is defined but never used in the script. The workflow uses the steps.inference.outputs.response expression directly in the shell command instead of referencing the $RESPONSE environment variable. Either remove this unused variable or update line 30 to use "$RESPONSE" instead of the expression for better security and maintainability.
| runs-on: ubuntu-latest | ||
| permissions: | ||
| issues: write | ||
| models: read |
Copilot
AI
Feb 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The permission "models" is not a valid GitHub Actions permission. GitHub Actions supports permissions like "issues", "contents", "pull-requests", etc., but "models" is not among them. This will likely cause the workflow to fail. If this is intended for AI model access, you may need to verify the correct permission name or remove this line if it's not needed.
| models: read |
No description provided.