Adds 'flow set' command. Closes #6975 - #7466
Open
mkm17 wants to merge 1 commit into
Open
Conversation
Contributor
|
Thanks, will review it soon! |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Error handling for the pre-update check endpoints and a couple of doc statements about prompting/--force behavior should be aligned with existing command patterns and the actual implementation.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR introduces a new Power Automate command (m365 flow set) to update an existing flow’s definition, with optional publishing and pre-update validation against Flow warning/error checks.
Changes:
- Added
flow setcommand implementation with optional--publishand--forcebehavior. - Added comprehensive unit tests covering validation, update/publish behavior, and warning/error handling.
- Added documentation + sidebar entry for the new command.
File summaries
| File | Description |
|---|---|
| src/m365/flow/commands/flow-set.ts | Implements the new m365 flow set command, including checks for warnings/errors and optional publishing. |
| src/m365/flow/commands/flow-set.spec.ts | Adds unit tests for schema validation, update/publish flows, and warning/error scenarios. |
| src/m365/flow/commands.ts | Registers the flow set command name. |
| docs/src/config/sidebars.ts | Adds the flow set reference page to the Flow command sidebar. |
| docs/docs/cmd/flow/flow-set.mdx | Adds the command reference documentation (usage, options, remarks, permissions, examples). |
Review details
Suppressed comments (1)
docs/docs/cmd/flow/flow-set.mdx:38
- This remark suggests you’ll be prompted when errors are found, but the command throws on errors and only prompts when warnings are found.
When updating a flow, the CLI checks the flow definition for errors and warnings. If any are found, you will be prompted to confirm whether you want to proceed with the update. Use the `--force` flag to skip this prompt and update without checking.
- Files reviewed: 5/5 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+123
to
+126
| const [errors, warnings] = await Promise.all([ | ||
| request.post<FlowCheckResult[]>(errorsRequestOptions), | ||
| request.post<FlowCheckResult[]>(warningsRequestOptions) | ||
| ]); |
Comment on lines
+30
to
+31
| `-f, --force` | ||
| : Don't prompt for confirmation when warnings or errors occur |
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.
Adds 'flow set' command. Closes #6975