Skip to content

Commit cc192c5

Browse files
committed
Merge branch 'main' into feature/167-shell-tools-stdin-stdout-visibility
2 parents aed1b9f + c3750e8 commit cc192c5

File tree

5 files changed

+44
-20
lines changed

5 files changed

+44
-20
lines changed

.github/workflows/issue-comment.yml

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,31 @@ on:
44
issue_comment:
55
types: [created]
66

7+
# Top-level permissions apply to all jobs - this is the maximum allowed for GITHUB_TOKEN
78
permissions:
8-
contents: write
9-
issues: write
10-
pull-requests: write
9+
contents: write # Required for checkout, commit, push
10+
issues: write # Required for issue comments
11+
pull-requests: write # Required for creating PRs
12+
discussions: write # Added for more interaction capabilities
13+
statuses: write # Added for creating commit statuses
14+
checks: write # Added for creating check runs
15+
actions: read # Added for inspecting workflow runs
16+
packages: read # Added in case you need to access GitHub packages
1117

1218
env:
1319
PNPM_VERSION: 10.2.1
1420

1521
jobs:
1622
process-comment:
1723
runs-on: ubuntu-latest
18-
if: contains(github.event.comment.body, '/mycoder')
24+
# Only run if comment contains '/mycoder' AND commenter is in AUTHORIZED_USERS list
25+
if: |
26+
contains(github.event.comment.body, '/mycoder') &&
27+
github.event.comment.user.login == 'bhouston'
1928
steps:
2029
- name: Extract prompt from comment
2130
id: extract-prompt
2231
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
3432
echo "comment_url=${{ github.event.comment.html_url }}" >> $GITHUB_OUTPUT
3533
echo "comment_id=${{ github.event.comment.id }}" >> $GITHUB_OUTPUT
3634
@@ -45,11 +43,25 @@ jobs:
4543
with:
4644
node-version-file: .nvmrc
4745

48-
- run: pnpm install -g mycoder
46+
- name: Configure Git
47+
run: |
48+
git config --global user.name "MyCoder (On behalf of ${{ github.event.comment.user.login }})"
49+
git config --global user.email "[email protected]"
50+
51+
- run:
52+
pnpm install -g mycoder
53+
54+
# Auth GitHub CLI with the token
55+
- name: Configure GitHub CLI
56+
run: |
57+
# First try with GITHUB_TOKEN
58+
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
59+
# Verify auth status
60+
gh auth status
4961
5062
- env:
5163
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5264
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
5365
run: |
5466
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."
67+
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."

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# [0.9.0](https://github.com/drivecore/mycoder/compare/v0.8.0...v0.9.0) (2025-03-11)
2+
3+
4+
### Bug Fixes
5+
6+
* don't save consent when using --userWarning=false ([41cf69d](https://github.com/drivecore/mycoder/commit/41cf69dee22acc31cd0f2aa9f80e36cd867fb20b))
7+
8+
9+
### Features
10+
11+
* add CLI options for automated usage scenarios ([00419bc](https://github.com/drivecore/mycoder/commit/00419bc3e060db6d0c18fc72e2d7b6957791c875))
12+
113
# [0.8.0](https://github.com/drivecore/mycoder/compare/v0.7.0...v0.8.0) (2025-03-11)
214

315
### Features

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mycoder-monorepo",
3-
"version": "0.8.0",
3+
"version": "0.9.0",
44
"type": "module",
55
"private": true,
66
"packageManager": "[email protected]",

packages/agent/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mycoder-agent",
3-
"version": "0.8.0",
3+
"version": "0.9.0",
44
"description": "Agent module for mycoder - an AI-powered software development assistant",
55
"type": "module",
66
"main": "dist/index.js",

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "mycoder",
33
"description": "A command line tool using agent that can do arbitrary tasks, including coding tasks",
4-
"version": "0.8.0",
4+
"version": "0.9.0",
55
"type": "module",
66
"bin": "./bin/cli.js",
77
"main": "./dist/index.js",

0 commit comments

Comments
 (0)