diff --git a/.github/workflows/prd.yml b/.github/workflows/prd.yml index 4db199c0d..afee5a7f1 100644 --- a/.github/workflows/prd.yml +++ b/.github/workflows/prd.yml @@ -1,25 +1,19 @@ -name: genai pull request description +name: GenAI Pull Request Descriptor on: - pull_request: - types: [ready_for_review, review_requested, openend] -concurrency: - group: genai-pr-review-${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + pull_request: + types: [opened, reopened, ready_for_review] permissions: - contents: read # permission to read the repository - pull-requests: write # permission to write a comment - models: read # permission to use github models + contents: read + pull-requests: write + models: read +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: - describe: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: "22" - - name: fetch base branch - run: git fetch origin ${{ github.event.pull_request.base.ref }} - - name: genaiscript prd - run: npx --yes genaiscript run prd --vars base=origin/${{ github.event.pull_request.base.ref }} --pull-request-description --out-trace $GITHUB_STEP_SUMMARY - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + generate-pull-request-description: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: pelikhan/action-genai-pull-request-descriptor@v0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }}