Skip to content

Commit 8da84fd

Browse files
lazywinadminHowardWolosky
authored andcommitted
Adding advanced example (#116)
@lazywinadmin used this module to migrate his blog comments to Github Issues. That advanced example is now referenced in the USAGE documentation. Resolves #102
1 parent f7b956d commit 8da84fd

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

USAGE.md

+20
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@
5656
* [Get events from a repository](#get-events-from-a-repository)
5757
* [Get events from an issue](#get-events-from-an-issue)
5858
* [Get a single event](#get-a-single-event])
59+
* [Advanced](#advanced)
60+
* [Migrating blog comments to GitHub issues](#migrating-blog-comments-to-github-issues)
5961

6062
----------
6163

@@ -496,3 +498,21 @@ Get-GitHubEvent -OwnerName Microsoft -RepositoryName PowerShellForGitHub -Issue
496498
```powershell
497499
Get-GitHubEvent -OwnerName Microsoft -RepositoryName PowerShellForGitHub -EventID 1
498500
```
501+
502+
----------
503+
504+
### Advanced
505+
506+
#### Migrating blog comments to GitHub issues
507+
@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.
508+
509+
```powershell
510+
# Create an issue
511+
$IssueObject = New-GitHubIssue @githubsplat -Title $IssueTitle -Body $body -Label 'blog comments'
512+
513+
# Create Comment
514+
New-GitHubComment @githubsplat -Issue $IssueObject.number -Body $CommentBody
515+
516+
# Close issue
517+
Update-GitHubIssue @githubsplat -Issue $IssueObject.number -State Closed
518+
```

0 commit comments

Comments
 (0)