Skip to content

Add repository content management functions #60

Open

Activity

  1. converted this from a draft issue on Oct 7, 2023
  2. 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
  3. changed the title [-][Feature] Repositories - Contents - Manage Base64 encoded content in a repository[/-] [+]Add repository content management functions[/+] on Apr 4, 2026
  4. MariusStorhaug commented on Jul 25, 2026

    @MariusStorhaug
    MemberAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions