Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: convert status command to clack #6323

Conversation

lemusthelroy
Copy link
Contributor

@lemusthelroy lemusthelroy commented Jan 16, 2024

πŸŽ‰ Thanks for submitting a pull request! πŸŽ‰

Summary

Converts status command to clack

Before:
image

After:
image


For us to review and ship your PR efficiently, please perform the following steps:

  • Open a bug/issue before writing your code πŸ§‘β€πŸ’». This ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or something that`s on fire πŸ”₯ (e.g. incident related), you can skip this step.
  • Read the contribution guidelines πŸ“–. This ensures your code follows our style guide and
    passes our tests.
  • Update or add tests (if any source code was changed or added) πŸ§ͺ
  • Update or add documentation (if features were changed or added) πŸ“
  • Make sure the status checks below are successful βœ…

A picture of a cute animal (not mandatory, but encouraged)

@lemusthelroy lemusthelroy changed the title feat: add clack/core and is-unicode-supported feat: convert status command to clack Jan 17, 2024
@lemusthelroy lemusthelroy marked this pull request as ready for review January 17, 2024 09:55
@lemusthelroy lemusthelroy requested a review from a team as a code owner January 17, 2024 09:55
Copy link
Contributor

@khendrikse khendrikse left a comment

Choose a reason for hiding this comment

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

Some small feedback!

log()
log('Login with "netlify login" command')
exit()
NetlifyLog.error(`Not logged in. Please log in to see site status.`)
Copy link
Contributor

Choose a reason for hiding this comment

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

For this one, you might want to add a second parameter with {exit: false} so that line 16 doesn't immediately exit the process. Otherwise line 17 and 18 won't be shown. OR you can change it into a NetlifyLog.warn because it is more informative than actually going wrong :)

I also think we don't need the additional empty one on line 17. I've so far removed all the empty log() ones I've seen.

Then on line 18 you can just use NetlifyLog.message() and then after that you could do outro().

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Awesome, I needed this thank you

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -93,5 +91,6 @@ export const status = async (options: OptionValues, command: BaseCommand) => {
'Site Id': chalk.yellowBright(siteInfo.id),
}),
)
log()
NetlifyLog.message()
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd just remove this :)

@lemusthelroy lemusthelroy merged commit b8daf92 into CP-101/design-system-clack-implementation Jan 17, 2024
30 checks passed
@lemusthelroy lemusthelroy deleted the lemusthelroy/ct-484-convert-status-command-to-clack branch January 17, 2024 11:47
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.

None yet

2 participants