Skip to content

Feature Request: Add flag to toggle "Preserve this repository" (GitHub Archive) in gh repo edit #13820

Open

Description

@hyperpolymath

Clarification

GitHub allows public repositories to opt into the GitHub Archive Program (Arctic Code Vault) via the "Preserve this repository" checkbox under Data Services in the repository settings. Currently, there is no way to manage this setting via the gh CLI.

Proposed Solution

Add a flag such as --preserve-repository to gh repo edit to allow users to programmatically opt a repository into the GitHub Archive Program.

Additional Context

For users managing hundreds of repositories, manually opting each repository into the archive program via the UI is incredibly tedious. A CLI flag would enable scriptable inclusion in the archive program.

Activity

  1. added
    needs-triage
    on Jul 8, 2026
  2. added
    enhancement
    gh-repo
    platform
    and removed
    needs-triage
    on Jul 15, 2026
  3. github-actions commented on Jul 15, 2026

    @github-actions
    Contributor

    Thank you for your issue! We have categorized it as an enhancement (feature or improvement) request, and it has been added to our backlog. In doing so, we are not committing to implementing this feature at this time, but, we will consider it for future releases based on community feedback and our own product roadmap.

    Unless you see the help wanted Contributions welcome label, we are not currently looking for external contributions for this feature.

    If you come across this issue and would like to see it implemented, please add a thumbs up! This will help us prioritize the feature. Please only comment if you have additional information or viewpoints to contribute.

  4. BagToad commented on Jul 15, 2026

    @BagToad
    Member

    Thanks for the issue, this is blocked as there is no API to support the feature.

  5. hyperpolymath commented on Jul 19, 2026

    @hyperpolymath
    Author

    Thanks — I understand that the CLI cannot expose this setting until GitHub provides an API for it.

    Could this remain open as a tracked cross-team dependency, or be transferred/linked to the appropriate GitHub API request, rather than ending at “no API”? The platform-side fix is straightforward in interface terms: expose a writable repository boolean for Preserve this repository / Archive Program participation in REST or GraphQL. gh repo edit could then wire that boolean to the requested flag.

    The web UI already writes this setting, so the request is specifically to make the same repository setting available to supported automation across an estate.

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

    blockedenhancementgh-repoplatformstale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions