Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
9793dc6
notes
MariusStorhaug Nov 11, 2024
b787a0e
tmp
MariusStorhaug Nov 12, 2024
cb16b36
Merge branch 'tmp' of https://github.com/PSModule/GitHub into multiCo…
MariusStorhaug Nov 13, 2024
dba9b66
Merge branch 'main' of https://github.com/PSModule/GitHub into multiC…
MariusStorhaug Nov 14, 2024
29da808
Wreck it with all the context changes :)
MariusStorhaug Nov 15, 2024
eb6af12
Fix loader
MariusStorhaug Nov 15, 2024
798d1d1
Fix get-ghconfig
MariusStorhaug Nov 15, 2024
597e8ec
Add remove + cleanup odcs
MariusStorhaug Nov 15, 2024
814fbcc
Update to Context 2.0.1
MariusStorhaug Nov 16, 2024
fbeacaf
Refactor GitHub context handling to use splatting for improved clarity
MariusStorhaug Nov 16, 2024
6dbd208
Enhance loader script to re-load preexisting settings from module con…
MariusStorhaug Nov 16, 2024
8b7927a
Refactor Get-GitHubContext function to improve context retrieval logi…
MariusStorhaug Nov 16, 2024
4f8248e
Fix loading
MariusStorhaug Nov 16, 2024
2c2e9dd
Improve context initialization by creating a new context if none exists
MariusStorhaug Nov 16, 2024
f92e355
FIx
MariusStorhaug Nov 16, 2024
e23e708
Fix Set-GHContext in connect
MariusStorhaug Nov 16, 2024
a84a6c5
Fix
MariusStorhaug Nov 16, 2024
a3a2a0d
Fix context setting in Connect-GitHubAccount and update context remov…
MariusStorhaug Nov 16, 2024
4d3e7e3
Enhance GitHub API commands to utilize context settings for improved …
MariusStorhaug Nov 16, 2024
87000e1
Set context on get app
MariusStorhaug Nov 16, 2024
f8f0b84
Fix
MariusStorhaug Nov 16, 2024
0d548cd
Fix
MariusStorhaug Nov 16, 2024
2c6f7d9
test
MariusStorhaug Nov 16, 2024
b6a6ffb
test
MariusStorhaug Nov 16, 2024
a7e340b
Fix
MariusStorhaug Nov 16, 2024
fdd6f6a
test
MariusStorhaug Nov 16, 2024
6c5a5e7
test
MariusStorhaug Nov 16, 2024
254a6c2
fix context
MariusStorhaug Nov 16, 2024
29bc870
UseAPIVersjon
MariusStorhaug Nov 16, 2024
8bd07bc
Fix Database
MariusStorhaug Nov 16, 2024
1fd1af6
Check what contexts we have...
MariusStorhaug Nov 16, 2024
b2bee58
Use Context 2.0.3 for fixing lists of contexts
MariusStorhaug Nov 16, 2024
a9d48fa
Improve verbosity output in Set-GitHubContext by using Get-Context wi…
MariusStorhaug Nov 16, 2024
8022f4a
Update Context module requirement to version 2.0.4 in multiple scripts
MariusStorhaug Nov 16, 2024
d914b00
test what remove does
MariusStorhaug Nov 16, 2024
88ffa91
Refactor Set-GitHubContext to use variable for context name in Remove…
MariusStorhaug Nov 16, 2024
920ac65
test
MariusStorhaug Nov 16, 2024
f1c0cac
test
MariusStorhaug Nov 16, 2024
f5c8b28
test
MariusStorhaug Nov 16, 2024
696c967
Fix
MariusStorhaug Nov 16, 2024
faa876b
test
MariusStorhaug Nov 17, 2024
8751bb7
Fix?
MariusStorhaug Nov 17, 2024
ee22ded
fix output
MariusStorhaug Nov 17, 2024
c06c66f
Test with only tokens as secstring
MariusStorhaug Nov 17, 2024
9a44bb0
Test
MariusStorhaug Nov 17, 2024
0845d31
testing use of default context
MariusStorhaug Nov 17, 2024
56651b7
Test with defining another parameter set
MariusStorhaug Nov 17, 2024
6db4674
named paramsets
MariusStorhaug Nov 17, 2024
e283b08
test
MariusStorhaug Nov 17, 2024
fbc8e8c
debug
MariusStorhaug Nov 17, 2024
2765cff
refactor: update default context retrieval to use GitHub configuratio…
MariusStorhaug Nov 17, 2024
6304609
chore: update required module version to 2.0.5 across GitHub context …
MariusStorhaug Nov 17, 2024
1f4be3f
chore: update required module version to 2.0.6 across GitHub context …
MariusStorhaug Nov 17, 2024
55f6841
Fix
MariusStorhaug Nov 17, 2024
ecd4fa9
Fix default context
MariusStorhaug Nov 17, 2024
d2fade8
refactor: simplify default context retrieval in Get-GitHubContext fun…
MariusStorhaug Nov 17, 2024
27c2587
test
MariusStorhaug Nov 17, 2024
6d350da
test
MariusStorhaug Nov 17, 2024
df41906
fix
MariusStorhaug Nov 17, 2024
69bb7b4
test
MariusStorhaug Nov 17, 2024
9502195
Test
MariusStorhaug Nov 17, 2024
3c204bb
refactor: update Get-GitHubContext to filter contexts by name
MariusStorhaug Nov 17, 2024
d95402d
Fix documentation
MariusStorhaug Nov 21, 2024
f51f546
Bump Context to 3.0.1
MariusStorhaug Nov 21, 2024
d909644
test
MariusStorhaug Nov 21, 2024
520f9d0
vbump Context to 3.0.2
MariusStorhaug Nov 21, 2024
a6b5b58
feat: add Get-SecretInfo call to Get-GitHubContext function
MariusStorhaug Nov 21, 2024
0114728
test
MariusStorhaug Nov 21, 2024
a7cf380
chore: update Context module requirement to version 3.0.3 across mult…
MariusStorhaug Nov 22, 2024
4fd9b18
Test again
MariusStorhaug Nov 22, 2024
0af0c52
Check contexts
MariusStorhaug Nov 22, 2024
60b4840
test: enhance GitHub context tests with verbose output
MariusStorhaug Nov 22, 2024
59775db
Get-GitHubContext now only returns the context with correct ID.
MariusStorhaug Nov 22, 2024
cf7d305
test
MariusStorhaug Nov 22, 2024
1a5cdde
test
MariusStorhaug Nov 22, 2024
b11eb58
Add GitHubContext class to manage GitHub API authentication details
MariusStorhaug Nov 22, 2024
e78dd98
Add XML format definitions for GitHubContext display in table and lis…
MariusStorhaug Nov 22, 2024
38bf104
Refactor GitHubContext constructor to accept PSCustomObject and updat…
MariusStorhaug Nov 22, 2024
c950fdd
Fix convertion from PSCustomObject to GitHubContext
MariusStorhaug Nov 22, 2024
dd597d4
Fix Get-GitHubConfig
MariusStorhaug Nov 22, 2024
09b6494
Fixes -ListAvailable for Get-GitHubContext
MariusStorhaug Nov 22, 2024
4848248
Enhance GitHub context management by renaming parameters, adding argu…
MariusStorhaug Nov 22, 2024
21bc568
Fix default context
MariusStorhaug Nov 22, 2024
ffe0bb4
Fix
MariusStorhaug Nov 22, 2024
8143bf3
Fix Get-GitHubContext
MariusStorhaug Nov 22, 2024
9a60b8c
Fix
MariusStorhaug Nov 22, 2024
ee9f4e4
Fix SetGitHubcontext
MariusStorhaug Nov 22, 2024
d4ba085
Check if we can swap context
MariusStorhaug Nov 22, 2024
e95823e
Many fixes :)
MariusStorhaug Nov 22, 2024
edcffc6
Fix test structure
MariusStorhaug Nov 23, 2024
7ae6dff
Add Remove-GitHubContext function to manage context removal
MariusStorhaug Nov 23, 2024
dc98156
Fix disconnect
MariusStorhaug Nov 23, 2024
2fe1da9
Refactor Disconnect-GitHubAccount to use context parameter and improv…
MariusStorhaug Nov 23, 2024
02cf8ce
Test
MariusStorhaug Nov 23, 2024
d7e1546
Add verbose logging for command execution start and end in GitHub con…
MariusStorhaug Nov 23, 2024
7a66aed
Add verbose logging for command execution in Get-GitHubViewer, Get-Gi…
MariusStorhaug Nov 23, 2024
0e047ba
Error with PSCallStack
MariusStorhaug Nov 23, 2024
9c676e7
Enhance error handling in Connect-GitHubAccount and Remove-GitHubConf…
MariusStorhaug Nov 23, 2024
4442756
test
MariusStorhaug Nov 23, 2024
476c2e5
test throw get error
MariusStorhaug Nov 23, 2024
2550442
throw record
MariusStorhaug Nov 23, 2024
33f456b
Enhance verbose logging in loader.ps1 to include module name, version…
MariusStorhaug Nov 23, 2024
58b8a74
Refactor verbose logging in loader.ps1 to output detailed invocation …
MariusStorhaug Nov 23, 2024
a2717b5
Fix
MariusStorhaug Nov 23, 2024
6f2631e
test
MariusStorhaug Nov 23, 2024
7e3b796
test
MariusStorhaug Nov 23, 2024
027f298
Simplify error handling in Set-GitHubContext by removing JSON convers…
MariusStorhaug Nov 23, 2024
4892855
Improve error handling in Set-GitHubContext by using Get-Error for mo…
MariusStorhaug Nov 23, 2024
9c92524
test
MariusStorhaug Nov 23, 2024
efdbe60
Test
MariusStorhaug Nov 23, 2024
6dc82ac
Enhance error reporting in Set-GitHubContext by adding verbose output…
MariusStorhaug Nov 23, 2024
1db140e
test
MariusStorhaug Nov 23, 2024
30ea3f9
run tests
MariusStorhaug Nov 23, 2024
11bb94d
test
MariusStorhaug Nov 23, 2024
fa87025
Refactor GitHub connection tests to remove debug preference and add v…
MariusStorhaug Nov 23, 2024
8a504fd
Update required module version to 3.0.4 in GitHub context functions
MariusStorhaug Nov 23, 2024
b1c90d2
Remove if the context exists
MariusStorhaug Nov 23, 2024
dc6c56e
test
MariusStorhaug Nov 23, 2024
bca62de
Fix
MariusStorhaug Nov 23, 2024
9bb623b
Simplify context setting in Set-GitHubContext function and improve er…
MariusStorhaug Nov 23, 2024
c079d43
Refactor GitHub connection tests to remove unnecessary script blocks
MariusStorhaug Nov 23, 2024
3bccd0c
Add verbose logging for secret information in Set-GitHubContext function
MariusStorhaug Nov 23, 2024
82c7ea8
test double pat
MariusStorhaug Nov 23, 2024
2bec003
Update GitHub context tests to use Get-GitHubContext with ListAvailab…
MariusStorhaug Nov 23, 2024
6577d63
Refactor Get-GitHubContext to streamline context retrieval and enhanc…
MariusStorhaug Nov 24, 2024
4bd249f
Update module requirement for GitHub context functions to version 3.1.0
MariusStorhaug Nov 24, 2024
bee95b9
Let it rip...
MariusStorhaug Nov 24, 2024
3d9671e
Update module requirement for Context to version 3.1.1 and enhance co…
MariusStorhaug Nov 24, 2024
865ae0b
Refactor Get-GitHubContext to improve default context retrieval and e…
MariusStorhaug Nov 24, 2024
1b456e0
Get context
MariusStorhaug Nov 24, 2024
b42277a
Replace Rename-Context with Set-Context for improved context manageme…
MariusStorhaug Nov 24, 2024
67cc8f1
Update Context module requirement to version 4.0.0 across all relevan…
MariusStorhaug Nov 24, 2024
256b6f6
Fix default context name
MariusStorhaug Nov 24, 2024
7e5ca69
Improve default context retrieval in Get-GitHubContext function
MariusStorhaug Nov 24, 2024
7f9ab58
Update test to use Get-GitHubContext with -ListAvailable for accurate…
MariusStorhaug Nov 24, 2024
1e60f40
Update test to reflect correct GitHub config ID
MariusStorhaug Nov 24, 2024
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 .github/workflows/Nightly-Run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ permissions:
pull-requests: write
statuses: write

