You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
changed the title [-][Feature] Repositories - Repository contents - Manage Base64 encoded content in a repository[/-][+][Feature] Repositories - Contents - Manage Base64 encoded content in a repository[/+]on Oct 7, 2023
Concrete consumer for this: MSXOrg/Custo (PR #1) currently distributes managed files by cloning every target repo on each run, which does not scale across a fleet. Content-management cmdlets would let it sync a single file via the API instead.
Specific needs for that use case:
Get-GitHubRepositoryContent — GET /repos/{owner}/{repo}/contents/{path} (return content + sha).
Set-GitHubRepositoryContent — PUT /repos/{owner}/{repo}/contents/{path} (create/update; requires the existing blob sha on update, and supports a target branch).
Remove-GitHubRepositoryContent — DELETE /repos/{owner}/{repo}/contents/{path} (needed for convergence when a file is unsubscribed/removed).
Idempotency matters: callers want to compare the desired bytes against the current blob and skip the write when unchanged, so returning the current sha/content from Get is important.
Activity
[-][Feature] Repositories - Repository contents - Manage Base64 encoded content in a repository[/-][+][Feature] Repositories - Contents - Manage Base64 encoded content in a repository[/+][-][Feature] Repositories - Contents - Manage Base64 encoded content in a repository[/-][+]Add repository content management functions[/+]MariusStorhaug commentedon Jul 25, 2026
Concrete consumer for this:
MSXOrg/Custo(PR #1) currently distributes managed files by cloning every target repo on each run, which does not scale across a fleet. Content-management cmdlets would let it sync a single file via the API instead.Specific needs for that use case:
Get-GitHubRepositoryContent—GET /repos/{owner}/{repo}/contents/{path}(return content +sha).Set-GitHubRepositoryContent—PUT /repos/{owner}/{repo}/contents/{path}(create/update; requires the existing blobshaon update, and supports a target branch).Remove-GitHubRepositoryContent—DELETE /repos/{owner}/{repo}/contents/{path}(needed for convergence when a file is unsubscribed/removed).Idempotency matters: callers want to compare the desired bytes against the current blob and skip the write when unchanged, so returning the current
sha/content fromGetis important.