Generate a pull request description based on the changes in the codebase
base: The base branch of the pull requestgitmojis: Whether to use gitmojis in the pull request description (default:true)instructions: Instructions for the code reviewerexcluded: Excluded paths from diffdebug: Enable debug logging (https://microsoft.github.io/genaiscript/reference/scripts/logging/).github_issue: GitHub pull request number to use when generating comments (https://microsoft.github.io/genaiscript/reference/scripts/github/) (${{ github.event.pull_request.number }})openai_api_key: OpenAI API key,${{ secrets.OPENAI_API_KEY }}openai_api_base: OpenAI API base URL,${{ env.OPENAI_API_BASE }}azure_openai_api_endpoint: Azure OpenAI endpoint. In the Azure Portal, open your Azure OpenAI resource, Keys and Endpoints, copy Endpoint.,${{ env.AZURE_OPENAI_API_ENDPOINT }}azure_openai_api_key: Azure OpenAI API key. **You do NOT need this if you are using Microsoft Entra ID.,${{ secrets.AZURE_OPENAI_API_KEY }}azure_openai_subscription_id: Azure OpenAI subscription ID to list available deployments (Microsoft Entra only).,${{ env.AZURE_OPENAI_SUBSCRIPTION_ID }}azure_openai_api_version: Azure OpenAI API version.,${{ env.AZURE_OPENAI_API_VERSION }}azure_openai_api_credentials: Azure OpenAI API credentials type. Leave as 'default' unless you have a special Azure setup.,${{ env.AZURE_OPENAI_API_CREDENTIALS }}github_token: GitHub token withmodels: readpermission at least (https://microsoft.github.io/genaiscript/reference/github-actions/#github-models-permissions).,${{ secrets.GITHUB_TOKEN }}
text: The generated text output.
Add the following to your step in your workflow file:
uses: pelikhan/action-genai-pull-request-descriptor@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}Save this file in your .github/workflows/ directory as pull-request-descriptor.yml:
name: Action-Genai-Pull-Request-Descriptor
on:
pull_request:
permissions:
contents: read
# issues: write
pull-requests: write
models: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
action_genai_pull_request_descriptor:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: .genaiscript/cache/**
key: genaiscript-${{ github.run_id }}
restore-keys: |
genaiscript-
- uses: pelikhan/action-genai-pull-request-descriptor@v0 # update to the major version you want to use
with:
github_token: ${{ secrets.GITHUB_TOKEN }}This action was automatically generated by GenAIScript from the script metadata. We recommend updating the script metadata instead of editing the action files directly.
- the action inputs are inferred from the script parameters
- the action outputs are inferred from the script output schema
- the action description is the script description
- the readme description is the script description
- the action branding is the script branding
To regenerate the action files (action.yml), run:
npm run configureTo lint script files, run:
npm run lintTo typecheck the scripts, run:
npm run typecheckTo build the Docker image locally, run:
npm run docker:buildTo run the action locally in Docker (build it first), use:
npm run docker:startThe GenAIScript version is pinned in the package.json file. To upgrade it, run:
npm run upgradeTo release a new version of this action, run the release script on a clean working directory.
npm run release