Set up `gh` aliases for configuring repo

wip
Bo Jeanes 2024-07-19 16:02:20 +10:00
parent 9ccc82c1cc
commit 8e31752f8a
No known key found for this signature in database
1 changed files with 8 additions and 0 deletions

View File

@ -262,6 +262,14 @@
os.editPreset = "nvim"; os.editPreset = "nvim";
}; };
programs.gh.enable = true;
programs.gh.settings.aliases = {
# https://cli.github.com/manual/gh_alias_set
configure-repo-squash = "api repos/{owner}/{repo} --method PATCH -f allow_squash_merge=true -f squash_merge_commit_title=PR_TITLE -f squash_merge_commit_message=PR_BODY";
configure-repo-delete-merged = "api repos/{owner}/{repo} --method PATCH -f delete_branch_on_merge=true";
configure-repo = "!gh configure-repo-squash && gh configure-repo-delete-merged";
};
programs.zsh = { programs.zsh = {
enable = true; enable = true;
enableCompletion = true; enableCompletion = true;