From d25e2eeffb27170bbc76b67a3362f128b0fe8469 Mon Sep 17 00:00:00 2001 From: Chris Peterson Date: Fri, 22 May 2020 12:24:09 -0700 Subject: [PATCH] Allow getting a specific commit --- PSGitLab/Public/Projects/Get-GitLabProjectCommit.ps1 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/PSGitLab/Public/Projects/Get-GitLabProjectCommit.ps1 b/PSGitLab/Public/Projects/Get-GitLabProjectCommit.ps1 index b818154..fc8f0fa 100644 --- a/PSGitLab/Public/Projects/Get-GitLabProjectCommit.ps1 +++ b/PSGitLab/Public/Projects/Get-GitLabProjectCommit.ps1 @@ -21,8 +21,10 @@ $After, [datetime] - $Before + $Before, + [string] + $Sha ) $Project = $null @@ -60,5 +62,9 @@ Body = $Body } + if ($Sha) { + $Request.URI = "$($Request.URI)/$Sha" + } + QueryGitLabAPI -Request $Request -ObjectType 'GitLab.Project.Commit' }