Skip to content

Commit 1556b8b

Browse files
authored
Project Usage (#164)
Add some usage examples for using this module with GitHub Projects.
1 parent 3a87f2b commit 1556b8b

File tree

1 file changed

+58
-5
lines changed

1 file changed

+58
-5
lines changed

USAGE.md

Lines changed: 58 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* [Querying Pull Requests](#querying-pull-requests)
1111
* [Querying Collaborators](#querying-collaborators)
1212
* [Querying Contributors](#querying-contributors)
13-
* [Quering Team and Organization Membership](#querying-team-and-organization-membership)
13+
* [Querying Team and Organization Membership](#querying-team-and-organization-membership)
1414
* [Labels](#labels)
1515
* [Getting Labels for a Repository](#getting-labels-for-a-repository)
1616
* [Getting Labels for an issue](#getting-labels-for-an-issue)
@@ -56,6 +56,15 @@
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+
* [Projects](#Projects)
60+
* [Get projects for a repository](#get-projects-for-a-repository)
61+
* [Get projects for a user](#get-projects-for-a-user)
62+
* [Create a project](#create-a-project)
63+
* [Add a column to a project](#add-a-column-to-a-project)
64+
* [Add a card to a column](#add-a-card-to-a-column)
65+
* [Add an existing issue as a card to a column](#add-an-existing-issue-as-a-card-to-a-column)
66+
* [Move a card to be after a certain card in the same column](Move-a-card-to-be-after-a-certain-card-in-the-same-column)
67+
* [Move a card to the bottom of another column](Move-a-card-to-the-bottom-of-another-column)
5968
* [Advanced](#advanced)
6069
* [Migrating blog comments to GitHub issues](#migrating-blog-comments-to-github-issues)
6170

@@ -271,7 +280,7 @@ Get-GitHubRepositoryContributor -OwnerName 'PowerShell' -RepositoryName 'PowerSh
271280
Sort-Object
272281
```
273282

274-
#### Quering Team and Organization Membership
283+
#### Querying Team and Organization Membership
275284

276285
```powershell
277286
$organizationMembers = Get-GitHubOrganizationMembers -OrganizationName 'OrganizationName'
@@ -304,7 +313,7 @@ New-GitHubLabel -OwnerName PowerShell -RepositoryName DesiredStateConfiguration
304313

305314
#### Removing a Label From a Repository
306315
```powershell
307-
Remove-GitHubLabel -OwnerName PowerShell -RepositoryName desiredstateconfiguration -Name TestLabel
316+
Remove-GitHubLabel -OwnerName PowerShell -RepositoryName DesiredStateConfiguration -Name TestLabel
308317
```
309318

310319
#### Adding Labels to an Issue
@@ -315,7 +324,7 @@ Add-GitHubIssueLabel -OwnerName $script:ownerName -RepositoryName $repositoryNam
315324

316325
#### Removing a Label From an Issue
317326
```powershell
318-
Remove-GitHubIssueLabel -OwnerName Microsoft -RepositoryName desiredstateconfiguration -Name TestLabel -Issue 1
327+
Remove-GitHubIssueLabel -OwnerName Microsoft -RepositoryName DesiredStateConfiguration -Name TestLabel -Issue 1
319328
```
320329

321330
#### Updating a Label With a New Name and Color
@@ -398,7 +407,7 @@ Get-GitHubCloneTraffic -OwnerName Microsoft -RepositoryName PowerShellForGitHub
398407

399408
#### Get assignees
400409
```powershell
401-
Get-GitHubAsignee -OwnerName Microsoft -RepositoryName PowerShellForGitHub
410+
Get-GitHubAssignee -OwnerName Microsoft -RepositoryName PowerShellForGitHub
402411
```
403412

404413
#### Check assignee permission
@@ -501,6 +510,50 @@ Get-GitHubEvent -OwnerName Microsoft -RepositoryName PowerShellForGitHub -EventI
501510

502511
----------
503512

513+
### Projects
514+
515+
#### Get projects for a repository
516+
```powershell
517+
Get-GitHubProject -OwnerName Microsoft -RepositoryName PowerShellForGitHub
518+
```
519+
520+
#### Get projects for a user
521+
```powershell
522+
Get-GitHubProject -UserName octocat
523+
```
524+
525+
#### Create a project
526+
```powershell
527+
New-GitHubProject -OwnerName octocat -RepositoryName PowerShellForGitHub -Name TestProject
528+
```
529+
530+
#### Add a column to a project
531+
```powershell
532+
New-GitHubProjectColumn -Project 1 -Name 'To Do'
533+
```
534+
535+
#### Add a card to a column
536+
```powershell
537+
New-GitHubProjectCard -Column 2 -Note 'Fix this bug'
538+
```
539+
540+
#### Add an existing issue as a card to a column
541+
```powershell
542+
New-GitHubProjectCard -Column 2 -ContentId 3 -ContentType Issue
543+
```
544+
545+
#### Move a card to be after a certain card in the same column
546+
```powershell
547+
Move-GitHubProjectCard -Card 4 -After 5
548+
```
549+
550+
#### Move a card to the bottom of another column
551+
```powershell
552+
Move-GitHubProjectCard -Card 4 -ColumnId 6 -Bottom
553+
```
554+
555+
----------
556+
504557
### Advanced
505558

506559
#### Migrating blog comments to GitHub issues

0 commit comments

Comments
 (0)