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 support for gists #172

Merged
merged 15 commits into from
Jul 20, 2020
Merged

Add support for gists #172

merged 15 commits into from
Jul 20, 2020

Conversation

HowardWolosky
Copy link
Member

@HowardWolosky HowardWolosky commented May 14, 2020

Description

This completes the required work to support the full set of API's around gists.

It adds the following functions:

  • Get-GitHubGist
  • Remove-GitHubGist
  • Copy-GitHubGist (aka. Fork-GitHubGist)
  • Add-GitHubGistStar
  • Remove-GitHubGistStar
  • Set-GitHubGistStar (just a wrapper around Add/Remove-GitHubGistStar
  • Test-GitHubGistStar
  • New-GitHubGist
  • Set-GitHubGist
    • Rename-GitHubGistFile (exposed helper function)
    • Remove-GitHubGistFile (exposed helper function)
    • Set-GitHubGistFile (exposed helper function, also known as Add-GitHubGistFile)
  • Get-GitHubGistComment
  • Set-GitHubGistComment
  • New-GitHubGistComment
  • Remove-GitHubGistComment

This also adds formatters for all newly introduced types: GitHub.Gist, GitHub.GistCommit, GitHub.GistDetail, and GitHub.GistFork.

Positional Binding has been set as false, and Position attributes added to the functions' mandatory parameters.

Issues Fixed

Fixes #32

References

GitHub Gist
GitHub Gist Comments

Checklist

  • You actually ran the code that you just wrote, especially if you did just "one last quick change".
  • Comment-based help added/updated, including examples.
  • Static analysis is reporting back clean.
  • New/changed code adheres to our coding guidelines.
  • Changes to the manifest file follow the manifest guidance.
  • Unit tests were added/updated and are all passing. See testing guidelines.
  • Relevant usage examples have been added/updated in USAGE.md.
  • If desired, ensure your name is added to our Contributors list

@HowardWolosky HowardWolosky added api completeness This is basic API functionality that hasn't been implemented yet. api-gists Work to complete the API's defined here: https://developer.github.com/v3/gists/ labels May 14, 2020
@HowardWolosky HowardWolosky force-pushed the gists branch 3 times, most recently from 45fd35e to c1e16c6 Compare June 29, 2020 05:38
@HowardWolosky HowardWolosky force-pushed the gists branch 2 times, most recently from c2c3b7f to e275505 Compare July 14, 2020 22:47
@HowardWolosky HowardWolosky marked this pull request as ready for review July 14, 2020 22:55
@HowardWolosky
Copy link
Member Author

/azp run PowerShellForGitHub-CI

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@HowardWolosky
Copy link
Member Author

/azp run PowerShellForGitHub-CI

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@HowardWolosky
Copy link
Member Author

/azp run PowerShellForGitHub-CI

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@HowardWolosky
Copy link
Member Author

/azp run PowerShellForGitHub-CI

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@HowardWolosky
Copy link
Member Author

/azp run PowerShellForGitHub-CI

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@HowardWolosky
Copy link
Member Author

/azp run PowerShellForGitHub-CI

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@HowardWolosky
Copy link
Member Author

/azp run PowerShellForGitHub-CI

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Adds full support for all gist related API's (core and comments)
as described in https://developer.github.com/v3/gists/ and
https://developer.github.com/v3/gists/comments/.

* No tests yet.
* Test-GitHubGistStarred doesn't appear to be working right, despite
  being coded against the proper API spec.
Also:

Add abilility to download gists

Add Set-GitHubGistStar helper
Re-order Content/FileName parameters
Switch to [System.IO.File]::ReadAllText() for reading files
Add gistfile detection/error handling
Add confirmation for removing gist files

Add helpers:
Remove-GitHubGistFile
Set-GitHubGistFile
Rename-GitHubGistFile
@HowardWolosky
Copy link
Member Author

/azp run PowerShellForGitHub-CI

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api completeness This is basic API functionality that hasn't been implemented yet. api-gists Work to complete the API's defined here: https://developer.github.com/v3/gists/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gists
1 participant