Skip to content
Closed
Changes from 2 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
9 changes: 4 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,11 @@ runs:
- name: Setup Auggie
run: npm install -g @augmentcode/auggie
shell: bash
- name: Setup Bun
uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2
with:
bun-version: latest
- name: Test list directory
run: ls
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critical Issue: The command npm run $GITHUB_ACTION_PATH/src/index.ts is incorrect and will fail.

npm run expects a script name defined in package.json, not a file path. For example, npm run dev or npm run test.

Current code:

run: npm run $GITHUB_ACTION_PATH/src/index.ts

The problem: There's no script in package.json that matches this path, and npm run doesn't accept file paths as arguments.

Suggested approach: You need to either:

  1. Use Node.js directly with a TypeScript runner:
run: node --import tsx $GITHUB_ACTION_PATH/src/index.ts

(Requires adding tsx as a dependency)

  1. Or use Node.js 22's experimental TypeScript support:
run: node --experimental-strip-types $GITHUB_ACTION_PATH/src/index.ts
  1. Or compile TypeScript first, then run the compiled JavaScript:
run: |
  cd $GITHUB_ACTION_PATH
  npm install
  npx tsc
  node dist/index.js

Note: Option 2 is the simplest since Node 22 is already being set up, but it's still experimental. Option 1 with tsx is more stable.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Issue: The action doesn't install dependencies before running the script.

The TypeScript code imports several npm packages (@actions/core, nunjucks, @octokit/rest, etc.) that need to be installed. Without running npm install first, these imports will fail.

Suggested improvement:

- name: Install dependencies
  run: |
    cd $GITHUB_ACTION_PATH
    npm install --production
  shell: bash
- name: Run Augment Agent
  run: node --experimental-strip-types $GITHUB_ACTION_PATH/src/index.ts
  shell: bash

The --production flag ensures only runtime dependencies are installed, not devDependencies.

shell: bash

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using npm run $GITHUB_ACTION_PATH/src/index.ts is unlikely to work because npm run expects a script name defined in a local package.json (not a file path), so this will likely fail with a missing script. Since the path points under $GITHUB_ACTION_PATH, there may be no matching script in the workflow’s working directory (also applies to other environments using this action).

🤖 React with 👍 or 👎 to let us know if the comment was useful.

- name: Run Augment Agent
run: bun run $GITHUB_ACTION_PATH/src/index.ts
run: npm run $GITHUB_ACTION_PATH/src/index.ts
shell: bash
env:
INPUT_AUGMENT_SESSION_AUTH: ${{ inputs.augment_session_auth }}
Expand Down
Loading