Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
262 commits
Select commit Hold shift + click to select a range
e2273db
🚀 [Refactor]: Update Size calculation in GitHubRepository format to u…
MariusStorhaug May 4, 2025
594bd12
🚀 [Refactor]: Replace REST API call with GraphQL query in Get-GitHubR…
MariusStorhaug May 4, 2025
f3393d0
🚀 [Refactor]: Add -Debug and -Verbose parameters to Get-GitHubReposit…
MariusStorhaug May 4, 2025
bb0e508
🚀 [Refactor]: Return the raw repository object in Get-GitHubRepositor…
MariusStorhaug May 4, 2025
16e35f8
🚀 [Refactor]: Update Invoke-GitHubGraphQLQuery output to return the r…
MariusStorhaug May 4, 2025
d6e4538
🚀 [Refactor]: Update output of Invoke-GitHubGraphQLQuery to return a …
MariusStorhaug May 4, 2025
4bd105c
🚀 [Refactor]: Update alias parameters in Get-GitHubRepositoryCustomPr…
MariusStorhaug May 5, 2025
5932c35
🚀 [Refactor]: Introduce Get-GitHubRepositoryListByUser filter for lis…
MariusStorhaug May 5, 2025
b311f21
🚀 [Refactor]: Add alias for Owner parameter in Get-GitHubRepository t…
MariusStorhaug May 5, 2025
93001f8
🚀 [Refactor]: Rename Get-GitHubRepositoryListByUser to Get-GitHubRepo…
MariusStorhaug May 5, 2025
d394aac
🚀 [Refactor]: Update Get-GitHubRepository to set Owner from Context.U…
MariusStorhaug May 5, 2025
3700665
🚀 [Refactor]: Update Get-GitHubRepository to set Owner from Context.U…
MariusStorhaug May 5, 2025
7f92021
🚀 [Refactor]: Add Visibility and Affiliations parameters to Get-GitHu…
MariusStorhaug May 5, 2025
15e1484
🚀 [Refactor]: Convert Affiliations and Visibility parameters to upper…
MariusStorhaug May 5, 2025
95af715
🚀 [Refactor]: Update output handling in Get-GitHubRepositoryByName an…
MariusStorhaug May 5, 2025
777f38e
🚀 [Refactor]: Update output handling in Get-GitHubRepositoryByName an…
MariusStorhaug May 5, 2025
fdffc46
🚀 [Refactor]: Update Get-GitHubRepository test cases to use Write-Hos…
MariusStorhaug May 5, 2025
83658f9
🚀 [Refactor]: Update verbose output formatting in Get-GitHubRepositor…
MariusStorhaug May 5, 2025
5e5379e
🚀 [Refactor]: Simplify output handling in Get-GitHubRepositoryByName,…
MariusStorhaug May 5, 2025
300980b
🚀 [Refactor]: Update Get-GitHubRepositoryByName and Get-GitHubReposit…
MariusStorhaug May 5, 2025
f125ae6
🚀 [Refactor]: Remove Write-Debug statements from Get-GitHubRepository…
MariusStorhaug May 5, 2025
86771ca
🚀 [Refactor]: Uncomment assignment of Owner property in GitHubReposit…
MariusStorhaug May 5, 2025
45c0de0
🚀 [Refactor]: Uncomment assignment of Language and License properties…
MariusStorhaug May 5, 2025
4fa2924
🚀 [Refactor]: Uncomment assignments in GitHubRepository to ensure pro…
MariusStorhaug May 5, 2025
ec3a23b
🚀 [Refactor]: Comment out CloneUrl and GitUrl assignments in GitHubRe…
MariusStorhaug May 5, 2025
9d7a6b5
🚀 [Refactor]: Uncomment CloneUrl and GitUrl assignments in GitHubRepo…
MariusStorhaug May 5, 2025
6939d9c
🚀 [Refactor]: Comment out assignment of Permissions in GitHubReposito…
MariusStorhaug May 5, 2025
9b5ae76
🚀 [Refactor]: Uncomment assignment of Visibility in GitHubRepository …
MariusStorhaug May 5, 2025
38105b1
🚀 [Refactor]: Uncomment TemplateRepository, ForkParent, and ForkSourc…
MariusStorhaug May 5, 2025
30da81d
🚀 [Refactor]: Simplify permission string conversion in GitHubReposito…
MariusStorhaug May 5, 2025
339ae8c
🚀 [Refactor]: Replace switch statement with if-else conditions for pe…
MariusStorhaug May 5, 2025
d1cf78a
🚀 [Refactor]: Ensure permission string is converted to lowercase in G…
MariusStorhaug May 5, 2025
d1566fb
🚀 [Refactor]: Remove unnecessary object instantiation for GitHubRepos…
MariusStorhaug May 5, 2025
6b7f488
🚀 [Refactor]: Remove commented-out object instantiation for GitHubRep…
MariusStorhaug May 5, 2025
0f34fd8
🚀 [Test]: Enhance Get-GitHubRepository test by adding -Verbose and -D…
MariusStorhaug May 5, 2025
1bbd67f
🚀 [Refactor]: Update visibility parameter handling in Get-GitHubRepos…
MariusStorhaug May 5, 2025
a095fef
🚀 [Refactor]: Initialize pagination variables and resolve PerPage set…
MariusStorhaug May 5, 2025
c978446
🚀 [Refactor]: Update GitHubRepository instantiation in Get-GitHubRepo…
MariusStorhaug May 5, 2025
8947c15
🚀 [Refactor]: Update GitHubRepository constructor to accept $Owner pa…
MariusStorhaug May 5, 2025
3e7db01
🚀 [Enhancement]: Add diskUsage field to query in Get-GitHubRepository…
MariusStorhaug May 5, 2025
3773099
🚀 [Refactor]: Simplify GitHubRepository constructor by removing $Owne…
MariusStorhaug May 5, 2025
b66eae7
🚀 [Refactor]: Clean up Get-GitHubMyRepositories and introduce Get-Git…
MariusStorhaug May 5, 2025
c142a93
🚀 [Enhancement]: Expand repository query in Get-GitHubMyRepositoryByN…
MariusStorhaug May 5, 2025
d6f42eb
🚀 [Enhancement]: Update Get-GitHubMyRepositoryByName to include addit…
MariusStorhaug May 5, 2025
e595c08
🚀 [Refactor]: Remove redundant test case for forked repository and en…
MariusStorhaug May 5, 2025
9df9cbf
🚀 [Enhancement]: Update $Affiliation parameter in Get-GitHubMyReposit…
MariusStorhaug May 5, 2025
5b9dd92
🚀 [Refactor]: Add suppress message attributes for variable scoping is…
MariusStorhaug May 5, 2025
29357ad
🚀 [Enhancement]: Add -Verbose and -Debug parameters to Get-GitHubRepo…
MariusStorhaug May 6, 2025
ea2735b
🚀 [Enhancement]: Update $Affiliation and $OwnerAffiliations parameter…
MariusStorhaug May 6, 2025
8b1849b
🚀 [Refactor]: Update $Affiliation parameter in Get-GitHubRepository t…
MariusStorhaug May 6, 2025
648fbf6
🚀 [Enhancement]: Add -Debug parameter to Get-GitHubRepository calls i…
MariusStorhaug May 6, 2025
e431cf0
🚀 [Enhancement]: Update $PerPage parameter in Get-GitHubRepository to…
MariusStorhaug May 6, 2025
87f28be
🚀 [Enhancement]: Add -Debug parameter to Get-GitHubRepository call in…
MariusStorhaug May 6, 2025
53dfca5
🚀 [Enhancement]: Add debug output in Get-GitHubRepository for improve…
MariusStorhaug May 6, 2025
b79242c
🚀 [Refactor]: Simplify affiliation and visibility parameter handling …
MariusStorhaug May 6, 2025
235effa
🚀 [Refactor]: Remove -Debug parameter from Get-GitHubRepository calls…
MariusStorhaug May 6, 2025
dc7abf5
🚀 [Refactor]: Reduce the number of repository topics retrieved in Get…
MariusStorhaug May 6, 2025
628d7bb
🚀 [Enhancement]: Add AdditionalProperties parameter to repository que…
MariusStorhaug May 8, 2025
0b2f4d6
🚀 [Refactor]: Rename AdditionalProperties parameter to AdditionalProp…
MariusStorhaug May 8, 2025
f634c75
🚀 [Enhancement]: Add test for Get-GitHubRepository to retrieve additi…
MariusStorhaug May 8, 2025
aa2114e
🚀 [Enhancement]: Add -Debug parameter to Get-GitHubRepository calls f…
MariusStorhaug May 10, 2025
bb544cb
Merge branch 'repo' of https://github.com/PSModule/GitHub into repo
MariusStorhaug May 10, 2025
ee9bdb1
🚀 [Fix]: Remove -Debug parameter from Get-GitHubRepository calls in t…
MariusStorhaug May 10, 2025
897191e
🚀 [Enhancement]: Add -Debug parameter to Get-GitHubRepository calls i…
MariusStorhaug May 10, 2025
b584b76
🚀 [Enhancement]: Introduce Property and AdditionalProperty parameters…
MariusStorhaug May 10, 2025
d710ade
🚀 [Fix]: Update AdditionalProperty casing in Get-GitHubRepository cal…
MariusStorhaug May 10, 2025
25c5491
🚀 [Fix]: Update PerPage parameter validation to ensure a minimum valu…
MariusStorhaug May 10, 2025
228c50d
🚀 [Refactor]: Rename Property parameter to PropertyList for consisten…
MariusStorhaug May 10, 2025
a2fa5a1
🚀 [Fix]: Ensure non-empty property names are processed in ConvertTo-G…
MariusStorhaug May 10, 2025
0a99ed6
🚀 [Fix]: Simplify error handling in Invoke-GitHubGraphQLQuery by remo…
MariusStorhaug May 10, 2025
cdfc73b
🚀 [Fix]: Remove HasPages property from GitHubRepository class and imp…
MariusStorhaug May 10, 2025
313b963
🚀 [Fix]: Update Get-GitHubRepository tests to remove unnecessary repo…
MariusStorhaug May 10, 2025
60c2a74
🚀 [Enhancement]: Update Get-GitHubRepository to include detailed comm…
MariusStorhaug May 10, 2025
f4495ab
🚀 [Fix]: Update Get-GitHubRepository tests to iterate over repository…
MariusStorhaug May 10, 2025
d89d1c1
🚀 [Enhancement]: Add test for Update-GitHubRepository to verify repos…
MariusStorhaug May 10, 2025
be61030
🚀 [Fix]: Simplify Update-GitHubRepository test by removing unnecessar…
MariusStorhaug May 11, 2025
42e7e8a
🚀 [Fix]: Remove 'HasPages' property from Get-GitHubMyRepositoryByName…
MariusStorhaug May 11, 2025
2affdda
🚀 [Enhancement]: Update visibility parameter values in Set-GitHubSecr…
MariusStorhaug May 11, 2025
c5d3d3e
🚀 [Refactor]: Update visibility handling in repository functions to u…
MariusStorhaug May 11, 2025
358fe55
🚀 [Refactor]: Change parameter types from 'switch' to 'bool' for cons…
MariusStorhaug May 11, 2025
7196b6d
🚀 [Fix]: Remove 'IsDisabled' property from Get-GitHubMyRepositoryByNa…
MariusStorhaug May 11, 2025
d9d0771
🚀 [Enhancement]: Add repository cleanup logic in test cases for user …
MariusStorhaug May 11, 2025
2f25e2b
🚀 [Enhancement]: Make the Owner parameter optional in Update-GitHubRe…
MariusStorhaug May 11, 2025
08324c3
🚀 [Test]: Add test case for renaming a repository in Update-GitHubRep…
MariusStorhaug May 11, 2025
30519f5
🚀 [Enhancement]: Update parameter names and values for consistency in…
MariusStorhaug May 11, 2025
c15b9fc
🚀 [Refactor]: Remove unused parameters from New-GitHubRepository func…
MariusStorhaug May 12, 2025
1dc011c
🚀 [Enhancement]: Set default values for repository parameters in New-…
MariusStorhaug May 12, 2025
8d3667c
🚀 [Enhancement]: Capture and log repository details after creation in…
MariusStorhaug May 12, 2025
7c59295
🚀 [Enhancement]: Update parameter types for repository settings in Up…
MariusStorhaug May 12, 2025
4a63d79
🚀 [Refactor]: Update parameter names for clarity in New-GitHubReposit…
MariusStorhaug May 12, 2025
eb0da4e
🚀 [Enhancement]: Rename parameter for secret scanning in Update-GitHu…
MariusStorhaug May 12, 2025
462a1b7
🚀 [Enhancement]: Add parameters for discussions and sponsorships in U…
MariusStorhaug May 12, 2025
6571e26
🚀 [Refactor]: Remove unused parameter 'NewName' from update parameter…
MariusStorhaug May 12, 2025
ee613fe
🚀 [Enhancement]: Update GraphQL mutation fields in Update-GitHubRepos…
MariusStorhaug May 12, 2025
a58f6bb
🚀 [Enhancement]: Update New-GitHubRepository calls in tests to use -D…
MariusStorhaug May 12, 2025
a25c973
🚀 [Refactor]: Change boolean parameters in Update-GitHubRepository to…
MariusStorhaug May 12, 2025
cd99714
🚀 [Refactor]: Update FullName assignment to use string interpolation …
MariusStorhaug May 12, 2025
0fb5c41
🚀 [Refactor]: Simplify GraphQL mutation structure in Update-GitHubRep…
MariusStorhaug May 12, 2025
f6e9ab2
🚀 [Refactor]: Update GraphQL mutation syntax in Update-GitHubReposito…
MariusStorhaug May 12, 2025
8d56533
🚀 [Enhancement]: Update parameter validation sets in Update-GitHubRep…
MariusStorhaug May 12, 2025
f31b209
🚀 [Refactor]: Update parameter names in Update-GitHubRepository for c…
MariusStorhaug May 12, 2025
b613382
🚀 [Refactor]: Update parameter name from 'Repo' to 'Name' in New-GitH…
MariusStorhaug May 12, 2025
a14553c
🚀 [Refactor]: Update parameters in New-GitHubRepository and Update-Gi…
MariusStorhaug May 12, 2025
9e7ff6e
🚀 [Refactor]: Simplify and enhance readability of repository creation…
MariusStorhaug May 12, 2025
822b6a7
🚀 [Refactor]: Update repository response handling in Update-GitHubRep…
MariusStorhaug May 12, 2025
29935c2
🚀 [Refactor]: Enhance debugging output and improve parameter handling…
MariusStorhaug May 12, 2025
cb448c3
🚀 [Enhancement]: Add retrieval of updated repository details in Updat…
MariusStorhaug May 12, 2025
27f997b
🚀 [Enhancement]: Add retry logic to Invoke-GitHubAPI in Update-GitHub…
MariusStorhaug May 13, 2025
4be41b3
🚀 [Refactor]: Simplify repository update logic by removing redundant …
MariusStorhaug May 14, 2025
eae623c
🚀 [Refactor]: Update repository handling in Update-GitHubRepository t…
MariusStorhaug May 14, 2025
add48c5
🚀 [Test]: Add assertion for FullName property in Get-GitHubRepository…
MariusStorhaug May 14, 2025
4bfe78c
🚀 [Refactor]: Update repository handling in Update-GitHubRepository t…
MariusStorhaug May 14, 2025
f7943dc
🚀 [Enhancement]: Add repository existence check in Update-GitHubRepos…
MariusStorhaug May 14, 2025
98701f5
🚀 [Refactor]: Simplify context retrieval in Resolve-GitHubContext by …
MariusStorhaug May 15, 2025
4d6b831
🚀 [Fix]: Correct condition for setting FullName in GitHubRepository t…
MariusStorhaug May 15, 2025
f44b3a4
🚀 [Fix]: Update FullName assignment in GitHubRepository to use owner …
MariusStorhaug May 15, 2025
56361a0
🚀 [Fix]: Update condition for setting FullName in GitHubRepository to…
MariusStorhaug May 15, 2025
0e86c37
🚀 [Refactor]: Improve context retrieval logic in Resolve-GitHubContex…
MariusStorhaug May 15, 2025
4ada39d
🚀 [Refactor]: Simplify context resolution logic in Resolve-GitHubCont…
MariusStorhaug May 15, 2025
bf7f77e
🚀 [Fix]: Update FullName assignment in GitHubRepository to correctly …
MariusStorhaug May 15, 2025
c928bcb
🚀 [Refactor]: Remove unnecessary quotes from command names in argumen…
MariusStorhaug May 15, 2025
591434e
cleanup
MariusStorhaug May 16, 2025
f931a8b
🚀 [Refactor]: Enhance argument completers for Get-GitHubRepository by…
MariusStorhaug May 16, 2025
0c98537
🚀 [Add]: Implement argument completers for GitHubOrganization to enha…
MariusStorhaug May 16, 2025
b33d167
🚀 [Fix]: Correct formatting in verbose output for default ClientID in…
MariusStorhaug May 16, 2025
fcd1003
Add splatting example and refine Set-GitHubRepository
MariusStorhaug May 17, 2025
99b6081
Add test
MariusStorhaug May 17, 2025
406f01a
Merge branch 'main' of https://github.com/PSModule/GitHub into codex/…
MariusStorhaug May 20, 2025
fabc1e4
🚀 [Feature]: Enhance `New-GitHubRepository` with detailed parameter s…
MariusStorhaug May 20, 2025
d9b5162
🚀 [Feature]: Refactor `Set-GitHubRepository` and `Update-GitHubReposi…
MariusStorhaug May 21, 2025
47d0ebf
🩹 [Patch]: Fix repository update tests by using the correct updated r…
MariusStorhaug May 21, 2025
ad6f6ec
🩹 [Patch]: Add -Debug parameter to New-GitHubRepository calls in repo…
MariusStorhaug May 21, 2025
fddd20b
🩹 [Patch]: Comment out existing tests for Set-GitHubRepository to pre…
MariusStorhaug May 23, 2025
df05604
🚀 [Feature]: Add support for creating repositories from templates and…
MariusStorhaug May 23, 2025
98610b6
🩹 [Patch]: Fix variable reference in repository update test to ensure…
MariusStorhaug May 23, 2025
469c0b3
🩹 [Patch]: Update repository property checks in tests to include addi…
MariusStorhaug May 23, 2025
03a6c88
🩹 [Patch]: Update parameter attributes for repository creation to enf…
MariusStorhaug May 23, 2025
6804ce5
🩹 [Patch]: Enforce mandatory parameters for organization repository c…
MariusStorhaug May 23, 2025
e62ad36
🩹 [Patch]: Restore and enable tests for updating and creating reposit…
MariusStorhaug May 23, 2025
59bd2b5
🩹 [Patch]: Enforce mandatory parameters for repository creation in Ne…
MariusStorhaug May 23, 2025
f795c8c
Refactor Set-GitHubRepository to streamline parameter handling and im…
MariusStorhaug May 23, 2025
f3c3805
🩹 [Patch]: Remove null or empty values from parameters before creatin…
MariusStorhaug May 23, 2025
3668b8f
🩹 [Patch]: Fix parameter handling in Set-GitHubRepository to correctl…
MariusStorhaug May 23, 2025
e2a0260
Refactor Set-GitHubRepository to improve code readability by adjustin…
MariusStorhaug May 23, 2025
9e6639c
🩹 [Patch]: Remove unnecessary description parameter from Set-GitHubRe…
MariusStorhaug May 23, 2025
d76d657
Refactor Set-GitHubRepository to improve parameter handling and strea…
MariusStorhaug May 23, 2025
472a20e
Add tests for Set-GitHubRepository to create and update repositories …
MariusStorhaug May 23, 2025
749e906
Refactor Set-GitHubRepository parameters to use nullable boolean type…
MariusStorhaug May 23, 2025
84286ee
Add -Debug parameter to Set-GitHubRepository calls in repository test…
MariusStorhaug May 23, 2025
68527af
Add tracing for parameter binding in Set-GitHubRepository calls for t…
MariusStorhaug May 25, 2025
a759ebb
Refactor parameter sets in New-GitHubRepository and Set-GitHubReposit…
MariusStorhaug May 25, 2025
b214284
Add debug logging for parameters in Set-GitHubRepository
MariusStorhaug May 25, 2025
f4597cc
Refactor repository tests to update property checks and enhance fork …
MariusStorhaug May 25, 2025
35238d6
Enhance debugging output in Invoke-GitHubAPI and remove -Debug parame…
MariusStorhaug May 25, 2025
a63eebd
Add conditional debug logging in Invoke-GitHubAPI for improved tracea…
MariusStorhaug May 25, 2025
de11767
Update DefaultBranch query to include additional fields for improved …
MariusStorhaug May 25, 2025
b876336
Fixes
MariusStorhaug May 25, 2025
b084635
Add DeploymentsUrl property and update environment URL generation in …
MariusStorhaug May 25, 2025
fb49b57
Refactor debug logging in Invoke-GitHubAPI for improved clarity and c…
MariusStorhaug May 25, 2025
0767b2b
Remove DeploymentsUrl property from GitHubEnvironment class and clean…
MariusStorhaug May 25, 2025
97e3724
Fix debug logging in Invoke-GitHubAPI to ensure proper string convers…
MariusStorhaug May 25, 2025
3b7f1c0
Refactor debug logging in Invoke-GitHubAPI to improve request body fo…
MariusStorhaug May 25, 2025
e4dd420
Fix debug logging in Invoke-GitHubAPI to remove unnecessary string co…
MariusStorhaug May 25, 2025
5e26494
Enhance debug logging in Invoke-GitHubAPI for improved clarity and co…
MariusStorhaug May 25, 2025
395b73f
Improve debug logging in Invoke-GitHubAPI and Get-GitHubRepository by…
MariusStorhaug May 25, 2025
91f5ed2
Fix debug logging in Invoke-GitHubAPI by removing unnecessary body co…
MariusStorhaug May 25, 2025
7d36fa4
Fix debug logging in Invoke-GitHubAPI by correcting line breaks in re…
MariusStorhaug May 25, 2025
4c0c461
Enhance debug logging in Update-GitHubRepository by adding conditiona…
MariusStorhaug May 25, 2025
ba78c11
Fix debug logging in Invoke-GitHubAPI by standardizing line breaks in…
MariusStorhaug May 25, 2025
f5065dc
Add Context parameter to update parameters in New-GitHubRepository fo…
MariusStorhaug May 25, 2025
621a6d8
Refactor debug logging in Invoke-GitHubAPI and Update-GitHubRepositor…
MariusStorhaug May 25, 2025
4a509c5
Fix debug logging in Invoke-GitHubAPI by removing commented-out line …
MariusStorhaug May 25, 2025
040c33d
Refactor Get-GitHubRepository and Repositories.Tests to remove unnece…
MariusStorhaug May 25, 2025
97dbdeb
Fix IsTemplate property assertions in Repositories.Tests to reflect c…
MariusStorhaug May 25, 2025
096c931
Update fork owner and repository name in Repositories.Tests for accur…
MariusStorhaug May 25, 2025
473a61c
Fix repository property assertions in Repositories.Tests to ensure co…
MariusStorhaug May 25, 2025
5f8c604
Fix repository language assertion in Repositories.Tests to reflect co…
MariusStorhaug May 25, 2025
b317cea
Fix repository issue and wiki flags in Repositories.Tests to reflect …
MariusStorhaug May 25, 2025
ff30baf
Add missing line break in Repositories.Tests for improved readability
MariusStorhaug May 25, 2025
3b55df4
Refactor repository properties in GitHubRepository and related functi…
MariusStorhaug May 25, 2025
f43c04d
Fix repository properties assertions in Repositories.Tests to reflect…
MariusStorhaug May 25, 2025
a64fc60
Uncomment and enable test for updating an existing repository in Repo…
MariusStorhaug May 26, 2025
6ec9e81
Uncomment and enable tests for creating a new repository in Repositor…
MariusStorhaug May 26, 2025
ac3f5a1
qwe
MariusStorhaug May 26, 2025
5074e16
qwe
MariusStorhaug May 26, 2025
70e25f6
123
MariusStorhaug May 26, 2025
f0434bd
qwe
MariusStorhaug May 26, 2025
cd9939b
Update repository tests to assert HasDiscussions as false
MariusStorhaug May 26, 2025
c0a7359
Remove assertions for HasDiscussions in repository tests
MariusStorhaug May 26, 2025
3982aa2
Add tests for creating and updating repositories from templates and f…
MariusStorhaug May 26, 2025
c771dab
Refactor Set-GitHubRepository to use conditional parameters for Inclu…
MariusStorhaug May 26, 2025
f863687
Fix logging of request headers in Invoke-GitHubAPI to use Format-List…
MariusStorhaug May 26, 2025
42fa75b
Add test for New-GitHubRepository with various settings and properties
MariusStorhaug May 26, 2025
168ec27
Refactor New-GitHubRepository calls to use parameter splatting for im…
MariusStorhaug May 26, 2025
ae4a22a
Improve logging of request body in Invoke-GitHubAPI by removing unnec…
MariusStorhaug May 26, 2025
c3f4045
Fix logging of request headers in Invoke-GitHubAPI to ensure consiste…
MariusStorhaug May 26, 2025
9b7c8f7
Update request body logging in Invoke-GitHubAPI to improve readabilit…
MariusStorhaug May 26, 2025
c2dd8ee
Refactor request body logging in Invoke-GitHubAPI for improved readab…
MariusStorhaug May 26, 2025
175a324
qwe
MariusStorhaug May 26, 2025
0c8a8ba
Add debug logging for repository updates in New-GitHubRepository and …
MariusStorhaug May 26, 2025
0104944
Fix request body logging in Invoke-GitHubAPI to ensure correct line s…
MariusStorhaug May 26, 2025
f624284
Suppress output of Invoke-GitHubGraphQLQuery in Update-GitHubReposito…
MariusStorhaug May 26, 2025
ff8af7b
Update repository name assertions in Repositories.Tests to include '-…
MariusStorhaug May 26, 2025
916f5a9
Update repository visibility assertion in Repositories.Tests to refle…
MariusStorhaug May 26, 2025
d1db9c1
Add support for repository sponsorships in GitHubRepository class
MariusStorhaug May 26, 2025
7efa61a
Add 'HasSponsorships' field to repository metadata queries
MariusStorhaug May 27, 2025
ad599fb
Add 'autoMergeAllowed' parameter to Update-GitHubRepository and remov…
MariusStorhaug May 27, 2025
2d1adfa
fix
MariusStorhaug May 27, 2025
968b1f0
Fix GraphQL error handling to convert extensions to JSON format for b…
MariusStorhaug May 27, 2025
cbaf667
Fix output formatting for GraphQL error extensions in Invoke-GitHubGr…
MariusStorhaug May 27, 2025
d34a2f7
Add full error details to GraphQL error handling in Invoke-GitHubGrap…
MariusStorhaug May 27, 2025
e87bae6
Improve error handling in Invoke-GitHubGraphQLQuery by adding debug o…
MariusStorhaug May 27, 2025
4a33dd5
Refine GraphQL error handling by improving formatting of error locati…
MariusStorhaug May 27, 2025
4f0e2b6
Enhance GraphQL error handling by including query line context in err…
MariusStorhaug May 27, 2025
4ac1b77
Refine error message formatting in Invoke-GitHubGraphQLQuery to ensur…
MariusStorhaug May 27, 2025
4b684cb
Refine formatting of full error output in Invoke-GitHubGraphQLQuery f…
MariusStorhaug May 27, 2025
ca7ae0c
Refine error output formatting in Invoke-GitHubGraphQLQuery by removi…
MariusStorhaug May 27, 2025
1835654
Refine error handling in Invoke-GitHubGraphQLQuery to ensure full err…
MariusStorhaug May 27, 2025
806522d
Add debug output to New-GitHubRepository calls for enhanced troublesh…
MariusStorhaug May 27, 2025
2daedaf
Refine error handling in Invoke-GitHubGraphQLQuery by simplifying err…
MariusStorhaug May 27, 2025
ad4e02c
Remove autoMergeAllowed parameter from Update-GitHubRepository input …
MariusStorhaug May 27, 2025
b8f47e1
Change parameter types in New-GitHubRepository to use nullable bool f…
MariusStorhaug May 27, 2025
7c30cf7
Refactor request body output in Invoke-GitHubAPI to use Out-String -S…
MariusStorhaug May 27, 2025
469e46a
Refactor merge commit handling in Update-GitHubRepository to utilize …
MariusStorhaug May 27, 2025
fc99003
Update repository tests to comment out AllowAutoMerge assertion and c…
MariusStorhaug May 27, 2025
3cfcb84
qwe
MariusStorhaug May 28, 2025
2f90ee4
qwe
MariusStorhaug May 28, 2025
23ad90d
Refactor debug output in Invoke-GitHubGraphQLQuery and Set-GitHubRepo…
MariusStorhaug May 28, 2025
bf2b9b3
Refactor debug output in Invoke-GitHubAPI to improve readability and …
MariusStorhaug May 28, 2025
ff2a669
Add AllowForking parameter to New-GitHubRepository for enhanced repos…
MariusStorhaug May 28, 2025
51ac0f0
Update repository tests to check for HasWiki property instead of HasD…
MariusStorhaug May 28, 2025
6ff4cfb
Add -Debug parameter to Set-GitHubRepository calls in repository test…
MariusStorhaug May 28, 2025
e2574e3
Enhance debug output in Set-GitHubRepository to include configuration…
MariusStorhaug May 29, 2025
f8b973c
Add Trace-Command for debugging Set-GitHubRepository calls in reposit…
MariusStorhaug May 29, 2025
f106615
Refactor Trace-Command usage in repository tests to include multiple …
MariusStorhaug May 29, 2025
8357431
Refactor repository tests to use parameters for HasWiki and HasIssues…
MariusStorhaug May 29, 2025
eba4a14
Retrieve existing repository details in Set-GitHubRepository function…
MariusStorhaug May 29, 2025
0e9f03b
Remove -Debug flag from New-GitHubRepository and Set-GitHubRepository…
MariusStorhaug May 29, 2025
0a9d9c3
Replace Write-Debug with Write-Verbose in New-GitHubRepository and Se…
MariusStorhaug May 29, 2025
9951203
Add visibility parameter handling for template-based repository creat…
MariusStorhaug May 29, 2025
37644ea
Update visibility parameter handling in Set-GitHubRepository to condi…
MariusStorhaug May 29, 2025
f2e341f
Add verbose output for repository updates in tests and suppress debug…
MariusStorhaug May 29, 2025
e04e50c
Add comprehensive Pester tests for GitHub API interactions
MariusStorhaug May 29, 2025
4c72e98
Add -Debug flag to Set-GitHubSecret and Set-GitHubVariable for enhanc…
MariusStorhaug May 29, 2025
ff0c3ae
Refactor repository name handling in tests for clarity and consistency
MariusStorhaug May 29, 2025
3337d8f
Fix test assertion for repository template status in Repositories.Tests
MariusStorhaug May 29, 2025
0c74721
Update repository language assertions and remove redundant fork test …
MariusStorhaug May 29, 2025
6632acb
Update repository language assertions and adjust fork repository chec…
MariusStorhaug May 30, 2025
a0ce461
Refactor Set-GitHubRepository test for fork creation and updates to i…
MariusStorhaug May 30, 2025
473e97c
Update fork parameters in Set-GitHubRepository test for consistency a…
MariusStorhaug May 30, 2025
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
21 changes: 21 additions & 0 deletions examples/Repositories.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
$param = @{
Name = 'test-repo2'
Description = 'This is a test repository'
Visibility = 'Public'
AddReadme = $true
GitIgnore = 'VisualStudio'
License = 'mit'
HasIssues = $true
HasWiki = $false
HasProjects = $false
}

New-GitHubRepository @param -Debug

$repo = Get-GitHubRepository -Name 'test-repo2'
$repo2 = Update-GitHubRepository -Name 'test-repo2' -Homepage 'https://example123.com'

$diff = $repo | Compare-PSCustomObject $repo2 -OnlyChanged
$diff.Property | Should -BeIn ('Homepage', 'UpdatedAt')


10 changes: 10 additions & 0 deletions examples/Repositories/Set-GitHubRepository.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
$params = @{
Owner = 'octocat'
Name = 'Hello-World'
AllowSquashMergingWith = 'Pull request title and description'
HasIssues = $true
SuggestUpdateBranch = $true
AllowAutoMerge = $true
DeleteBranchOnMerge = $true
}
Set-GitHubRepository @params
1 change: 0 additions & 1 deletion src/classes/public/Environment/GitHubEnvironment.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
$this.ID = $Object.id
$this.NodeID = $Object.node_id
$this.Name = $Object.name
$this.Url = $Object.html_url
$this.Owner = $Owner
$this.Repository = $Repository
$this.CreatedAt = $Object.created_at
Expand Down
20 changes: 10 additions & 10 deletions src/classes/public/Repositories/GitHubRepository.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@
# Example: true
[System.Nullable[bool]] $HasDiscussions

# Whether sponsorships are enabled.
# Example: false
[System.Nullable[bool]] $HasSponsorships

# Indicates whether the repository is archived.
# Example: false
[System.Nullable[bool]] $IsArchived
Expand Down Expand Up @@ -175,10 +179,7 @@
[GithubRepository] $TemplateRepository

# The repository this repository was forked from.
[GithubRepository] $ForkParent

# The ultimate source for the fork network.
[GithubRepository] $ForkSource
[GithubRepository] $ForkRepository

# Custom properties for the repository.
[PSCustomObject] $CustomProperties
Expand Down Expand Up @@ -213,6 +214,7 @@
HasProjects = 'hasProjectsEnabled'
HasWiki = 'hasWikiEnabled'
HasDiscussions = 'hasDiscussionsEnabled'
HasSponsorships = 'hasSponsorshipsEnabled'
IsArchived = 'isArchived'
IsTemplate = 'isTemplate'
IsFork = 'isFork'
Expand All @@ -239,8 +241,7 @@
MergeCommitTitle = 'mergeCommitTitle'
MergeCommitMessage = 'mergeCommitMessage'
TemplateRepository = 'templateRepository { id databaseId name owner { login } }'
ForkParent = 'parent { name owner { login } }'
ForkSource = 'parent { name owner { login } }'
ForkRepository = 'parent { id databaseId name owner { login } }'
CustomProperties = ''
CloneUrl = 'url'
SshUrl = 'sshUrl'
Expand Down Expand Up @@ -297,8 +298,7 @@
$this.MergeCommitTitle = $Object.merge_commit_title
$this.CustomProperties = $Object.custom_properties
$this.TemplateRepository = $null -ne $Object.template_repository ? [GitHubRepository]::New($Object.template_repository) : $null
$this.ForkParent = $null -ne $Object.parent ? [GitHubRepository]::New($Object.parent) : $null
$this.ForkSource = $null -ne $Object.source ? [GitHubRepository]::New($Object.source) : $null
$this.ForkRepository = $null -ne $Object.parent ? [GitHubRepository]::New($Object.parent) : $null
$this.CloneUrl = $Object.clone_url
$this.SshUrl = $Object.ssh_url
$this.GitUrl = $Object.git_url
Expand All @@ -323,6 +323,7 @@
$this.HasProjects = $Object.hasProjectsEnabled
$this.HasWiki = $Object.hasWikiEnabled
$this.HasDiscussions = $Object.hasDiscussionsEnabled
$this.HasSponsorships = $Object.hasSponsorshipsEnabled
$this.IsArchived = $Object.isArchived
$this.IsTemplate = $Object.isTemplate
$this.IsFork = $Object.isFork
Expand All @@ -349,8 +350,7 @@
$this.MergeCommitTitle = $Object.mergeCommitTitle
$this.MergeCommitMessage = $Object.mergeCommitMessage
$this.TemplateRepository = $null -ne $Object.templateRepository ? [GitHubRepository]::New($Object.templateRepository) : $null
$this.ForkParent = $null -ne $Object.parent ? [GitHubRepository]::New($Object.parent) : $null
$this.ForkSource = $null -ne $Object.source ? [GitHubRepository]::New($Object.source) : $null
$this.ForkRepository = $null -ne $Object.parent ? [GitHubRepository]::New($Object.parent) : $null
$this.CloneUrl = -not [string]::IsNullOrEmpty($Object.url) ? $Object.url + '.git' : $null
$this.SshUrl = $Object.sshUrl
$this.GitUrl = -not [string]::IsNullOrEmpty($Object.url) ? ($Object.Url + '.git').Replace('https://', 'git://') : $null
Expand Down
45 changes: 45 additions & 0 deletions src/formats/GitHubEnvironment.Format.ps1xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<Configuration>
<ViewDefinitions>
<View>
<Name>GitHubEnvironmentTable</Name>
<ViewSelectedBy>
<TypeName>GitHubEnvironment</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Label>Name</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>Repository</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>Owner</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>Url</Label>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<PropertyName>Name</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Repository</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Owner</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Url</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
</ViewDefinitions>
</Configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ filter Get-GitHubEnvironmentByName {
}
try {
Invoke-GitHubAPI @inputObject | ForEach-Object {
[GitHubEnvironment]::new($_.Response, $Owner, $Repository)
$environment = [GitHubEnvironment]::new($_.Response, $Owner, $Repository)
$environment.Url = "https://$($Context.HostName)/$Owner/$Repository/settings/environments/$($environment.ID)/edit"
$environment
}
} catch {
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ filter Get-GitHubEnvironmentList {

Invoke-GitHubAPI @inputObject | ForEach-Object {
$_.Response.environments | ForEach-Object {
[GitHubEnvironment]::new($_, $Owner, $Repository)
$environment = [GitHubEnvironment]::new($_, $Owner, $Repository)
$environment.Url = "https://$($Context.HostName)/$Owner/$Repository/settings/environments/$($environment.ID)/edit"
$environment
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
'HasProjects',
'HasWiki',
'HasDiscussions',
'HasSponsorships',
'IsArchived',
'IsTemplate',
'IsFork',
Expand All @@ -74,8 +75,7 @@
'MergeCommitTitle',
'MergeCommitMessage',
'TemplateRepository',
'ForkParent',
'ForkSource',
'ForkRepository',
'CustomProperties',
'CloneUrl',
'SshUrl',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
'HasProjects',
'HasWiki',
'HasDiscussions',
'HasSponsorships',
'IsArchived',
'IsTemplate',
'IsFork',
Expand All @@ -77,8 +78,7 @@
'MergeCommitTitle',
'MergeCommitMessage',
'TemplateRepository',
'ForkParent',
'ForkSource',
'ForkRepository',
'CustomProperties',
'CloneUrl',
'SshUrl',
Expand Down
102 changes: 72 additions & 30 deletions src/functions/public/API/Invoke-GitHubAPI.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,15 @@ filter Invoke-GitHubAPI {
begin {
$stackPath = Get-PSCallStackPath
Write-Debug "[$stackPath] - Start"
$debug = $DebugPreference -eq 'Continue'
$Context = Resolve-GitHubContext -Context $Context
Write-Debug 'Invoking GitHub API...'
Write-Debug 'Parent function parameters:'
Get-FunctionParameter -Scope 1 | Format-List | Out-String -Stream | ForEach-Object { Write-Debug $_ }
Write-Debug 'Parameters:'
Get-FunctionParameter | Format-List | Out-String -Stream | ForEach-Object { Write-Debug $_ }
if ($debug) {
Write-Debug 'Invoking GitHub API...'
Write-Debug 'Parent function parameters:'
Get-FunctionParameter -Scope 1 | Format-List | Out-String -Stream | ForEach-Object { Write-Debug $_ }
Write-Debug 'Parameters:'
Get-FunctionParameter | Format-List | Out-String -Stream | ForEach-Object { Write-Debug $_ }
}
}

process {
Expand All @@ -124,13 +127,15 @@ filter Invoke-GitHubAPI {
$RetryCount = Resolve-GitHubContextSetting -Name 'RetryCount' -Value $RetryCount -Context $Context
$RetryInterval = Resolve-GitHubContextSetting -Name 'RetryInterval' -Value $RetryInterval -Context $Context
$TokenType = Resolve-GitHubContextSetting -Name 'TokenType' -Value $TokenType -Context $Context
[pscustomobject]@{
Token = $Token
HttpVersion = $HttpVersion
ApiBaseUri = $ApiBaseUri
ApiVersion = $ApiVersion
TokenType = $TokenType
} | Format-List | Out-String -Stream | ForEach-Object { Write-Debug $_ }
if ($debug) {
[pscustomobject]@{
Token = $Token
HttpVersion = $HttpVersion
ApiBaseUri = $ApiBaseUri
ApiVersion = $ApiVersion
TokenType = $TokenType
} | Format-List | Out-String -Stream | ForEach-Object { Write-Debug $_ }
}
$jwt = $null
switch ($TokenType) {
'ghu' {
Expand Down Expand Up @@ -190,10 +195,19 @@ filter Invoke-GitHubAPI {
}

try {
Write-Debug '----------------------------------'
Write-Debug 'Request:'
[pscustomobject]$APICall | Format-List | Out-String -Stream | ForEach-Object { Write-Debug $_ }
Write-Debug '----------------------------------'
if ($debug) {
Write-Debug '----------------------------------'
Write-Debug 'Request:'
[pscustomobject]$APICall | Select-Object -ExcludeProperty Body, Headers | Format-List |
Out-String -Stream | ForEach-Object { Write-Debug $_ }
Write-Debug '----------------------------------'
Write-Debug 'Request headers:'
[pscustomobject]$APICall.Headers | Select-Object * | Format-List | Out-String -Stream | ForEach-Object { Write-Debug $_ }
Write-Debug '----------------------------------'
Write-Debug 'Request body:'
($APICall.Body | Out-String).Split('\n') -split '\n' | ForEach-Object { Write-Debug $_ }
Write-Debug '----------------------------------'
}
do {
switch ($TokenType) {
'ghu' {
Expand All @@ -209,7 +223,7 @@ filter Invoke-GitHubAPI {
}
}
}
$response = Invoke-WebRequest @APICall -ProgressAction 'SilentlyContinue'
$response = Invoke-WebRequest @APICall -ProgressAction 'SilentlyContinue' -Debug:$false -Verbose:$false

$headers = @{}
foreach ($item in $response.Headers.GetEnumerator()) {
Expand All @@ -233,13 +247,15 @@ filter Invoke-GitHubAPI {
($headers.'github-authentication-token-expiration').Replace('UTC', '').Trim()
).ToLocalTime().ToString('s')
}
Write-Debug '----------------------------------'
Write-Debug 'Response headers:'
$headers | Out-String -Stream | ForEach-Object { Write-Debug $_ }
Write-Debug '---------------------------'
Write-Debug 'Response:'
$response | Out-String -Stream | ForEach-Object { Write-Debug $_ }
Write-Debug '---------------------------'
if ($debug) {
Write-Debug '----------------------------------'
Write-Debug 'Response:'
$response | Select-Object -ExcludeProperty Content, Headers | Out-String -Stream | ForEach-Object { Write-Debug $_ }
Write-Debug '---------------------------'
Write-Debug 'Response headers:'
$headers | Out-String -Stream | ForEach-Object { Write-Debug $_ }
Write-Debug '---------------------------'
}
switch -Regex ($headers.'Content-Type') {
'application/.*json' {
$results = $response.Content | ConvertFrom-Json
Expand All @@ -253,6 +269,19 @@ filter Invoke-GitHubAPI {
}
}

if ($debug) {
Write-Debug 'Response content:'
$results | ConvertTo-Json -Depth 5 -WarningAction SilentlyContinue | Out-String -Stream | ForEach-Object {
$content = $_
$content = $content -split '\n'
$content = $content.Split('\n')
foreach ($item in $content) {
Write-Debug $item
}
}
Write-Debug '---------------------------'
}

[pscustomobject]@{
Request = $APICall
Response = $results
Expand All @@ -264,7 +293,12 @@ filter Invoke-GitHubAPI {
} while ($APICall['Uri'])
} catch {
$failure = $_
$failure | Out-String -Stream | ForEach-Object { Write-Debug $_ }
if ($debug) {
Write-Debug '----------------------------------'
Write-Debug 'Failure:'
$failure | Out-String -Stream | ForEach-Object { Write-Debug $_ }
Write-Debug '----------------------------------'
}
$headers = @{}
foreach ($item in $failure.Exception.Response.Headers.GetEnumerator()) {
$headers[$item.Key] = ($item.Value).Trim() -join ', '
Expand All @@ -287,9 +321,11 @@ filter Invoke-GitHubAPI {
}
$sortedProperties = $headers.PSObject.Properties.Name | Sort-Object
$headers = $headers | Select-Object $sortedProperties
Write-Debug 'Response headers:'
$headers | Out-String -Stream | ForEach-Object { Write-Debug $_ }
Write-Debug '---------------------------'
if ($debug) {
Write-Debug 'Response headers:'
$headers | Out-String -Stream | ForEach-Object { Write-Debug $_ }
Write-Debug '---------------------------'
}

$errordetails = $failure.ErrorDetails | ConvertFrom-Json -AsHashtable
$errors = $errordetails.errors
Expand All @@ -307,9 +343,15 @@ filter Invoke-GitHubAPI {
$exception = @"
----------------------------------
Request:
$([pscustomobject]$APICall | Format-List -Property Headers, HttpVersion, Method, Uri, ContentType, Authentication, Token | Out-String)
$([pscustomobject]$APICall | Select-Object -ExcludeProperty Body, Headers | Format-List | Out-String)
----------------------------------
Request headers:
$([pscustomobject]$APICall.Headers | Format-List | Out-String)
----------------------------------
Request body:
$(($APICall.Body | Out-String -Stream).Split('\n') -split '\n')
----------------------------------
Response Headers:
Response headers:
$($headers | Format-List | Out-String)
----------------------------------
Error:
Expand Down
Loading