env:
TEST_APP_CLIENT_ID: ${{ secrets.TEST_APP_CLIENT_ID }}
TEST_APP_PRIVATE_KEY: ${{ secrets.TEST_APP_PRIVATE_KEY }}
TEST_FG_PAT: ${{ secrets.TEST_FG_PAT }}
TEST_PAT: ${{ secrets.TEST_PAT }}

jobs:
Process-PSModule:
uses: PSModule/Process-PSModule/.github/workflows/CI.yml@v3
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/Process-PSModule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ permissions:
pages: write
id-token: write

env:
TEST_APP_CLIENT_ID: ${{ secrets.TEST_APP_CLIENT_ID }}
TEST_APP_PRIVATE_KEY: ${{ secrets.TEST_APP_PRIVATE_KEY }}
TEST_FG_PAT: ${{ secrets.TEST_FG_PAT }}
TEST_PAT: ${{ secrets.TEST_PAT }}

jobs:
Process-PSModule:
uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v3
Expand Down
86 changes: 86 additions & 0 deletions src/classes/public/GitHubContext.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
class GitHubContext {
# The API base URI.
# https://api.github.com
[string] $ApiBaseUri

# The GitHub API version.
# 2022-11-28
[string] $ApiVersion

# The authentication client ID.
# Client ID for UAT
[string] $AuthClientID

# The authentication type.
# UAT / PAT / App / IAT
[string] $AuthType

# Client ID for GitHub Apps
[string] $ClientID

# The device flow type.
# GitHubApp / OAuthApp
[string] $DeviceFlowType

# The API hostname.
# github.com / msx.ghe.com / github.local
[string] $HostName

# User ID / App ID as GraphQL Node ID
[string] $NodeID

# The Database ID of the context.
[string] $DatabaseID

# The context ID.
# HostName/Username or HostName/AppSlug
# Context:PSModule.Github/github.com/Octocat
[string] $ID

# The user name.
[string] $UserName

# The default value for the Owner parameter.
[string] $Owner

# The default value for the Repo parameter.
[string] $Repo

# The scope when authenticating with OAuth.
# 'gist read:org repo workflow'
[string] $Scope

# The token type.
# ghu / gho / ghp / github_pat / PEM / ghs /
[string] $TokenType

# The access token.
[securestring] $Token

# The token expiration date.
# 2024-01-01-00:00:00
[datetime] $TokenExpirationDate

# The refresh token.
[securestring] $RefreshToken

# The refresh token expiration date.
# 2024-01-01-00:00:00
[datetime] $RefreshTokenExpirationDate

GitHubContext([string]$ID) {
$this.ID = $ID
}

GitHubContext([hashtable]$Properties) {
foreach ($Property in $Properties.Keys) {
$this.$Property = $Properties.$Property
}
}

GitHubContext([PSCustomObject]$Object) {
$Object.PSObject.Properties | ForEach-Object {
$this.($_.Name) = $_.Value
}
}
}
131 changes: 131 additions & 0 deletions src/formats/GitHubContext.Format.ps1xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
<?xml version="1.0" encoding="utf-8"?>
<Configuration>
<ViewDefinitions>
<!-- Table View Definition -->
<View>
<Name>GitHubContextTableView</Name>
<ViewSelectedBy>
<TypeName>GitHubContext</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Label>UserName</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>HostName</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>AuthType</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>TokenType</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>TokenExpirationDate</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>Owner</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>Repo</Label>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<PropertyName>UserName</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>HostName</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>AuthType</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>TokenType</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>TokenExpirationDate</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Owner</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Repo</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>

