Skip to content

add AI-powered GitHub workflows and development agents#234

Merged
recscse merged 2 commits intomainfrom
feature-branch
Feb 25, 2026
Merged

add AI-powered GitHub workflows and development agents#234
recscse merged 2 commits intomainfrom
feature-branch

Conversation

@recscse
Copy link
Copy Markdown
Contributor

@recscse recscse commented Feb 25, 2026

Pull Request

📋 Description

Briefly describe the changes and their purpose. Explain why this change is needed.

🔄 Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 📚 Documentation
  • 🔧 Refactoring/Optimization

✅ Checklist

  • My code follows the project's style guidelines (GEMINI.md)
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally
  • I have checked for and removed hardcoded secrets/values
  • (If applicable) I have updated the documentation

🛡️ Critical Checks (Trading App Specific)

  • 💸 Risk Safety: Verified that order sizing, stop-loss, and trade execution logic are safe.
  • 🗄️ Database: Included alembic migrations if database models were modified.

🔗 Related Issues

Closes #

📸 Screenshots (for UI changes)

Implemented AI-powered GitHub workflows and development agents to streamline devops and support.

- Implemented 'AI Issue Triage' workflow to automatically analyze new issues using Gemini.
- Enhanced 'PR Review & Quality' workflow with automated code complexity analysis, trading risk checks, AI code review, automated backtesting, and documentation impact assessment.
- Added a suite of AI agents in scripts/: ai_bug_triager.py, ai_docs_agent.py, ai_pr_reviewer.py, automated_backtest.py, and trading_risk_guard.py.
- Introduced AISupportService and a Telegram-based support bot (ai_support_bot_telegram.py) for automated documentation and trade-related queries.
- Updated requirements.txt with google-generativeai and PyGithub dependencies.
@github-actions
Copy link
Copy Markdown

🤖 Automated PR Quality Check

Validated PR structure, code complexity, and trading safety patterns. Reviewers have been notified.

Comment on lines +9 to +32
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install dependencies
run: |
pip install google-generativeai PyGithub

- name: Run AI Bug Triager
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python scripts/ai_bug_triager.py
--repo "${{ github.repository }}"
--issue "${{ github.event.issue.number }}"
--github-token "$GITHUB_TOKEN"
--gemini-api-key "$GEMINI_API_KEY"

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 2 months ago

In general, this issue is fixed by adding an explicit permissions block to the workflow (either at the root level or within the specific job) that grants only the minimal scopes the job needs. For an issue‑triage workflow, the likely needs are read access to repository contents plus the ability to read/write issues (e.g., comment, label, close). That suggests contents: read and issues: write as a good least‑privilege baseline instead of inheriting broad default permissions.

The best fix here, without changing existing functionality, is to add a permissions block to the triage job (or at the workflow root). Since we only see a single job, putting it at the job level keeps the change tightly scoped. Based on the workflow’s purpose (“AI Issue Triage”) and the fact that it passes GITHUB_TOKEN to a script that likely manipulates issues, we will explicitly grant contents: read and issues: write. This both satisfies CodeQL (by constraining the token) and documents the workflow’s expected permissions. The specific change is to insert, in .github/workflows/issue-triage.yml, a permissions: section under triage: before runs-on: ubuntu-latest. No additional imports, methods, or external definitions are needed, as this is purely a YAML configuration change for GitHub Actions.

Suggested changeset 1
.github/workflows/issue-triage.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/issue-triage.yml b/.github/workflows/issue-triage.yml
--- a/.github/workflows/issue-triage.yml
+++ b/.github/workflows/issue-triage.yml
@@ -6,6 +6,9 @@
 
 jobs:
   triage:
+    permissions:
+      contents: read
+      issues: write
     runs-on: ubuntu-latest
     steps:
     - name: Checkout repository
EOF
@@ -6,6 +6,9 @@

jobs:
triage:
permissions:
contents: read
issues: write
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
@netlify
Copy link
Copy Markdown

netlify Bot commented Feb 25, 2026

Deploy Preview for resplendent-shortbread-e830d3 ready!

Name Link
🔨 Latest commit 2ba67f7
🔍 Latest deploy log https://app.netlify.com/projects/resplendent-shortbread-e830d3/deploys/699f320de718940008e82a71
😎 Deploy Preview https://deploy-preview-234--resplendent-shortbread-e830d3.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 51
Accessibility: 91
Best Practices: 92
SEO: 100
PWA: 90
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@recscse recscse merged commit 3617469 into main Feb 25, 2026
13 of 19 checks passed
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.

2 participants