diff --git a/Example01.png b/Example01.png new file mode 100644 index 0000000..2ba680c Binary files /dev/null and b/Example01.png differ diff --git a/README.md b/README.md index d4ed2c6..4ac9c68 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # Summarize Pull Request -A simple GitHub action that can create a brief information about commits in a pull request(PR). So, within brief, initial description of commit changes helps reviewing the PR +A simple GitHub action that can create a brief information about commits in a pull request(PR). So, within brief, initial description of commit changes helps reviewing the PR. + +![Image](/Example01.png) ## How @@ -9,9 +11,36 @@ With Microsoft.Extensions.AI, action provides access to use LLMs such as GPT-4-0 - Azure AI Model Catalog - https://ai.azure.com/explore/models - GitHub Models - https://github.com/marketplace/models -### Requierments +```yaml +name: Summarize PR + +on: + pull_request: + branches: [ "main" ] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Summarize PR Action + uses: ardacetinkaya/pull-request-action/@v1.0.0 + env: + PAT: ${{ secrets.ACTION_TOKEN }} + APIKey: ${{ secrets.AI_API_KEY }} + ModelId: gpt-4o + RepositoryName: ${{github.event.repository.name}} + RepositoryAccount: ${{github.repository_owner}} + CommitSHA: ${{ github.event.pull_request.head.sha }} + PullRequestId: ${{github.event.number}} + +``` + +### Requirements 1. Create an GitHub Access Token to be able to use GitHub Apis + - Read and write to pull request is required 2. Create required access key for LLM models +3. Create secrets for the above access assets in the GitHub repo. + ## Why