<!-- List View Definition -->
<View>
<Name>GitHubContextListView</Name>
<ViewSelectedBy>
<TypeName>GitHubContext</TypeName>
</ViewSelectedBy>
<ListControl>
<ListEntries>
<ListEntry>
<ListItems>
<ListItem>
<PropertyName>HostName</PropertyName>
</ListItem>
<ListItem>
<PropertyName>UserName</PropertyName>
</ListItem>
<ListItem>
<PropertyName>AuthType</PropertyName>
</ListItem>
<ListItem>
<PropertyName>TokenType</PropertyName>
</ListItem>
<ListItem>
<PropertyName>TokenExpirationDate</PropertyName>
</ListItem>
<ListItem>
<PropertyName>Repo</PropertyName>
</ListItem>
<ListItem>
<PropertyName>Scope</PropertyName>
</ListItem>
<ListItem>
<PropertyName>ApiBaseUri</PropertyName>
</ListItem>
<ListItem>
<PropertyName>ApiVersion</PropertyName>
</ListItem>
<ListItem>
<PropertyName>AuthClientID</PropertyName>
</ListItem>
<ListItem>
<PropertyName>ClientID</PropertyName>
</ListItem>
<ListItem>
<PropertyName>DeviceFlowType</PropertyName>
</ListItem>
<ListItem>
<PropertyName>NodeID</PropertyName>
</ListItem>
<ListItem>
<PropertyName>DatabaseID</PropertyName>
</ListItem>
<ListItem>
<PropertyName>ID</PropertyName>
</ListItem>
<ListItem>
<PropertyName>Owner</PropertyName>
</ListItem>
<ListItem>
<PropertyName>RefreshTokenExpirationDate</PropertyName>
</ListItem>
</ListItems>
</ListEntry>
</ListEntries>
</ListControl>
</View>
</ViewDefinitions>
</Configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@
#>
[OutputType([bool])]
[CmdletBinding()]
param()
param(
[Parameter()]
[string] $Context = (Get-GitHubConfig -Name 'DefaultContext')
)

