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

Add PowerShell formatting files #11

Open
4 tasks
pcgeek86 opened this issue Mar 20, 2016 · 5 comments
Open
4 tasks

Add PowerShell formatting files #11

pcgeek86 opened this issue Mar 20, 2016 · 5 comments

Comments

@pcgeek86
Copy link
Owner

We need to add formatting files for object output, to ensure that useful data is displayed by default. As a prerequisite to this, we will need to build out a GitHub data model (probably using PowerShell v5 Classes), and map the GitHub REST API output to the data models.

NOTE: This work item is exempt form the contribution guidelines, which state "no XML." 😄

Priority Work Items

  • Formatting file for GitHub Repositories
  • Formatting file for GitHub Users
  • Formatting file for GitHub Issues
  • Formatting file for GitHub Gists
@sagreer
Copy link

sagreer commented Mar 21, 2016

100% agree with the "no XML"!! I would be interested in helping you with this Trevor.

@pcgeek86
Copy link
Owner Author

@sagreer Awesome, Steve! That would be really helpful! There are [at least] a couple of different approaches we could take here:

  1. We build out data models (using PowerShell v5 Classes) and then provide the formatting files for those object types.
  2. We use the object output directly from Invoke-RestMethod, but inside each PSGitHub command, we use the PSTypeNames to assign a "type" to the object(s) before emitting them.

Can we set up a [regular] Skype (not Skype for Business) call to discuss this? My username is the same.

Cheers,
Trevor Sullivan

@doesitscript
Copy link

What kind of formatting file are you thinking of? The two that come to mind are: YAML & MD. The drawback to YAML being that it has a DLL dependency. MD drawback would be that guidelines would have to set for how to use the MD (similar to platyPS which a few members of the PS team use for generating help for their advanced functions).

Just trying to gauge if I may be able to jump in, based on what you're thinking the best approach is to this task.

@pcgeek86
Copy link
Owner Author

@doesitscript I'm actually referring to the standard PowerShell *.format.ps1xml files that are used to format object output in the host. We need to build out a sort of object model, most likely using PowerShell v5 class definitions, for things like Repositories, Gists, Users, Issues, etc., and then update all of the existing functions to emit these objects, instead of the generic objects that are returned by Invoke-RestMethod.

@felixfbecker
Copy link
Collaborator

I would personally prefer if the object output stayed as close to the API output as possible (for example only changing the casing convention).

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

No branches or pull requests

4 participants