Skip to content
Merged
Changes from all 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
20 changes: 20 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,21 @@ 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) for full details.

```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
```