Skip to content

Adding advanced example #116

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

Merged
merged 10 commits into from
Jul 29, 2019
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
* [Get events from a repository](#get-events-from-a-repository)
* [Get events from an issue](#get-events-from-an-issue)
* [Get a single event](#get-a-single-event])
* [Advanced](#advanced)
* [Migrating blog comments to github issues](#migrating-blog-comments-to-github-issues)

----------

Expand Down Expand Up @@ -496,3 +498,20 @@ Get-GitHubEvent -OwnerName Microsoft -RepositoryName PowerShellForGitHub -Issue
```powershell
Get-GitHubEvent -OwnerName Microsoft -RepositoryName PowerShellForGitHub -EventID 1
```

----------

### Advanced

#### Migrating blog comments to github issues
@LazyWinAdmin used this module to migrate his blog comments from Disqus to Github Issues. [See blog post](https://lazywinadmin.com/2019/04/moving_blog_comments.html).
```powershell
# Create an issue
$IssueObject = New-GitHubIssue @githubsplat -Title $IssueTitle -Body $body -Label 'blog comments'

# Create Comment
New-GitHubComment @githubsplat -Issue $IssueObject.number -Body $CommentBody

# Close issue
Update-GitHubIssue @githubsplat -Issue $IssueObject.number -State Closed
```