Skip to content

Commit d0a4a2e

Browse files
committed
adopt new CLI options in github action. Be more generic in your responses.
1 parent 0c5561c commit d0a4a2e

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

.github/workflows/issue-comment.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,6 @@ jobs:
2020
- name: Extract prompt from comment
2121
id: extract-prompt
2222
run: |
23-
COMMENT="${{ github.event.comment.body }}"
24-
if [[ "$COMMENT" =~ "/mycoder "(.+) ]]; then
25-
PROMPT="${BASH_REMATCH[1]}"
26-
elif [[ "$COMMENT" =~ "/mycoder" ]]; then
27-
# If just /mycoder with no text after, use a default prompt
28-
PROMPT="Please review this issue and suggest next steps."
29-
else
30-
echo "No valid /mycoder command found"
31-
exit 1
32-
fi
33-
echo "prompt=$PROMPT" >> $GITHUB_OUTPUT
3423
echo "comment_url=${{ github.event.comment.html_url }}" >> $GITHUB_OUTPUT
3524
echo "comment_id=${{ github.event.comment.id }}" >> $GITHUB_OUTPUT
3625
@@ -52,4 +41,4 @@ jobs:
5241
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
5342
run: |
5443
echo "Running MyCoder for issue #${{ github.event.issue.number }} with prompt: ${{ steps.extract-prompt.outputs.prompt }}"
55-
mycoder --githubMode true --userPrompt false "On issue #${{ github.event.issue.number }} the user asked: '${{ steps.extract-prompt.outputs.prompt }}' in comment ${{ steps.extract-prompt.outputs.comment_url }}. Please address this request. If you create a PR or take actions outside the scope of this issue, please report back to the issue with a comment explaining what you did."
44+
mycoder --userWarning false --upgradeCheck false --githubMode true --userPrompt false "On issue #${{ github.event.issue.number }} in comment ${{ steps.extract-prompt.outputs.comment_url }} the user invoked the mycoder CLI via /mycoder. Can you try to do what they requested or if it is unclear, respond with a comment to that affect to encourage them to be more clear."

0 commit comments

Comments
 (0)