Skip to content

security: purge committed private key, harden gitignore, reorganize docs #38

security: purge committed private key, harden gitignore, reorganize docs

security: purge committed private key, harden gitignore, reorganize docs #38

name: AI-Generated Code Review & Merge
on:
push:
branches:

Check failure on line 5 in .github/workflows/deploy-to-production.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/deploy-to-production.yml

Invalid workflow file

You have an error in your yaml syntax on line 5
- 'ai/**'
- 'auto/**'
permissions:
contents: write
pull-requests: write
jobs:
create-pr:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get branch info
id: branch
run: |
BRANCH_NAME="${{ github.ref_name }}"
echo "branch=$BRANCH_NAME" >> $GITHUB_OUTPUT
echo "Current branch: $BRANCH_NAME"
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'Auto-generated changes from AI tool'
title: 'Review: AI-generated changes from ${{ steps.branch.outputs.branch }}'
body: |
## 🤖 AI-Generated Changes
This pull request contains changes automatically generated by an AI tool.
**Branch:** ${{ steps.branch.outputs.branch }}
**Time:** ${{ github.event.head_commit.timestamp }}
Please review the changes carefully before approving and merging.
---
✅ **After reviewing:**
1. Make any necessary adjustments
2. Approve this PR
3. Merge to main (you will be logged as the merger)
---
*This PR was automatically created by the workflow.*
branch: ${{ steps.branch.outputs.branch }}
base: main
delete-branch: false
assignees: ${{ github.event.head_commit.author.username }}
labels: 'automated, ai-generated'
- name: Send email notification
if: steps.cpr.outputs.pull-request-number != ''
uses: dawidd6/action-send-mail@v3
with:
server_address: ${{ secrets.MAIL_SERVER }}
server_port: ${{ secrets.MAIL_PORT }}
username: ${{ secrets.MAIL_USERNAME }}
password: ${{ secrets.MAIL_PASSWORD }}
subject: '🔔 PR Review Needed: AI-Generated Code Changes'
to: ${{ secrets.REVIEWER_EMAIL }}
from: 'GitHub Actions <noreply@github.com>'
body: |
Hello,
An AI tool has generated code changes that require your review.
PR Details:
- Title: ${{ steps.cpr.outputs.pull-request-title }}
- Number: #${{ steps.cpr.outputs.pull-request-number }}
- Branch: ${{ steps.branch.outputs.branch }}
- Link: ${{ github.server_url }}/${{ github.repository }}/pull/${{ steps.cpr.outputs.pull-request-number }}
Please review the changes and merge if approved. When you merge, you will be automatically logged as the merger in the commit history.
---
GitHub Actions Workflow
- name: PR created successfully
run: |
echo "✅ Pull Request #${{ steps.cpr.outputs.pull-request-number }} created successfully"
echo "📧 Review email sent to: ${{ secrets.REVIEWER_EMAIL }}"
echo "🔗 PR Link: ${{ github.server_url }}/${{ github.repository }}/pull/${{ steps.cpr.outputs.pull-request-number }}"