Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 9 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,21 @@ permissions:
contents: read

env:
PNPM_VERSION: 10.2.1
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}

jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: pnpm/action-setup@v2
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}

version: ${{ vars.PNPM_VERSION }}
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm build

- name: Install browsers
run: cd packages/agent && pnpm exec playwright install --with-deps chromium

- name: Test
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: pnpm test

- name: Lint
run: pnpm lint
- run: pnpm install --frozen-lockfile
- run: pnpm build
- run: cd packages/agent && pnpm exec playwright install --with-deps chromium
- run: pnpm test
- run: pnpm lint
36 changes: 8 additions & 28 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,39 +22,19 @@ jobs:
id-token: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Google Auth
id: auth
uses: google-github-actions/auth@v2
- uses: actions/checkout@v4
- uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}

- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2

- name: Configure Docker for GCP
run: |
gcloud auth configure-docker $GAR_HOSTNAME --quiet
- name: Set image path
run: echo "IMAGE_PATH=$GAR_HOSTNAME/$PROJECT_ID/shared-docker-registry/$SERVICE_NAME:${{ github.sha }}" >> $GITHUB_ENV

- name: Build and push Docker container
run: |
cd packages/docs
docker build -t ${{ env.IMAGE_PATH }} .
- uses: google-github-actions/setup-gcloud@v2
- run: gcloud auth configure-docker $GAR_HOSTNAME --quiet
- run: echo "IMAGE_PATH=$GAR_HOSTNAME/$PROJECT_ID/shared-docker-registry/$SERVICE_NAME:${{ github.sha }}" >> $GITHUB_ENV
- run: |
docker build -t ${{ env.IMAGE_PATH }} -f ./packages/docs/Dockerfile .
docker push ${{ env.IMAGE_PATH }}
- name: Deploy to Cloud Run
id: deploy
uses: google-github-actions/deploy-cloudrun@v2
- uses: google-github-actions/deploy-cloudrun@v2
with:
service: ${{ env.SERVICE_NAME }}
region: ${{ env.REGION }}
image: ${{ env.IMAGE_PATH }}
flags: '--allow-unauthenticated'

- name: Show Output
run: echo ${{ steps.deploy.outputs.url }}
46 changes: 10 additions & 36 deletions .github/workflows/issue-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ permissions:
packages: read # Added in case you need to access GitHub packages

env:
PNPM_VERSION: 10.2.1
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}

jobs:
process-comment:
Expand All @@ -30,46 +30,20 @@ jobs:
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: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}

- name: Install dependencies
run: pnpm install

- name: Install browsers
run: cd packages/agent && pnpm exec playwright install --with-deps chromium

- name: Configure Git
run: |
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

# Auth GitHub CLI with the token
- name: Configure GitHub CLI
run: |
- run: pnpm install -g mycoder
- run: |
echo "${{ secrets.GH_PAT }}" | gh auth login --with-token
# Verify auth status
gh auth status

- env:
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 --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."
- 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."
50 changes: 12 additions & 38 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,57 +12,31 @@ permissions:
packages: write

env:
PNPM_VERSION: 10.2.1
NODE_VERSION: 23
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup pnpm
uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}

- name: Setup Node.js
uses: actions/setup-node@v4
version: ${{ vars.PNPM_VERSION }}
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm build

- name: Install browsers
run: cd packages/agent && pnpm exec playwright install --with-deps chromium

- name: Test
run: pnpm test

- name: Debug - Show recent commits
run: git log -n 10 --pretty=format:"%h %s" --date=short

- name: Debug - Run verify-release-config
run: pnpm verify-release-config

- name: Configure Git
run: |
node-version-file: .nvmrc
- run: pnpm install --frozen-lockfile
- run: pnpm build
- run: cd packages/agent && pnpm exec playwright install --with-deps chromium
- run: pnpm test
- run: pnpm verify-release-config
- run: |
git config --global user.email "[email protected]"
git config --global user.name "Ben Houston (via GitHub Actions)"

- name: Release
env:
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm release
3 changes: 2 additions & 1 deletion packages/docs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ RUN pnpm --filter mycoder-docs build
ENV PORT=8080
EXPOSE ${PORT}

CMD ["pnpm", "--filter", "mycoder-docs", "start"]
CMD ["pnpm", "--filter", "mycoder-docs", "start", "--port", "8080", "--no-open"]

2 changes: 1 addition & 1 deletion packages/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@mycoder/docs",
"name": "mycoder-docs",
"version": "0.10.1",
"private": true,
"packageManager": "[email protected]",
Expand Down
Loading