Skip to content

Conversation

@brendandburns
Copy link
Contributor

@brendandburns brendandburns commented Dec 11, 2019

PR Summary

Implement the Restart-Computer command for Un*x and MacOS

PR Context

Compliment to the recent implementation of Stop-Computer (#11151)

PR Checklist

@iSazonov iSazonov added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Dec 11, 2019
@iSazonov iSazonov added this to the 7.1.0-preview.1 milestone Dec 11, 2019
@iSazonov
Copy link
Collaborator

@brendandburns Please don't rebase until maintainers ask you. Rebasing complicates reviewing.

Copy link
Member

@SteveL-MSFT SteveL-MSFT left a comment

Choose a reason for hiding this comment

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

The Windows Computer cmdlets already use a test hook for testing, should use the same thing here. See https://github.com/PowerShell/PowerShell/blob/master/src/Microsoft.PowerShell.Commands.Management/commands/management/Computer.cs#L2130

@ghost ghost added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Dec 11, 2019
@iSazonov
Copy link
Collaborator

We merged #11151 without new tests.

@ghost ghost removed the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Dec 11, 2019
@brendandburns
Copy link
Contributor Author

I will address comments and add tests for both commands.

Thanks

@brendandburns
Copy link
Contributor Author

@iSazonov is there a preferred style of addressing comments for the PowerShell repo? Should I just add additional commits instead of squashing commits?

(I'm new here :)

Thanks

@iSazonov
Copy link
Collaborator

Should I just add additional commits instead of squashing commits?

Yes, please add new commits. Some commits or one for all comments.

@SteveL-MSFT
Copy link
Member

@brendandburns unless there is a need to preserve history, we always squash on merge. For the sake of the reviewers, it's always been easier to add new commits so we can see what exactly changed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please remove the commented code.

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.

@brendandburns brendandburns force-pushed the restarter branch 4 times, most recently from 324fa80 to 65d114c Compare January 15, 2020 00:57
@brendandburns
Copy link
Contributor Author

@iSazonov @SteveL-MSFT

Sorry it took so long for me to get back to this. I've added tests for both Restart-Computer and Stop-Computer on Unix.

Please take another look.

Thanks!

Comment on lines 31 to 34
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please use It "Should support -computer parameter" -Skip:(!$IsWindows) {

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 for all.

Comment on lines 40 to 43
Copy link
Collaborator

@iSazonov iSazonov Jan 15, 2020

Choose a reason for hiding this comment

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

The same. Below too.

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 for all.

@brendandburns
Copy link
Contributor Author

@iSazonov comments addressed, please re-check.

Thanks!

@iSazonov
Copy link
Collaborator

@brendandburns Did you address all @SteveL-MSFT 's comments?

@brendandburns
Copy link
Contributor Author

yes, I verified in the code that I had addressed both of the comments from @SteveL-MSFT

Thanks

@iSazonov
Copy link
Collaborator

@SteveL-MSFT Please update your review.

1 similar comment
@TravisEz13
Copy link
Member

@SteveL-MSFT Please update your review.

@TravisEz13
Copy link
Member

@SteveL-MSFT Please update your review

@TravisEz13
Copy link
Member

The merge is bad. I'll fix it.

@TravisEz13
Copy link
Member

TravisEz13 commented Feb 3, 2020

Rebased to resolve conflicts and changed #region format to match changes from conflict

@TravisEz13
Copy link
Member

@PoshChan Please remind me in 1 hour

@PoshChan
Copy link
Collaborator

PoshChan commented Feb 3, 2020

@TravisEz13, this is the reminder you requested 1 hour ago

@TravisEz13 TravisEz13 changed the title Refactor and implement Restart-Computer for Un*x and MacOS Refactor and implement Restart-Computer for Un*x and macOS Feb 3, 2020
@TravisEz13 TravisEz13 merged commit 127fec5 into PowerShell:master Feb 3, 2020
@iSazonov
Copy link
Collaborator

iSazonov commented Feb 4, 2020

@brendandburns Thanks for your contribution!

@ghost
Copy link

ghost commented Mar 26, 2020

🎉v7.1.0-preview.1 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants