mirror of
https://github.com/nmasur/dotfiles
synced 2026-07-29 16:28:36 +00:00
feat(jjui): add custom github ruleset bypass commands
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
let
|
||||
cfg = config.nmasur.presets.programs.jujutsu;
|
||||
tomlFormat = pkgs.formats.toml { };
|
||||
in
|
||||
|
||||
{
|
||||
@@ -31,6 +32,31 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile."jjui/config.toml".source = tomlFormat.generate "jjui-config" {
|
||||
actions = [
|
||||
{
|
||||
name = "set-github-bypass";
|
||||
lua = ''
|
||||
exec_shell([[gh api --method PATCH -H "Accept: application/vnd.github+json" /repos/$(gh repo view --json nameWithOwner -q .nameWithOwner)/properties/values -f 'properties[][property_name]=Allow-Ruleset-Bypass' -f 'properties[][value]=true']])
|
||||
flash("Set GitHub rule bypass")
|
||||
'';
|
||||
key = "ctrl+b";
|
||||
scope = "revisions";
|
||||
desc = "Set GitHub rule bypass";
|
||||
}
|
||||
{
|
||||
name = "remove-github-bypass";
|
||||
lua = ''
|
||||
exec_shell([[gh api --method PATCH -H "Accept: application/vnd.github+json" /repos/$(gh repo view --json nameWithOwner -q .nameWithOwner)/properties/values -f 'properties[][property_name]=Allow-Ruleset-Bypass' -f 'properties[][value]=']])
|
||||
flash("Removed GitHub rule bypass")
|
||||
'';
|
||||
key = "ctrl+shift+b";
|
||||
scope = "revisions";
|
||||
desc = "Remove GitHub rule bypass";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
home.packages = [
|
||||
# Required for the fsmonitor to auto-snapshot
|
||||
pkgs.stable.watchman
|
||||
|
||||
Reference in New Issue
Block a user