-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathaction.yml
More file actions
73 lines (69 loc) · 2.63 KB
/
action.yml
File metadata and controls
73 lines (69 loc) · 2.63 KB
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
68
69
70
71
72
73
name: "Augment Describe PR"
description: "AI-powered PR Descriptions"
author: "Augment Code"
branding:
icon: "zap"
color: "purple"
inputs:
augment_session_auth:
description: "Augment session authentication JSON containing accessToken and tenantURL. Store as repository secret for security."
required: true
github_token:
description: "GitHub token for API access. Must have 'repo' scope."
required: true
pull_number:
description: "The number of the pull request being described"
required: true
repo_name:
description: "The full name (owner/repo) of the repository"
required: true
custom_guidelines:
description: "Optional custom guidelines to include in PR description generation. Provide additional instructions or requirements specific to your project."
required: false
model:
description: "Optional model to use for generation. Passed directly to augment-agent."
required: false
rules:
description: "Optional JSON array of rules file paths forwarded to augment-agent."
required: false
mcp_configs:
description: "Optional JSON array of MCP config file paths forwarded to augment-agent."
required: false
fetch_depth:
description: "Optional fetch depth for git checkout. Default is 0 (full history). Set to a positive number for shallow clones."
required: false
default: "0"
runs:
using: "composite"
steps:
- name: Checkout PR Head
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
with:
token: ${{ inputs.github_token }}
ref: refs/pull/${{ inputs.pull_number }}/head
fetch-depth: ${{ inputs.fetch_depth }}
- name: Prepare Custom Context
id: custom_context
shell: bash
run: |
if [ -n "$CUSTOM_GUIDELINES" ]; then
echo 'context<<EOF' >> $GITHUB_OUTPUT
echo "$(jq -n --arg guidelines "$CUSTOM_GUIDELINES" '{custom_guidelines: $guidelines}')" >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
else
echo "context={}" >> $GITHUB_OUTPUT
fi
env:
CUSTOM_GUIDELINES: ${{ inputs.custom_guidelines }}
- name: Run Augment Agent
uses: augmentcode/augment-agent@v0
with:
augment_session_auth: ${{ inputs.augment_session_auth }}
github_token: ${{ inputs.github_token }}
template_directory: "${{ github.action_path }}/templates"
pull_number: ${{ inputs.pull_number }}
repo_name: ${{ inputs.repo_name }}
custom_context: ${{ steps.custom_context.outputs.context }}
model: ${{ inputs.model }}
rules: ${{ inputs.rules }}
mcp_configs: ${{ inputs.mcp_configs }}