Skip to content

Add debug logging for version resolution#85

Merged
j178 merged 2 commits intomainfrom
feat/add-debug-logs
Mar 15, 2026
Merged

Add debug logging for version resolution#85
j178 merged 2 commits intomainfrom
feat/add-debug-logs

Conversation

@j178
Copy link
Copy Markdown
Owner

@j178 j178 commented Mar 15, 2026

Summary

  • add info logs around prek version resolution
  • log selected release assets, download paths, and checksum verification
  • log prek execution inputs and cache-dir resolution

Testing

  • npm test
  • npm run bundle

Copilot AI review requested due to automatic review settings March 15, 2026 13:54
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 930b662ea3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/main.ts
async function run(): Promise<void> {
const inputs = getInputs()
core.info(
`Resolved action inputs: prek-version="${inputs.prekVersion}", install-only=${inputs.installOnly}, working-directory="${inputs.workingDirectory}"`
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Sanitize user input before logging with core.info

run() now logs inputs.prekVersion and inputs.workingDirectory directly via core.info, which writes raw text to stdout; if a workflow passes untrusted or multiline values (for example from PR metadata), injected \n::...:: sequences can be interpreted by the runner as workflow commands instead of plain log text. This turns a debug log into a command-injection surface in CI contexts that propagate external input into action inputs.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds additional action logging around prek version resolution, installation/download steps, and cache-dir resolution to make runs easier to troubleshoot.

Changes:

  • Log chosen prek version and key action inputs (install-only, working directory).
  • Add logs for manifest version/asset resolution and install workflow (asset selection, download/extract paths, checksum verification).
  • Add logs for cache-dir discovery and fallback behavior.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/prek.ts Logs resolved prek cache directory and fallback path.
src/manifest.ts Adds @actions/core logging for version/asset resolution decisions.
src/main.ts Logs resolved inputs, selected prek version, and install-only short-circuit.
src/install.ts Logs selected release asset, download/extract/cache paths, and checksum verification.
dist/index.js Updates bundled output to include new logging (but currently appears out of sync with src/ in places).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/main.ts
Comment on lines +10 to +12
core.info(
`Resolved action inputs: prek-version="${inputs.prekVersion}", install-only=${inputs.installOnly}, working-directory="${inputs.workingDirectory}"`
)
@j178 j178 merged commit 1653a35 into main Mar 15, 2026
9 checks passed
@j178 j178 deleted the feat/add-debug-logs branch March 15, 2026 13:58
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