Skip to content

fix: [#850] artisan help incorrect behavior#1330

Merged
hwbrzzl merged 2 commits intomasterfrom
bowen/#850-1
Dec 30, 2025
Merged

fix: [#850] artisan help incorrect behavior#1330
hwbrzzl merged 2 commits intomasterfrom
bowen/#850-1

Conversation

@hwbrzzl
Copy link
Contributor

@hwbrzzl hwbrzzl commented Dec 30, 2025

📑 Description

Closes goravel/goravel#850

image

✅ Checks

  • Added test cases for my code

@hwbrzzl hwbrzzl requested a review from a team as a code owner December 30, 2025 08:52
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @hwbrzzl, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request resolves an issue where the artisan command-line tool exhibited incorrect behavior when executed without any specified command. The core change involves renaming the internal help command to list to provide a clearer indication of its purpose: listing available commands. Furthermore, the implementation of this command has been streamlined by directly integrating with the cli library's ShowAppHelp function, which enhances efficiency and reduces unnecessary dependencies. These modifications ensure a more intuitive and consistent user experience when interacting with the artisan tool.

Highlights

  • Command Renaming: The internal help command has been renamed to list to more accurately reflect its function of displaying available commands.
  • Default Behavior Update: When the artisan command-line tool is invoked without any specific arguments, it will now default to showing the list of available commands instead of help.
  • Refactored ListCommand: The ListCommand (formerly HelpCommand) has been refactored to remove its dependency on the Artisan facade and now directly utilizes cli.ShowAppHelp for displaying the command list, simplifying its implementation.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request addresses an issue where running artisan without any sub-command was incorrectly showing the help for the help command instead of listing all available commands. The fix correctly changes the default behavior to execute the list command, which displays the command list.

The changes are well-implemented and include:

  • Modifying the default command from help to list.
  • Refactoring ListCommand to be more self-contained and efficient by removing its dependency on Artisan and directly using urfave/cli's help function.
  • Updating tests to reflect the new behavior.

The code is cleaner and the fix is effective. I have one suggestion for a minor cleanup to remove some resulting dead code.

// "static": config.Env("DEPLOY_STATIC", true),
// },
// console.NewDeployCommand(configFacade, artisanFacade),
console.NewHelpCommand(),
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Since HelpCommand is no longer registered, the console/console/help_command.go file and its contents have become dead code. It would be good to remove this file to improve maintainability.

@codecov
Copy link

codecov bot commented Dec 30, 2025

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.12%. Comparing base (6355289) to head (41f5932).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
console/console/list_command.go 0.00% 3 Missing ⚠️
console/application.go 0.00% 1 Missing ⚠️
console/service_provider.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1330      +/-   ##
==========================================
+ Coverage   70.07%   70.12%   +0.05%     
==========================================
  Files         282      281       -1     
  Lines       16752    16740      -12     
==========================================
  Hits        11739    11739              
+ Misses       4522     4510      -12     
  Partials      491      491              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hwbrzzl hwbrzzl merged commit 8b308e8 into master Dec 30, 2025
12 of 13 checks passed
@hwbrzzl hwbrzzl deleted the bowen/#850-1 branch December 30, 2025 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

artisan help incorrect behavior

2 participants