Skip to content

Commit 7ff7d0c

Browse files
committed
Fix nits
1 parent ea9fb41 commit 7ff7d0c

File tree

4 files changed

+19
-22
lines changed

4 files changed

+19
-22
lines changed

GitHubMilestones.ps1

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) Microsoft Corporation. All rights reserved.
22
# Licensed under the MIT License.
33

4-
function Get-GitHubMilestones
4+
function Get-GitHubMilestone
55
{
66
<#
77
.DESCRIPTION
@@ -45,7 +45,7 @@ function Get-GitHubMilestones
4545
If not supplied here, the DefaultNoStatus configuration property value will be used.
4646
4747
.EXAMPLE
48-
Get-GitHubMilestones-OwnerName Powershell -RepositoryName PowerShellForGitHub
48+
Get-GitHubMilestone -OwnerName Powershell -RepositoryName PowerShellForGitHub
4949
5050
Get the milestones for the PowerShell\PowerShellForGitHub project.
5151
#>
@@ -143,7 +143,7 @@ function New-GitHubMilestone
143143
{
144144
<#
145145
.DESCRIPTION
146-
Creates a new Github comment in an issue for the given repository
146+
Creates a new Github milestone in an issue for the given repository
147147
148148
The Git repo for this module can be found here: http://aka.ms/PowerShellForGitHub
149149
@@ -167,10 +167,10 @@ function New-GitHubMilestone
167167
Only milestones with this state are returned, either open or closed. Default: open
168168
169169
.PARAMETER Description
170-
A desciprion of the milestone.
170+
A description of the milestone.
171171
172172
.PARAMETER Due_On
173-
The milestone due date.
173+
The milestone due date.
174174
175175
.PARAMETER AccessToken
176176
If provided, this will be used as the AccessToken for authentication with the
@@ -185,7 +185,7 @@ function New-GitHubMilestone
185185
.EXAMPLE
186186
New-GitHubMilestone -OwnerName Powershell -RepositoryName PowerShellForGitHub -Title "Testing this API"
187187
188-
Creates a new Github comment in an issue for the PowerShell\PowerShellForGitHub project.
188+
Creates a new Github milestone in an issue for the PowerShell\PowerShellForGitHub project.
189189
#>
190190
[CmdletBinding(
191191
SupportsShouldProcess,
@@ -264,7 +264,7 @@ function Set-GitHubMilestone
264264
{
265265
<#
266266
.DESCRIPTION
267-
Creates a new Github comment in an issue for the given repository
267+
Set an existing milestone for the given repository
268268
269269
The Git repo for this module can be found here: http://aka.ms/PowerShellForGitHub
270270
@@ -288,10 +288,10 @@ function Set-GitHubMilestone
288288
Only milestones with this state are returned, either open or closed. Default: open
289289
290290
.PARAMETER Description
291-
A desciprion of the milestone.
291+
A description of the milestone.
292292
293293
.PARAMETER Due_On
294-
The milestone due date.
294+
The milestone due date.
295295
296296
.PARAMETER AccessToken
297297
If provided, this will be used as the AccessToken for authentication with the
@@ -304,9 +304,9 @@ function Set-GitHubMilestone
304304
If not supplied here, the DefaultNoStatus configuration property value will be used.
305305
306306
.EXAMPLE
307-
New-GitHubMilestone -OwnerName Powershell -RepositoryName PowerShellForGitHub -Title "Testing this API"
307+
Set-GitHubMilestone -OwnerName Powershell -RepositoryName PowerShellForGitHub -Title "Testing this API"
308308
309-
Creates a new Github comment in an issue for the PowerShell\PowerShellForGitHub project.
309+
Update an existing milestone for the PowerShell\PowerShellForGitHub project.
310310
#>
311311
[CmdletBinding(
312312
SupportsShouldProcess,

PowerShellForGitHub.psd1

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
'Get-GitHubIssueTimeline',
5858
'Get-GitHubLabel',
5959
'Get-GitHubLicense',
60-
'Get-GitHubMilestones',
60+
'Get-GitHubMilestone',
6161
'Get-GitHubOrganizationMember',
6262
'Get-GitHubPathTraffic',
6363
'Get-GitHubPullRequest',

Tests/GitHubMilestones.tests.ps1

+5-8
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ try
7979
# Define Script-scoped, readonly, hidden variables.
8080

8181
@{
82-
defaultIssueTitle = "Test issue title"
8382
defaultMilestoneTitle = "This is a test milestone title."
8483
defaultEditedMilestoneTitle = "This is an edited milestone title."
8584
}.GetEnumerator() | ForEach-Object {
@@ -89,19 +88,17 @@ try
8988
Describe 'Creating, modifying and deleting milestones' {
9089
$repo = New-GitHubRepository -RepositoryName ([Guid]::NewGuid().Guid) -AutoInit
9190

92-
$issue = New-GitHubIssue -Uri $repo.svn_url -Title $defaultIssueTitle
93-
9491
Context 'For creating a new milestone' {
95-
$newMilestone = New-GitHubMilestones -Uri $repo.svn_url -Title $defaultMilestoneTitle
96-
$existingMilestone = Get-GitHubMilestones -Uri $repo.svn_url -MilestoneNumber $newMilestone.number
92+
$newMilestone = New-GitHubMilestone -Uri $repo.svn_url -Title $defaultMilestoneTitle
93+
$existingMilestone = Get-GitHubMilestone -Uri $repo.svn_url -MilestoneNumber $newMilestone.number
9794

9895
It "Should have the expected title text" {
9996
$existingMilestone.title | Should be $defaultMilestoneTitle
10097
}
10198
}
10299

103100
Context 'For getting milestones from a repo' {
104-
$existingMilestones = @(Get-GitHubMilestones -Uri $repo.svn_url)
101+
$existingMilestones = @(Get-GitHubMilestone -Uri $repo.svn_url)
105102

106103
It 'Should have the expected number of milestones' {
107104
$existingMilestones.Count | Should be 1
@@ -126,7 +123,7 @@ try
126123
}
127124

128125
Context 'For getting milestones from a repository and deleting them' {
129-
$existingMilestones = @(Get-GitHubMilestones -Uri $repo.svn_url)
126+
$existingMilestones = @(Get-GitHubMilestone -Uri $repo.svn_url)
130127

131128
It 'Should have the expected number of milestones' {
132129
$existingMilestones.Count | Should be 2
@@ -136,7 +133,7 @@ try
136133
Remove-GitHubMilestone -Uri $repo.svn_url -MilestoneNumber $milestone.number
137134
}
138135

139-
$existingMilestones = @(Get-GitHubMilestones -Uri $repo.svn_url)
136+
$existingMilestones = @(Get-GitHubMilestone -Uri $repo.svn_url)
140137

141138
It 'Should have no milestones' {
142139
$existingMilestones.Count | Should be 0

USAGE.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -424,12 +424,12 @@ Remove-GitHubComment -OwnerName Powershell -RepositoryName PowerShellForGitHub -
424424

425425
#### Get milestones from a repository
426426
```powershell
427-
Get-GitHubMilestones -OwnerName Powershell -RepositoryName PowerShellForGitHub -Sort due_on -Direction asc -Due_On '2011-04-14T16:00:49Z'
427+
Get-GitHubMilestone -OwnerName Powershell -RepositoryName PowerShellForGitHub -Sort due_on -Direction asc -Due_On '2011-04-14T16:00:49Z'
428428
```
429429

430430
#### Get a single milestone
431431
```powershell
432-
Get-GitHubMilestones -OwnerName Powershell -RepositoryName PowerShellForGitHub -MilestoneNumber 1
432+
Get-GitHubMilestone -OwnerName Powershell -RepositoryName PowerShellForGitHub -MilestoneNumber 1
433433
```
434434

435435
#### Adding a new milestone

0 commit comments

Comments
 (0)