Add `proxy_binary` input to `start-proxy` action by mbg · Pull Request #2871 · github/codeql-action

Pull Request Overview

This PR introduces a new optional input ("proxy_binary") to the "start-proxy" action so that a custom proxy binary can be specified for testing purposes. Key changes include:

  • Adding the "proxy_binary" input definition in start-proxy/action.yml.
  • Updating both TypeScript and JavaScript implementations to accept the optional "proxy_binary" input.
  • Wrapping process.kill calls in post-action scripts with try-catch blocks for improved error handling.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
start-proxy/action.yml Added the new optional "proxy_binary" input.
src/start-proxy-action.ts Updated proxy binary determination to use the optional input if set.
src/start-proxy-action-post.ts Added try-catch block around process.kill for better error logging.
lib/start-proxy-action.js Updated proxy binary determination to use the optional input if set.
lib/start-proxy-action-post.js Enhanced process.kill error handling with a try-catch block.
Comments suppressed due to low confidence (2)

src/start-proxy-action.ts:121

  • Consider checking that the value returned by getOptionalInput("proxy_binary") is non-empty before defaulting to getProxyBinaryPath, as some implementations might return an empty string when no input is provided.
const proxyBin = actionsUtil.getOptionalInput("proxy_binary") ?? (await getProxyBinaryPath());

lib/start-proxy-action.js:115

  • Consider verifying that the result from actionsUtil.getOptionalInput("proxy_binary") is a non-empty string before falling back to getProxyBinaryPath to ensure reliable selection of the proxy binary.
const proxyBin = actionsUtil.getOptionalInput("proxy_binary") ?? (await getProxyBinaryPath());