Skip to content

Local config settings do not seem to work properly (where are they saving to? Can not clear their values individually) #22

Local config settings do not seem to work properly (where are they saving to? Can not clear their values individually)

Local config settings do not seem to work properly (where are they saving to? Can not clear their values individually) #22

Workflow file for this run

name: MyCoder Issue Comment Action
on:
issue_comment:
types: [created]
# Top-level permissions apply to all jobs - this is the maximum allowed for GITHUB_TOKEN
permissions:
contents: write # Required for checkout, commit, push
issues: write # Required for issue comments
pull-requests: write # Required for creating PRs
discussions: write # Added for more interaction capabilities
statuses: write # Added for creating commit statuses
checks: write # Added for creating check runs
actions: read # Added for inspecting workflow runs
packages: read # Added in case you need to access GitHub packages
env:
PNPM_VERSION: 10.2.1
jobs:
process-comment:
runs-on: ubuntu-latest
# Only run if comment contains '/mycoder' AND commenter is in AUTHORIZED_USERS list
if: |
contains(github.event.comment.body, '/mycoder') &&
github.event.comment.user.login == 'bhouston'
steps:
- name: Extract prompt from comment
id: extract-prompt
run: |
echo "comment_url=${{ github.event.comment.html_url }}" >> $GITHUB_OUTPUT
echo "comment_id=${{ github.event.comment.id }}" >> $GITHUB_OUTPUT
- name: Checkout repository
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Configure Git
run: |
git config --global user.name "Ben Houston (via MyCoder)"
git config --global user.email "[email protected]"
- run:
pnpm install -g mycoder
# Auth GitHub CLI with the token
- name: Configure GitHub CLI
run: |
# First try with GITHUB_TOKEN
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
# Verify auth status
gh auth status
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: |
echo "Running MyCoder for issue #${{ github.event.issue.number }} with prompt: ${{ steps.extract-prompt.outputs.prompt }}"
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."