Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 21, 2026

JavaScript module requires were failing with Cannot find module '/tmp/gh-aw/scripts/update_activation_comment.cjs' because ScriptsBasePath constant pointed to /opt/gh-aw/scripts while the setup action copies files to /opt/gh-aw/actions.

Changes

  • Updated ScriptsBasePath constant to /opt/gh-aw/actions to match SetupActionDestination
  • Updated test expectations to reflect correct path
// Before
const ScriptsBasePath = "/opt/gh-aw/scripts"

// After
const ScriptsBasePath = "/opt/gh-aw/actions"  // Must match SetupActionDestination

This ensures file mode workflows correctly resolve require statements at runtime.

Original prompt

Reference: https://github.com/githubnext/gh-aw/actions/runs/21197768976/job/60977520596#step:4:1

Fix Create pull request issue


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 21, 2026 05:13
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Update ScriptsBasePath constant from /opt/gh-aw/scripts to /opt/gh-aw/actions
- This matches where the setup action actually copies files
- Update all test expectations to use the correct path
- All tests passing

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan pelikhan marked this pull request as ready for review January 21, 2026 05:24
Copilot AI changed the title [WIP] Fix create pull request issue Fix module resolution path mismatch in file mode bundler Jan 21, 2026
Copilot AI requested a review from pelikhan January 21, 2026 05:25
@pelikhan pelikhan merged commit 7472cc5 into main Jan 21, 2026
150 checks passed
@pelikhan pelikhan deleted the copilot/fix-create-pull-request-issue branch January 21, 2026 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants