mirror of
https://github.com/srid/nixos-config.git
synced 2026-04-26 16:35:16 +08:00
- Move AI config from nix-agent-wire/srid to ./AI - Update flake input: srid/AI -> srid/nix-agent-wire - Update home modules to use local AI folder via flake.self.outPath
1.7 KiB
1.7 KiB
| description | subtask |
|---|---|
| Apply preferred GitHub repo settings | true |
GH Settings Command
Apply preferred GitHub repository settings.
Usage
/gh-settings # Apply to current repo
/gh-settings owner/repo # Apply to specific repo
Settings Applied
- Squash merge format: title=PR_TITLE, message=PR_BODY
- Disable: wiki, projects, merge-commit
- Enable: rebase-merge, squash-merge
- Enable: allow-update-branch, delete-branch-on-merge
Workflow
-
Detect Repository
- If argument provided: use
owner/repoformat - If no argument: detect from
git remote get-url origingit remote get-url origin | sed 's/.*github.com[/:]//' | sed 's/.git$//'
- If argument provided: use
-
Apply Settings
Run both commands:
# Set squash merge commit format gh api --method PATCH repos/{owner}/{repo} -f squash_merge_commit_title=PR_TITLE -f squash_merge_commit_message=PR_BODY > /dev/null # Apply repository settings gh repo edit --enable-wiki=false --enable-projects=false --enable-merge-commit=false --enable-rebase-merge --enable-squash-merge --allow-update-branch --delete-branch-on-merge -
Confirm
- Report success to user
- Show the repo that was updated
Requirements
ghCLI installed and authenticated (usenix run nixpkgs#ghif not installed)- Must have admin access to the repository
- Repository must have a GitHub remote (for auto-detection)
Notes
- This is idempotent - running multiple times has the same effect
- Settings are applied in sequence; both must succeed for complete application
- The
{owner}/{repo}placeholder in the API call works withghCLI's default behavior