Skip to content

Commit b32b0cd

Browse files
RD-1354: Update pr workflow (#166)
1 parent e4d747e commit b32b0cd

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

.github/workflows/autopr.yml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,7 @@ jobs:
6868
echo "/opt/homebrew/Cellar/swiftlint" >> "$GITHUB_PATH" || true
6969
echo "/usr/local/Cellar/swiftlint" >> "$GITHUB_PATH" || true
7070
71-
# Set up LLM Agent
72-
73-
- name: Install Agent (Homebrew)
74-
run: brew install codex
71+
# Set up LLM Agent (via GitHub Action)
7572

7673
# Set up environment variables
7774

@@ -103,23 +100,23 @@ jobs:
103100
working-directory: js
104101
run: npm run doc
105102

106-
# Run the LLM Agent and commit the output
103+
# Run the LLM Agent and then commit the output
107104

108-
- name: Agent implement & commit
105+
- name: Run Codex Action
106+
uses: openai/codex-action@v1
109107
env:
110108
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
111109
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
112110
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
113-
CODEX_QUIET_MODE: "1" # suppress chatty logs
111+
with:
112+
openai_api_key: ${{ secrets.OPENAI_API_KEY }}
113+
prompt: |
114+
Implement ticket ${{ env.ISSUE_KEY }}: ${{ env.TITLE }}. ${{ env.DESC }}
115+
116+
- name: Commit changes
114117
run: |
115-
export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"
116-
which swiftlint || true
117-
swiftlint --version || true
118-
export OPENAI_API_KEY="${{ secrets.OPENAI_API_KEY }}"
119-
export GITHUB_TOKEN="${{ secrets.GITHUB_TOKEN }}"
120-
codex exec --full-auto -c preferred_auth_method='"apikey"' "Implement ticket $ISSUE_KEY: $TITLE. $DESC"
121118
git add -A
122-
git commit -m "$ISSUE_KEY: $TITLE"
119+
git commit -m "$ISSUE_KEY: $TITLE" || echo "No changes to commit"
123120
124121
# Prepare and push Pull Request
125122

0 commit comments

Comments
 (0)