$tokenType = Get-GitHubConfig -Name 'SecretType' -ErrorAction SilentlyContinue
if ($tokenType -ne 'ghu_*') {
Write-Verbose 'The access token is not a user token. No need to refresh.'
return $false
}

$tokenExpirationDate = Get-GitHubConfig -Name 'SecretExpirationDate' -ErrorAction SilentlyContinue
$contextObj = Get-GitHubContext -Context $Context
$tokenExpirationDate = $contextObj.TokenExpirationDate
$currentDateTime = Get-Date
$remainingDuration = [datetime]$tokenExpirationDate - $currentDateTime

Expand Down
28 changes: 13 additions & 15 deletions src/functions/private/License/Get-GitHubRepositoryLicense.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,23 @@ filter Get-GitHubRepositoryLicense {
param (
# The account owner of the repository. The name is not case sensitive.
[Parameter()]
[string] $Owner = (Get-GitHubConfig -Name Owner),
[string] $Owner = (Get-GitHubContextSetting -Name Owner),

# The name of the repository without the .git extension. The name is not case sensitive.
[Parameter()]
[string] $Repo = (Get-GitHubConfig -Name Repo)
[string] $Repo = (Get-GitHubContextSetting -Name Repo)
)

process {
$inputObject = @{
APIEndpoint = "/repos/$Owner/$Repo/license"
Accept = 'application/vnd.github+json'
Method = 'GET'
}

Invoke-GitHubAPI @inputObject | ForEach-Object {
$Response = $_.Response
$rawContent = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($Response.content))
$Response | Add-Member -NotePropertyName 'raw_content' -NotePropertyValue $rawContent -Force
$Response
}
$inputObject = @{
APIEndpoint = "/repos/$Owner/$Repo/license"
Accept = 'application/vnd.github+json'
Method = 'GET'
}

Invoke-GitHubAPI @inputObject | ForEach-Object {
$Response = $_.Response
$rawContent = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($Response.content))
$Response | Add-Member -NotePropertyName 'raw_content' -NotePropertyValue $rawContent -Force
$Response
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
param (
# The account owner of the repository. The name is not case sensitive.
[Parameter()]
[string] $Owner = (Get-GitHubConfig -Name Owner),
[string] $Owner = (Get-GitHubContextSetting -Name Owner),

# The name of the repository without the .git extension. The name is not case sensitive.
[Parameter()]
[string] $Repo = (Get-GitHubConfig -Name Repo),
[string] $Repo = (Get-GitHubContextSetting -Name Repo),

# The unique identifier of the asset.
[Parameter(Mandatory)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
param (
# The account owner of the repository. The name is not case sensitive.
[Parameter()]
[string] $Owner = (Get-GitHubConfig -Name Owner),
[string] $Owner = (Get-GitHubContextSetting -Name Owner),

# The name of the repository without the .git extension. The name is not case sensitive.
[Parameter()]
[string] $Repo = (Get-GitHubConfig -Name Repo),
[string] $Repo = (Get-GitHubContextSetting -Name Repo),

# The unique identifier of the release.
[Parameter(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
param (
# The account owner of the repository. The name is not case sensitive.
[Parameter()]
[string] $Owner = (Get-GitHubConfig -Name Owner),
[string] $Owner = (Get-GitHubContextSetting -Name Owner),

# The name of the repository without the .git extension. The name is not case sensitive.
[Parameter()]
[string] $Repo = (Get-GitHubConfig -Name Repo),
[string] $Repo = (Get-GitHubContextSetting -Name Repo),

# The number of results per page (max 100).
[Parameter(ParameterSetName = 'AllUsers')]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
param (
# The account owner of the repository. The name is not case sensitive.
[Parameter()]
[string] $Owner = (Get-GitHubConfig -Name Owner),
[string] $Owner = (Get-GitHubContextSetting -Name Owner),

# The name of the repository without the .git extension. The name is not case sensitive.
[Parameter()]
[string] $Repo = (Get-GitHubConfig -Name Repo),
[string] $Repo = (Get-GitHubContextSetting -Name Repo),

# The unique identifier of the release.
[Parameter(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
param (
# The account owner of the repository. The name is not case sensitive.
[Parameter()]
[string] $Owner = (Get-GitHubConfig -Name Owner),
[string] $Owner = (Get-GitHubContextSetting -Name Owner),

# The name of the repository without the .git extension. The name is not case sensitive.
[Parameter()]
[string] $Repo = (Get-GitHubConfig -Name Repo),
[string] $Repo = (Get-GitHubContextSetting -Name Repo),

# The name of the tag to get a release from.
[Parameter(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
param (
# The account owner of the repository. The name is not case sensitive.
[Parameter()]
[string] $Owner = (Get-GitHubConfig -Name Owner),
[string] $Owner = (Get-GitHubContextSetting -Name Owner),

# The name of the repository without the .git extension. The name is not case sensitive.
[Parameter()]
[string] $Repo = (Get-GitHubConfig -Name Repo)
[string] $Repo = (Get-GitHubContextSetting -Name Repo)

)

Expand Down
Loading