Skip to content

Feasibility Analysis: Refactoring MyCoder from TypeScript to Clojure/Babashka #27

Feasibility Analysis: Refactoring MyCoder from TypeScript to Clojure/Babashka

Feasibility Analysis: Refactoring MyCoder from TypeScript to Clojure/Babashka #27

name: MyCoder Comment Action
# This workflow is triggered on all issue comments, but only runs the job
# if the comment contains '/mycoder' and is from the authorized user.
# Note: The workflow will appear in GitHub Actions logs for all comments,
# but it will exit early (skip the job) if the conditions aren't met.
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:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
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:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- uses: pnpm/action-setup@v4
with:
version: ${{ vars.PNPM_VERSION }}
- run: pnpm install
- run: cd packages/agent && pnpm exec playwright install --with-deps chromium
- run: |
git config --global user.name "Ben Houston (via MyCoder)"
git config --global user.email "[email protected]"
- run: pnpm install -g mycoder
- run: |
echo "${{ secrets.GH_PAT }}" | gh auth login --with-token
gh auth status
- run: mycoder --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."