From 035f1aed47d570734b4a045ea16bd9c5896e498e Mon Sep 17 00:00:00 2001 From: Meinard Francisco <44516102+znarfm@users.noreply.github.com> Date: Mon, 13 Oct 2025 02:41:01 +0800 Subject: [PATCH] gh-ruleset: add page (#18623) --- pages/common/gh-rs.md | 7 +++++++ pages/common/gh-ruleset.md | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 pages/common/gh-rs.md create mode 100644 pages/common/gh-ruleset.md diff --git a/pages/common/gh-rs.md b/pages/common/gh-rs.md new file mode 100644 index 0000000000..c1ab6f4bd0 --- /dev/null +++ b/pages/common/gh-rs.md @@ -0,0 +1,7 @@ +# gh rs + +> This command is an alias of `gh ruleset`. + +- View documentation for the original command: + +`tldr gh ruleset` diff --git a/pages/common/gh-ruleset.md b/pages/common/gh-ruleset.md new file mode 100644 index 0000000000..8d8ab6dcac --- /dev/null +++ b/pages/common/gh-ruleset.md @@ -0,0 +1,36 @@ +# gh ruleset + +> Manage GitHub repository rulesets. +> More information: . + +- List all rulesets for the current repository: + +`gh {{[rs|ruleset]}} {{[ls|list]}}` + +- List all rulesets for a specific organization: + +`gh {{[rs|ruleset]}} {{[ls|list]}} {{[-o|--org]}} {{organization_name}}` + +- Check the rules that apply to the current branch: + +`gh {{[rs|ruleset]}} check` + +- Check the rules that apply to a specific branch in another repository: + +`gh {{[rs|ruleset]}} check {{branch_name}} {{[-R|--repo]}} {{owner}}/{{repo}}` + +- Interactively select and view a ruleset for the current repository: + +`gh {{[rs|ruleset]}} view` + +- View a specific ruleset by its ID: + +`gh {{[rs|ruleset]}} view {{ruleset_id}}` + +- View an organization-level ruleset by its ID: + +`gh {{[rs|ruleset]}} view {{ruleset_id}} {{[-o|--org]}} {{organization_name}}` + +- Open the list of rulesets for a specific repository in the browser: + +`gh {{[rs|ruleset]}} {{[ls|list]}} {{[-R|--repo]}} {{owner}}/{{repo}} {{[-w|--web]}}`