Home

dotnix @main - refs - log -
-
https://git.jolheiser.com/dotnix.git
My nix dotfiles
tree log patch
git-bug Signed-off-by: jolheiser <git@jolheiser.com>
Signature
-----BEGIN SSH SIGNATURE----- U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAgBTEvCQk6VqUAdN2RuH6bj1dNkY oOpbPWj+jw4ua1B1cAAAADZ2l0AAAAAAAAAAZzaGE1MTIAAABTAAAAC3NzaC1lZDI1NTE5 AAAAQBdj94Tki5yGjUg9DQVEJ6qq0U9NAfHxcrbLqATVn7XirWD9YTSR9tO0XQ3/rrmzoG JvXiKpn7GqzEPEpD3tVwk= -----END SSH SIGNATURE-----
jolheiser <git@jolheiser.com>
1 week ago
3 changed files, 71 additions(+), 0 deletions(-)
apps/nogui/nushell.nixapps/nogui/nushell/git-bug.nuapps/nogui/nushell/jolheiser.nu
M apps/nogui/nushell.nixapps/nogui/nushell.nix
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
diff --git a/apps/nogui/nushell.nix b/apps/nogui/nushell.nix
index 409239611e1cd8cb1aa55d9e8f568099420fc02c..2db332f10de911301df90a8112636d640532f7d3 100644
--- a/apps/nogui/nushell.nix
+++ b/apps/nogui/nushell.nix
@@ -34,6 +34,7 @@     "nushell/jolheiser.nu".source = ./nushell/jolheiser.nu;
     "nushell/ssh.nu".source = ./nushell/ssh.nu;
     "nushell/miniserve.nu".source = ./nushell/miniserve.nu;
     "nushell/clone.nu".source = ./nushell/clone.nu;
+    "nushell/git-bug.nu".source = ./nushell/git-bug.nu;
     "nushell/ohmyposh.nu".source = ./nushell/ohmyposh.nu;
   };
 }
I apps/nogui/nushell/git-bug.nu
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
diff --git a/apps/nogui/nushell/git-bug.nu b/apps/nogui/nushell/git-bug.nu
new file mode 100644
index 0000000000000000000000000000000000000000..d8316ea4c8a06f1e918b2b84bc41f1d7ff8a5c86
--- /dev/null
+++ b/apps/nogui/nushell/git-bug.nu
@@ -0,0 +1,69 @@
+export def "git bug init" [] {
+  ^git config --add remote.origin.fetch "refs/bugs/*:refs/bugs/*"
+  ^git config --add remote.origin.fetch "refs/identities/*:refs/identities/*"
+  ^git config --add remote.origin.push "refs/bugs/*:refs/bugs/*"
+  ^git config --add remote.origin.push "refs/identitites/*:refs/identities/*"
+  ^git fetch
+  let id = ^git-bug user -f json | from json | where name == 'jolheiser' | get -i human_id.0
+  if ($id | is-not-empty) {
+    ^git-bug user adopt $id
+  } else {
+    ^git-bug user new --name 'jolheiser' --email 'git@jolheiser.com' --avatar 'https://www.libravatar.org/avatar/cc498b605dee7b6fb9e6422332691bb4'
+  }
+}
+
+def "bug-id" [] {
+  ^git-bug bug --format json | from json | each {|bug| { value: $bug.human_id, description: $bug.title }}
+}
+
+export extern "git bug bug status" [
+  bug_id: string@bug-id
+]
+
+export extern "git bug bug status open" [
+  bug_id: string@bug-id
+]
+
+export extern "git bug bug status close" [
+  bug_id: string@bug-id
+]
+
+export extern "git bug bug rm" [
+  bug_id: string@bug-id
+]
+
+export extern "gitbug bug comment" [
+  bug_id: string@bug-id
+]
+
+export extern "git bug bug comment new" [
+  bug_id: string@bug-id
+]
+
+export extern "git bug bug label" [
+  bug_id: string@bug-id
+]
+
+export extern "git bug bug label new" [
+  bug_id: string@bug-id
+]
+
+export extern "git bug bug label rm" [
+  bug_id: string@bug-id
+]
+
+export extern "git bug bug select" [
+  bug_id: string@bug-id
+]
+
+export extern "git bug bug show" [
+  bug_id: string@bug-id
+]
+
+export extern "git bug bug title" [
+  bug_id: string@bug-id
+]
+
+export extern "git bug bug title edit" [
+  bug_id: string@bug-id
+]
M apps/nogui/nushell/jolheiser.nuapps/nogui/nushell/jolheiser.nu
1
2
3
4
5
6
7
8
9
diff --git a/apps/nogui/nushell/jolheiser.nu b/apps/nogui/nushell/jolheiser.nu
index a76e7b1c3e24077f43ab601a88177d22e2aef955..ca78e1333810165b32f9854664ce7b4a79209893 100644
--- a/apps/nogui/nushell/jolheiser.nu
+++ b/apps/nogui/nushell/jolheiser.nu
@@ -63,3 +63,4 @@ source ~/.config/nushell/ohmyposh.nu
 source ~/.config/nushell/ssh.nu
 source ~/.config/nushell/miniserve.nu
 source ~/.config/nushell/clone.nu
+source ~/.config/nushell/git-bug.nu