{"id":40542913,"url":"https://github.com/p6m7g8/gh-ruleset-branch","last_synced_at":"2026-01-20T23:13:31.078Z","repository":{"id":320097412,"uuid":"1080221385","full_name":"p6m7g8/gh-ruleset-branch","owner":"p6m7g8","description":"Github CLI management of rulesets for branches","archived":false,"fork":false,"pushed_at":"2026-01-11T20:57:19.000Z","size":38,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-12T00:03:42.565Z","etag":null,"topics":["cli","gh-extension","gh-extensions","github","p6","p6m7g8","rulesets"],"latest_commit_sha":null,"homepage":"https://p6m7g8.com","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/p6m7g8.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":"SUPPORT","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-21T03:41:04.000Z","updated_at":"2026-01-11T20:42:15.000Z","dependencies_parsed_at":"2025-10-22T00:12:19.397Z","dependency_job_id":"92e69993-26eb-4121-bdbb-622761eead2c","html_url":"https://github.com/p6m7g8/gh-ruleset-branch","commit_stats":null,"previous_names":["p6m7g8/gh-ruleset-branch"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/p6m7g8/gh-ruleset-branch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p6m7g8%2Fgh-ruleset-branch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p6m7g8%2Fgh-ruleset-branch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p6m7g8%2Fgh-ruleset-branch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p6m7g8%2Fgh-ruleset-branch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/p6m7g8","download_url":"https://codeload.github.com/p6m7g8/gh-ruleset-branch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p6m7g8%2Fgh-ruleset-branch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28618741,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T22:24:05.405Z","status":"ssl_error","status_checked_at":"2026-01-20T22:20:31.342Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","gh-extension","gh-extensions","github","p6","p6m7g8","rulesets"],"created_at":"2026-01-20T23:13:30.230Z","updated_at":"2026-01-20T23:13:31.068Z","avatar_url":"https://github.com/p6m7g8.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# P6’s POSIX.2: gh-ruleset-branch\n\n## Table of Contents\n\n- [P6’s POSIX.2: gh-ruleset-branch](#p6s-posix2-gh-ruleset-branch)\n  - [Table of Contents](#table-of-contents)\n  - [Badges](#badges)\n  - [Summary](#summary)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [Commands](#commands)\n    - [Options](#options)\n    - [Aliases](#aliases)\n    - [Functions](#functions)\n  - [Examples](#examples)\n    - [Create a new ruleset](#create-a-new-ruleset)\n    - [Show an existing ruleset](#show-an-existing-ruleset)\n    - [Activate or deactivate](#activate-or-deactivate)\n    - [Delete](#delete)\n    - [Update simple toggles](#update-simple-toggles)\n    - [Update parameterized rules](#update-parameterized-rules)\n    - [Update status checks](#update-status-checks)\n  - [Hierarchy](#hierarchy)\n  - [Contributing](#contributing)\n  - [Code of Conduct](#code-of-conduct)\n  - [Author](#author)\n\n---\n\n## Badges\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-yellowgreen.svg)](https://opensource.org/licenses/Apache-2.0)\n\n---\n\n## Summary\n\n`gh-ruleset-branch` is a portable GitHub CLI extension for managing\n**branch rulesets** directly from the command line.\n\nIt wraps the\n[GitHub REST API v3](https://docs.github.com/en/rest/repos/rules?apiVersion=2022-11-28)\nfor repository rulesets and exposes simple subcommands to:\n\n- create, show, activate, deactivate, or delete branch rulesets\n- toggle individual rule types (`required_signatures`, `non_fast_forward`,\n  `merge_queue`, etc.)\n- set or modify parameters for multi-argument rules like `pull_request`,\n  `merge_queue`, and `copilot_code_review`\n- update rule parameters dynamically using a declarative\n  `\u003crule\u003e.\u003cparam\u003e=\u003cvalue\u003e` syntax\n\n---\n\n## Installation\n\n1. Ensure dependencies are installed:\n\n   ```bash\n   gh extension install p6m7g8/gh-ruleset-branch\n   which jq gh\n   ```\n\n2. Verify access:\n\n   ```bash\n   gh auth status\n   ```\n\n3. Confirm the extension is working:\n\n   ```bash\n   gh ruleset-branch help\n   ```\n\n---\n\n## Usage\n\n```text\ngh-ruleset-branch.zsh [options] \u003ccmd\u003e [\u003cargs\u003e...]\n```\n\n### Commands\n\n| Command                        | Description                 |\n| ------------------------------ | --------------------------- |\n| `activate \u003cname\u003e`              | Activate a branch ruleset   |\n| `create \u003cname\u003e`                | Create a branch ruleset     |\n| `deactivate \u003cname\u003e`            | Deactivate a branch ruleset |\n| `delete \u003cname\u003e`                | Delete a branch ruleset     |\n| `show \u003cname\u003e`                  | Show a branch ruleset       |\n| `update \u003cname\u003e \u003cwhat\u003e=\u003cvalue\u003e` | Update a branch ruleset     |\n\n### Options\n\n| Option | Description       |\n| ------ | ----------------- |\n| `-h`   | Show help message |\n\n---\n\n### Aliases\n\n```bash\nalias ghrb=\"gh ruleset-branch\"\n```\n\n---\n\n### Functions\n\n| Function                     | Purpose                            |\n| ---------------------------- | ---------------------------------- |\n| `p6_usage()`                 | Prints help text                   |\n| `p6_cmd_activate(name)`      | Activates a ruleset                |\n| `p6_cmd_deactivate(name)`    | Deactivates a ruleset              |\n| `p6_cmd_create(name)`        | Creates a new ruleset              |\n| `p6_cmd_delete(name)`        | Deletes a ruleset                  |\n| `p6_cmd_show(name)`          | Shows JSON for a ruleset           |\n| `p6_cmd_update(name, ...)`   | Updates or patches ruleset content |\n\n---\n\n## Examples\n\n### Create a new ruleset\n\n```bash\ngh ruleset-branch create default\n```\n\n### Show an existing ruleset\n\n```bash\ngh ruleset-branch show default | jq\n```\n\n### Activate or deactivate\n\n```bash\ngh ruleset-branch activate default\ngh ruleset-branch deactivate default\n```\n\n### Delete\n\n```bash\ngh ruleset-branch delete default\n```\n\n### Update simple toggles\n\n```bash\ngh ruleset-branch update default required_signatures=enabled\ngh ruleset-branch update default required_signatures=disabled\n```\n\n### Update parameterized rules\n\n```bash\ngh ruleset-branch update default \\\n  pull_request.required_approving_review_count=2 \\\n  pull_request.dismiss_stale_reviews_on_push=true\n\ngh ruleset-branch update default \\\n  merge_queue.merge_method=SQUASH \\\n  merge_queue.check_response_timeout_minutes=7\n\ngh ruleset-branch update default \\\n  copilot_code_review.review_on_push=true \\\n  copilot_code_review.review_draft_pull_requests=true\n```\n\n### Update status checks\n\n```bash\ngh ruleset-branch update default \\\n  required_status_checks.context=build \\\n  required_status_checks.integration_id=15368\n```\n\n---\n\n## Hierarchy\n\n```text\n.\n├── CODE_OF_CONDUCT.md\n├── CONTRIBUTING.md\n├── FUNDING\n├── init.zsh\n├── LICENSE\n├── README.md\n├── SECURITY.md\n└── SUPPORT\n```\n\n---\n\n## Contributing\n\nPull requests are welcome.\nPlease lint with `shellcheck`, test with `bash -n`.\n\nSee\n[How to Contribute](https://github.com//.github/blob/main/CONTRIBUTING.md).\n\n---\n\n## Code of Conduct\n\nSee\n[Code of Conduct](https://github.com//.github/blob/main/CODE_OF_CONDUCT.md).\n\n---\n\n## Author\n\n**Philip M. Gollucci** \u003cpgollucci@p6m7g8.com\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp6m7g8%2Fgh-ruleset-branch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp6m7g8%2Fgh-ruleset-branch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp6m7g8%2Fgh-ruleset-branch/lists"}