-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yml
67 lines (65 loc) · 2.49 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: pr-auto
description: Automatically generate PR descriptions using LLMs
author: Vladimir Blagojevic
branding:
icon: edit-2
color: blue
inputs:
openai_api_key:
description: OpenAI API key
required: true
openai_base_url:
description: OpenAI Base URL
required: false
default: https://api.openai.com/v1
github_token:
description: GITHUB_TOKEN or a repo scoped PAT
default: ${{ github.token }}
github_repository:
description: GitHub repository
default: ${{ github.repository }}
base_branch:
description: Base (target) branch
default: ${{ github.event.pull_request.base.ref }}
head_branch:
description: Head (source) branch
default: ${{ github.event.pull_request.head.ref }}
generation_model:
description: LLM to use for PR text generation
default: gpt-4o
function_calling_model:
description: LLM to use for function calling (service parameter resolution, output formatting)
default: gpt-3.5-turbo
system_prompt:
description: System message/prompt to help the model generate PR description (prompt text or URL where prompt text can be found)
default: https://bit.ly/pr_auto_system_prompt_v1
required: false
user_prompt:
description: Additional prompt to help the model generate PR description
required: false
bot_name:
description: The name of the bot so users can guide PR description generation with @bot_name from PR comments
default: pr-auto-bot
outputs:
pr-text:
description: PR description text
runs:
using: 'docker'
image: 'docker://vblagoje/openapi-rag-service:latest'
env:
OPENAI_API_KEY: ${{ inputs.openai_api_key }}
OPENAI_BASE_URL: ${{ inputs.openai_base_url }}
GITHUB_REPOSITORY: ${{ inputs.github_repository }}
BASE_REF: ${{ inputs.base_branch }}
HEAD_REF: ${{ inputs.head_branch }}
TEXT_GENERATION_MODEL: ${{ inputs.generation_model }}
FUNCTION_CALLING_MODEL: ${{ inputs.function_calling_model }}
SYSTEM_PROMPT: ${{ inputs.system_prompt }}
USER_PROMPT: ${{ inputs.user_prompt }}
FUNCTION_CALLING_PROMPT: Compare branches ${{ inputs.base_branch }} (BASE) and ${{ inputs.head_branch }} (HEAD), in GitHub repository ${{ inputs.github_repository }} (owner/repo)
FUNCTION_CALLING_VALIDATION_SCHEMA: https://bit.ly/github_compare_branches_full_schema
BOT_NAME: ${{ inputs.bot_name }}
OPENAPI_SERVICE_SPEC: https://bit.ly/github_compare
OPENAPI_SERVICE_TOKEN: ${{ inputs.github_token }}
SERVICE_RESPONSE_SUBTREE: files
OUTPUT_KEY: pr-text