Skip to content

Fix pre/post entrypoint resolution relative to the action directory - #348

Open
vzubcu wants to merge 1 commit into
github:mainfrom
vzubcu:fix/lifecycle-entrypoint-resolution
Open

vzubcu wants to merge 1 commit into
github:mainfrom
vzubcu:fix/lifecycle-entrypoint-resolution

Conversation

@vzubcu

@vzubcu vzubcu commented Nov 30, 2026 •

Copy link
Copy Markdown

Summary

  • Resolve --pre and --post entrypoints after positional arguments have been parsed using Commander's preAction hook.
  • Preserve absolute path support and CLI validation errors.
  • Add regression coverage without manually initializing EnvMeta.actionPath.
  • Cover parent-relative paths, absolute paths, missing entrypoints, and omitted lifecycle options.
  • Bump the package version to 7.0.2 in accordance with the contribution guidelines.

Refs #271.

Validation

  • 11 isolated parser checks passed using Node.js 22 and Commander 13.1.0.
  • Regression tests added.
  • Full repository validation against Commander 14.0.3 is pending CI.

This PR focuses on lifecycle entrypoint resolution. The separate dependency-stubbing behavior reported in #271 is outside its scope.

@vzubcu
vzubcu requested a review from ncalteen as a code owner November 30, 2026 08:28
Copilot AI adaptive review requested due to automatic review settings November 30, 2026 08:28
@vzubcu vzubcu changed the title Fix lifecycle entrypoint resolution relative to action directory Fix pre/post entrypoint resolution relative to the action directory Nov 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are blocking approval.

No open issues 🎉

What changed in this PR

Fixes lifecycle entrypoint resolution in the local action runner by waiting until the action directory is initialized before resolving --pre and --post.

Changes:

  • Moves lifecycle entrypoint validation into a preAction hook while retaining invalid-argument errors.
  • Strengthens tests for resolved paths, optional lifecycle entrypoints, and missing files.
  • Bumps the package version to 7.0.2, with no dependency changes.
File Description
src/​command.ts Defers lifecycle path resolution until positional arguments are processed.
package.json Bumps the patch version to 7.0.2.
package-lock.json Synchronizes root package version metadata.
__tests__/​command.test.ts Removes manual action-path initialization and expands lifecycle regression coverage.

Review effort: Balanced (adaptive)

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