The Wayback Machine - https://web.archive.org/web/20201013014240/https://github.com/microsoft/PowerShellForGitHub/pull/172
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 mentioned this pull request May 15, 2020
26 of 80 tasks complete
@HowardWolosky HowardWolosky force-pushed the HowardWolosky:gists branch from e7660c4 to cb778c0 Jun 18, 2020
@HowardWolosky HowardWolosky force-pushed the HowardWolosky:gists branch 3 times, most recently from 45fd35e to c1e16c6 Jun 27, 2020
@HowardWolosky HowardWolosky force-pushed the HowardWolosky:gists branch 2 times, most recently from c2c3b7f to e275505 Jul 9, 2020
@HowardWolosky HowardWolosky marked this pull request as ready for review Jul 14, 2020
@HowardWolosky
Copy link
Member Author

@HowardWolosky HowardWolosky commented Jul 14, 2020

/azp run PowerShellForGitHub-CI

@azure-pipelines
Copy link

@azure-pipelines azure-pipelines bot commented Jul 14, 2020

Azure Pipelines successfully started running 1 pipeline(s).
@HowardWolosky
Copy link
Member Author

@HowardWolosky HowardWolosky commented Jul 14, 2020

/azp run PowerShellForGitHub-CI

@azure-pipelines
Copy link

@azure-pipelines azure-pipelines bot commented Jul 14, 2020

Azure Pipelines successfully started running 1 pipeline(s).
@HowardWolosky
Copy link
Member Author

@HowardWolosky HowardWolosky commented Jul 15, 2020

/azp run PowerShellForGitHub-CI

@azure-pipelines
Copy link

@azure-pipelines azure-pipelines bot commented Jul 15, 2020

Azure Pipelines successfully started running 1 pipeline(s).
@HowardWolosky HowardWolosky force-pushed the HowardWolosky:gists branch 3 times, most recently from abede4c to e473bd3 Jul 15, 2020
@HowardWolosky HowardWolosky mentioned this pull request Jul 16, 2020
0 of 3 tasks complete
@HowardWolosky HowardWolosky force-pushed the HowardWolosky:gists branch from e473bd3 to 7d6839f Jul 18, 2020
@HowardWolosky
Copy link
Member Author

@HowardWolosky HowardWolosky commented Jul 18, 2020

/azp run PowerShellForGitHub-CI

@azure-pipelines
Copy link

@azure-pipelines azure-pipelines bot commented Jul 18, 2020

Azure Pipelines successfully started running 1 pipeline(s).
@HowardWolosky
Copy link
Member Author

@HowardWolosky HowardWolosky commented Jul 18, 2020

/azp run PowerShellForGitHub-CI

@azure-pipelines
Copy link

@azure-pipelines azure-pipelines bot commented Jul 18, 2020

Azure Pipelines successfully started running 1 pipeline(s).
@HowardWolosky HowardWolosky force-pushed the HowardWolosky:gists branch from 8408fcd to 94a3daf Jul 19, 2020
@HowardWolosky
Copy link
Member Author

@HowardWolosky HowardWolosky commented Jul 19, 2020

/azp run PowerShellForGitHub-CI

@azure-pipelines
Copy link

@azure-pipelines azure-pipelines bot commented Jul 19, 2020

Azure Pipelines successfully started running 1 pipeline(s).
@HowardWolosky
Copy link
Member Author

@HowardWolosky HowardWolosky commented Jul 20, 2020

/azp run PowerShellForGitHub-CI

@azure-pipelines
Copy link

@azure-pipelines azure-pipelines bot commented Jul 20, 2020

Azure Pipelines successfully started running 1 pipeline(s).
HowardWolosky added 15 commits May 13, 2020
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 HowardWolosky force-pushed the HowardWolosky:gists branch from b3fe2a5 to 2fe6ca2 Jul 20, 2020
@HowardWolosky
Copy link
Member Author

@HowardWolosky HowardWolosky commented Jul 20, 2020

/azp run PowerShellForGitHub-CI

@azure-pipelines
Copy link

@azure-pipelines azure-pipelines bot commented Jul 20, 2020

Azure Pipelines successfully started running 1 pipeline(s).
@HowardWolosky HowardWolosky merged commit 92c4aa8 into microsoft:master Jul 20, 2020
7 checks passed
7 checks passed
PowerShellForGitHub-CI Build #20200720.4 succeeded
Details
PowerShellForGitHub-CI (Linux [PowerShell Core]) Linux [PowerShell Core] succeeded
Details
PowerShellForGitHub-CI (Wait for Running Builds) Wait for Running Builds succeeded
Details
PowerShellForGitHub-CI (Windows [PowerShell Core]) Windows [PowerShell Core] succeeded
Details
PowerShellForGitHub-CI (Windows [Windows PowerShell]) Windows [Windows PowerShell] succeeded
Details
PowerShellForGitHub-CI (macOS [PowerShell Core]) macOS [PowerShell Core] succeeded
Details
license/cla All CLA requirements met.
Details
@HowardWolosky HowardWolosky deleted the HowardWolosky:gists branch Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant
You can’t perform that action at this time.