diff --git a/.github/workflows/AIPR.yml b/.github/workflows/AIPR.yml index 8b1378917..2516b9c6a 100644 --- a/.github/workflows/AIPR.yml +++ b/.github/workflows/AIPR.yml @@ -1 +1,25 @@ +on: + issues: + types: [labeled] + issue_comment: + types: [created] +permissions: + contents: write + issues: write + pull-requests: write + +jobs: + Creating-PR-using-AIPR: + if: ${{ (github.event_name == 'issues' && + contains( github.event.label.name, 'AIPR')) || + (github.event_name == 'issue_comment' && + github.event.issue.pull_request && + contains( github.event.comment.body, 'Create PR with AIPR 🚀')) }} + runs-on: ubuntu-latest + steps: + - name: Executing AIPR action + uses: alexanmtz/AIPR@main + with: + openai_api_key: ${{ secrets.OPENAI_API_KEY }} + openai_tokens: 2000