Skip to content

Conversation

@cabljac
Copy link
Collaborator

@cabljac cabljac commented May 19, 2025

fixes #106

Copy link

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

Adds a new includePath configuration to filter which storage objects trigger transcription, skipping files whose paths don’t start with the specified prefix.

  • Introduce includePath in config and extension parameters
  • Add runtime check in transcribeAudio to skip non-matching paths and a corresponding logs.pathNotMatching helper
  • Update tests, changelog, and bump extension version to cover the new behavior

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
speech-to-text/functions/src/logs.ts Added pathNotMatching log helper
speech-to-text/functions/src/index.ts Inserted include-path check in the trigger handler
speech-to-text/functions/src/config.ts Exposed INCLUDE_PATH env var as config.includePath
speech-to-text/functions/tests/path-filter.test.ts Added tests for include-path filtering behavior
speech-to-text/extension.yaml Added INCLUDE_PATH parameter and bumped version to 0.1.7
speech-to-text/CHANGELOG.md Documented version 0.1.7 and feature addition
Comments suppressed due to low confidence (1)

speech-to-text/functions/src/logs.ts:61

  • [nitpick] Consider renaming 'pathNotMatching' to something like 'skipDueToIncludePath' or 'logPathSkip' to more clearly convey its purpose and match other log helper names.
export const pathNotMatching = (filePath: string, includePath: string) => {

/** Check if the file path matches the include path */
if (config.includePath && !object.name.startsWith(config.includePath)) {
// We don't want to log this, as it's a common occurence
// logs.pathNotMatching(object.name, config.includePath);
Copy link

Copilot AI May 19, 2025

Choose a reason for hiding this comment

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

[nitpick] Commented-out code can be removed or replaced with a debug-level log to avoid clutter and improve readability.

Copilot uses AI. Check for mistakes.
@cabljac cabljac force-pushed the @invertase/stt-include-path branch from 26a893f to 0a2368e Compare June 3, 2025 14:39
@cabljac cabljac marked this pull request as ready for review July 2, 2025 09:57
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.

[speech-to-text] consider allowing only certain file prefixes to be used as a configurable parameter

1 participant