Closed dotps1 closed 4 years ago
I'm not following that comment on any of those.
Hi there @dotps1, All PS1 files should end with a new line character. GitHub will show you if you've missed any: See the little red symbol at the bottom. I'm always doing this myself TBH. Thanks! :smile:
Why do they need that? I've never done that on any of my stuff.
Sent from my iPhone
On Mar 30, 2016, at 11:44 PM, Daniel Scott-Raynsford notifications@github.com wrote:
Hi there @dotps1, All PS1 files should end with a new line character. GitHub will show you if you've missed any:
See the little red symbol at the bottom. I'm always doing this myself TBH. Thanks!
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub
All of the MSFT PowerShell community repos require this as well, so it's generally a good habit to get into (although as I said I'm always missing it myself).
I noticed my GitHubGistFork class was missing a few properties, I corrected that, also, GitHubGistHistory no longer derives that, no point. I added a lot of documentation to the Classes. I also added new lines at the end of all the files I have worked on.
I added the Copy-GitHubGist function with an alias of Fork-GitHubGist. I also noticed my constructor name was mistyped for GitHubGistFork, I corrected that, I also added a try catch to the private method Invoke-GitHubApi; if it fails it will throw and error containing the message property from the api response. this looks much better then the json response.
Closing since we have these cmdlets in PSGitHub now.
Improvements / Enhancements
Added initial classes for GitHubGists which also lead to other classes that are partially embedded.
added a method to the GitHubGistFile method called GetFileContent allowing for the content of a file to be fetched if it is not present. which seems to be any time a Gist is retrieved without using the Id. This allows for the following syntax to work properly:
Updated Save-GitHubGist to accept object of type GitHubGist rather then System.Object.
I think that's it. I didn't move any of the classes you have defined already, but that will need to be done, unless i'm missing something.
this is my first attempt at classes, so feel free to be brutal with comments and suggestions lol