Add needs-review flag param to getArguments#6
Open
kavya-chopra wants to merge 1 commit into
Open
Conversation
toastwaffle
requested changes
Feb 10, 2026
toastwaffle
left a comment
There was a problem hiding this comment.
This PR should include some logic using this flag
goddenrich
pushed a commit
to goddenrich/arcanist
that referenced
this pull request
Jul 8, 2026
Summary: This previously only worked for more traditional workflows like diff because it expected `$this->arguments` to be an array. But in modern workflows, it's a `PhutilArgumentParser` instead. Since extension workflows might also like to use the more modern approach and require a clean working copy, it seems like this ought to be fixed. Test Plan: Make a quick and simple custom workflow and try using `$this->requireCleanWorkingCopy()`. Before: ``` $ arc publish # a new command for my project [2025-05-30 23:42:32] EXCEPTION: (Error) Cannot use object of type PhutilArgumentParser as array at [<arcanist>/src/workflow/ArcanistWorkflow.php:1009] arc-thing(), arcanist(head=lfn/master, ref.lfn/master=8691fb3816a0) #0 ArcanistWorkflow::shouldRequireCleanUntrackedFiles() called at [<arcanist>/src/workflow/ArcanistWorkflow.php:1122] thought-machine#1 ArcanistWorkflow::requireCleanWorkingCopy() called at [<arc-thing>/workflow/MediaThingArcPublishWorkflow.php:80] thought-machine#2 MediaThingArcPublishWorkflow::runWorkflow(PhutilArgumentParser) called at [<arcanist>/src/workflow/ArcanistWorkflow.php:227] thought-machine#3 ArcanistWorkflow::executeWorkflow(PhutilArgumentParser) called at [<arcanist>/src/toolset/ArcanistPhutilWorkflow.php:21] thought-machine#4 ArcanistPhutilWorkflow::execute(PhutilArgumentParser) called at [<arcanist>/src/parser/argument/PhutilArgumentParser.php:493] thought-machine#5 PhutilArgumentParser::parseWorkflowsFull(array) called at [<arcanist>/src/runtime/ArcanistRuntime.php:171] thought-machine#6 ArcanistRuntime::executeCore(array) called at [<arcanist>/src/runtime/ArcanistRuntime.php:37] thought-machine#7 ArcanistRuntime::execute(array) called at [<arcanist>/support/init/init-arcanist.php:6] thought-machine#8 require_once(string) called at [<arcanist>/bin/arc:10] ``` After: ``` $ arc publish ... success! ``` Reviewers: O1 Blessed Committers, valerio.bozzolan, aklapper Reviewed By: O1 Blessed Committers, valerio.bozzolan, aklapper Subscribers: aklapper, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Differential Revision: https://we.phorge.it/D26041
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.
No description provided.