Enhancement/upload multiple files#393
Open
Dashing-Nelson wants to merge 4 commits intogoogle-github-actions:mainfrom
Open
Enhancement/upload multiple files#393Dashing-Nelson wants to merge 4 commits intogoogle-github-actions:mainfrom
Dashing-Nelson wants to merge 4 commits intogoogle-github-actions:mainfrom
Conversation
- Updated the `run` function in `main.ts` to use `processMultiplePaths` for handling the 'path' input, allowing multiple paths separated by newlines. - Removed the previous logic for computing absolute root and glob expansion, replacing it with the new function. - Adjusted file processing to use the given root from the new function. - Introduced `processMultiplePaths` in `util.ts` to manage multiple paths, compute absolute roots, and expand globs for each path. - Ensured that the final list of files is unique and relative to the GitHub workspace.
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Author
|
resolves #386 |
Signed-off-by: Nelson Alfonso <45660392+Dashing-Nelson@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for uploading multiple specific files to Google Cloud Storage by allowing paths to be specified using newline-separated values or YAML pipe syntax. It also includes updates to the documentation, refactoring of the codebase to handle multiple paths, and new tests to ensure functionality.
Feature Addition: Support for Multiple File Uploads
src/util.ts: Added theprocessMultiplePathsfunction to handle multiple paths specified in thepathinput, allowing users to upload multiple specific files by separating paths with newlines. This includes logic for handling single paths and deduplicating files.src/main.ts: Refactored therunfunction to useprocessMultiplePathsfor processing multiple paths and updating related variables such asfiles,absoluteRoot, andgivenRoot. [1] [2] [3] [4] [5]Documentation Updates
README.md: Added a new section, "Upload Multiple Files," with examples demonstrating how to use newline-separated values or YAML pipe syntax to specify multiple paths for file uploads.action.yml: Updated the description of thepathinput to clarify that multiple paths can be specified using newlines, with examples provided. [1] [2]Testing Enhancements
tests/multiple-paths.test.ts: Added comprehensive tests for the new functionality, including scenarios for uploading multiple files, handling empty lines, and verifying single-path behavior. Mocking and assertions ensure correctness.