Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions GitHubRepositories.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1092,6 +1092,9 @@ filter Set-GitHubRepository
.PARAMETER IsTemplate
Specifies whether the repository is made available as a template.

.PARAMETER WebCommitSignoffRequired
Specifies whether to require contributors to sign off on web-based commits.

.PARAMETER Archived
Specify this to archive this repository.
NOTE: You cannot unarchive repositories through the API / this module.
Expand Down Expand Up @@ -1198,6 +1201,8 @@ filter Set-GitHubRepository

[switch] $IsTemplate,

[switch] $WebCommitSignoffRequired,

[switch] $Archived,

[switch] $Force,
Expand Down Expand Up @@ -1243,6 +1248,7 @@ filter Set-GitHubRepository
if ($PSBoundParameters.ContainsKey('AllowUpdateBranch')) { $hashBody['allow_update_branch'] = $AllowUpdateBranch.ToBool() }
if ($PSBoundParameters.ContainsKey('DeleteBranchOnMerge')) { $hashBody['delete_branch_on_merge'] = $DeleteBranchOnMerge.ToBool() }
if ($PSBoundParameters.ContainsKey('IsTemplate')) { $hashBody['is_template'] = $IsTemplate.ToBool() }
if ($PSBoundParameters.ContainsKey('WebCommitSignoffRequired')) { $hashBody['web_commit_signoff_required'] = $WebCommitSignoffRequired.ToBool() }
if ($PSBoundParameters.ContainsKey('Archived')) { $hashBody['archived'] = $Archived.ToBool() }

if ($Force -and (-not $Confirm))
Expand Down
2 changes: 2 additions & 0 deletions Tests/GitHubRepositories.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,7 @@ Describe 'GitHubRepositories\Set-GitHubRepository' {
AllowUpdateBranch = $true
DeleteBranchOnMerge = $true
IsTemplate = $true
WebCommitSignoffRequired = $true
}

$updatedRepo = Set-GitHubRepository @updateGithubRepositoryParms -PassThru
Expand All @@ -809,6 +810,7 @@ Describe 'GitHubRepositories\Set-GitHubRepository' {
$updatedRepo.allow_update_branch | Should -BeTrue
$updatedRepo.delete_branch_on_merge | Should -BeTrue
$updatedRepo.is_template | Should -BeTrue
$updatedRepo.web_commit_signoff_required | Should -BeTrue
}
}

Expand Down