-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathaction.yml
More file actions
84 lines (72 loc) · 2.76 KB
/
action.yml
File metadata and controls
84 lines (72 loc) · 2.76 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
74
75
76
77
78
79
80
81
82
83
84
name: 'Qoder Action'
description: 'Integrate Qoder AI into your GitHub Actions workflow. Automate code reviews, refactoring, and development tasks with an intelligent agent.'
author: 'Qoder AI'
branding:
icon: 'code'
color: 'green'
inputs:
prompt:
description: 'Instructions for qodercli (passed to -p flag)'
required: true
flags:
description: |
Additional CLI arguments to pass to qodercli.
Multiple lines are supported.
required: false
default: ''
qoder_personal_access_token:
description: 'Your Qoder Personal Access Token. Must be stored as a GitHub Secret (e.g., secrets.QODER_PERSONAL_ACCESS_TOKEN).'
required: true
qodercli_version:
description: 'Specific version of qodercli to install. The default version is tested and optimized for this action. Changing it is not recommended and may lead to unexpected behavior.'
required: false
default: '0.1.18'
enable_qoder_github_mcp:
description: 'Enable the qoder-github MCP Server for enhanced GitHub operations. This is required for built-in resources and advanced tool capabilities.'
required: false
default: 'true'
outputs:
output_file:
description: 'Path to the file containing qodercli stdout output (formatted as stream-json).'
value: ${{ steps.run_cli.outputs.output_file }}
error:
description: 'Error message from qodercli if the execution failed.'
value: ${{ steps.run_cli.outputs.error }}
runs:
using: 'composite'
steps:
- name: Install qodercli
shell: bash
env:
QODERCLI_VERSION: ${{ inputs.qodercli_version }}
run: |
echo "::group::Installing qodercli"
echo "Installing qodercli version ${QODERCLI_VERSION} via npm..."
npm install -g @qoder-ai/qodercli@${QODERCLI_VERSION}
echo "::endgroup::"
echo "✓ qodercli installed successfully"
echo "Installed version: $(qodercli --version)"
- name: Configure Git Authentication
id: auth
shell: bash
env:
QODER_PERSONAL_ACCESS_TOKEN: ${{ inputs.qoder_personal_access_token }}
run: |
bash "${GITHUB_ACTION_PATH}/scripts/configure-qoder-auth.sh"
- name: Setup qoder-github MCP Server
if: inputs.enable_qoder_github_mcp == 'true'
shell: bash
env:
GITHUB_TOKEN: ${{ steps.auth.outputs.github_token }}
run: |
bash "${GITHUB_ACTION_PATH}/scripts/setup-qoder-github-mcp.sh"
- name: Run qodercli
id: run_cli
shell: bash
env:
QODER_PERSONAL_ACCESS_TOKEN: ${{ inputs.qoder_personal_access_token }}
GITHUB_TOKEN: ${{ steps.auth.outputs.github_token }}
INPUT_PROMPT: ${{ inputs.prompt }}
INPUT_FLAGS: ${{ inputs.flags }}
run: |
bash "${GITHUB_ACTION_PATH}/scripts/run-qodercli.sh"