-
Notifications
You must be signed in to change notification settings - Fork 187
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
Merge in functionality from other PS & Github Modules #21
Comments
The task list (if accepted by all) for this would look like the below (& I'm willing to do the majority of this work)
|
@kilasuit I think that's a great idea, having all the functions available under single repo would make using them significantly easier. If you are willing to get this started, I'll try to help as much as I can. I'm not sure we want to eventually combine everything in a single file. I'd suggest splitting it into different ones according to areas they refer to (pull requests, issues etc.) but we will get better clarity once we have a list of all functions available. One option would be to mimic structure from https://developer.github.com/v3/ |
I also have an entire module for the Gist functionality of GitHub, it is a separate module, not sure if there would be any interest in bundling these together. https://github.com/dotps1/PSGist |
Gist queries are part of the GitHub API, so I'd definitely support this @dotps1. Would you be willing to drive this? We could start discussion on structure of this repo and how many/what modules we would require. Seems it would make sense to have separate module for Gist operations. |
This is very needed. Also, wanted to mention Doug Finke has a Package Provider for Gists. https://www.powershellgallery.com/packages/GistProvider/0.6 |
@KarolKaczmarek I will look more deeply, but we need to standardize our API call I think, and go from there. I currently, for my module have the user generate a Token with only permissions to Gist Objects, then serialize that to disk, then deserialize with every call. I also have all the responses from the API dump into Class objects. So think we need to decide how we want all that done, and then we can work on the merging. I'm open to suggestions. I know PSGallery doesn't like converting the token to a secure string with the -AsPlainText -Force switches (which is completely stupid), so we can also store the token in the windows credential manager (See my PSAppVeyor project, I use that method there). |
@dotps1 Unfortunately PasswordVault isn't supported on Windows 7, so I don't think that's a viable option for us. We could start with SecureString and design it in a way to easily replace underlying storage/encryption mechanism if it would block us from getting into PSGallery. Regarding standardizing API call, I fully agree. I actually like your Invoke-GistApi function, so we could have something similar. I could refactor existing functions to use it later as well. The only problem is I don't see it supporting pagination, so that's something what should be added. That's an easy thing to do though - we use Get-NextResultPage for verifying if there's more results available. |
Please let me know how I can help in this effort. Especially code to make calls using the new GraphQL. I had written a Bash shell script to run on my Mac to automate the sequence of Git commands I cover in my class on Git and GitHub. My script creates a Git repo locally, then calls GitHub's REST API to create a new repo on GitHub. I made it idempotent by also deleting the repo before creating it again. When PS was open sourced to Mac, I began porting it over to PS1 so that Windows users could run the script too. Then I got stuck on error messages issued by PS. BTW, my notes on making sense of REST APIs in PS I've recorded at https://wilsonmar.github.io/powershell-rest-api/ In my Bash shell script I used the simple approach of a .secrets file which the script reads in as environment variables. The same file I had PowerShell read in as a hash table. BTW: Thanks to @rchaganti for pointing me to this repo. |
Hi @wilsonmar , This particular issue is about porting cmdlets from different repos here to have everything in one place. Unfortunately I currently do not have time to drive this effort, so this didn't really start yet, however if you experimented with the new GitHub GraphQL API and would like to add it's support here, you are more than welcome to do it! Due to very nature of GraphQL vs REST based API I don't think it makes sense to try to blend them together, but I think having a module for GraphQL API would be useful. That would give users option to use whichever API fits their needs/they are most familiar with. Let me know if you need help getting started with it, you can also message me on Twitter @KarolKaczmarek. Regarding your problems with porting your bash scripts to ps1, could you be a bit more specific? What errors are you seeing? Thanks! |
I would love to create a GraphQL module for GitHub. My sad experience with PowerShell module is at My rough draft outline for combining the modules and adding GraphQL is: Can we talk about this briefly? // Wilson Mar 310.320-7878 On Fri, Nov 4, 2016 at 1:56 PM, Karol Kaczmarek [email protected]
|
@wilsonmar I created an issue regarding supporting GitHub GraphQL API: #23 , let's continue the discussion about it there. I also sent you an email with answers to the two links above. Thanks, |
Closing this out as much of this doesn't quite seem applicable anymore given the current updated state of the repo. |
Ideally we only need 1 module for PowerShell & to work with Github and we already have 2 in the Gallery by @pcgeek86 @davidobrien1985 as well as a more featured module Posh-Github written by @Iristyle which could really do with being updated to allow use of Personal Access Token's which there is already support for in the other modules.
Now I'm looking at whether it makes sense trying to port a number of the functions in @Iristyle module as well as @davidobrien1985 module this weekend (if people are agreeable to this of course) into this module and have 1 fully functioned module
Now that PS its self is OS'd I think its time to start bringing together modules that have some similarities to the PowerShell DSC Resources that fall under a similar High Quality suggestive
I say this especially around the Posh-Github modile as there are some as there are some really good functions in that module like the New-GithubFork however I would really like this to be a module that combined all the functions together without lots of global variables dotted everywhere (yak) and has no reliance on stored credentials of any kind (again yak) whilst it passes PSScriptAnalyzer whilst having a structured & standardised build process.
Also would be a challenge to get this working on a .NET Core PS environment and would be a great showcase to the community too!
The text was updated successfully, but these errors were encountered: