Skip to content

Adds 'flow set' command. Closes #6975 - #7466

Open
mkm17 wants to merge 1 commit into
pnp:mainfrom
mkm17:issues/6975_flow_set
Open

Adds 'flow set' command. Closes #6975#7466
mkm17 wants to merge 1 commit into
pnp:mainfrom
mkm17:issues/6975_flow_set

Conversation

@mkm17

@mkm17 mkm17 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Adds 'flow set' command. Closes #6975

@milanholemans

Copy link
Copy Markdown
Contributor

Thanks, will review it soon!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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 set command implementation with optional --publish and --force behavior.
  • 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
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.

New command: m365 flow set

3 participants