mirror of
https://codeberg.org/scip/rpnc.git
synced 2025-12-16 20:11:02 +01:00
96
.gh-dash.yml
Normal file
96
.gh-dash.yml
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
prSections:
|
||||||
|
- title: Responsible PRs
|
||||||
|
filters: repo:tlinden/rpnc is:open NOT dependabot
|
||||||
|
layout:
|
||||||
|
repoName:
|
||||||
|
hidden: true
|
||||||
|
|
||||||
|
- title: Responsible Dependabot PRs
|
||||||
|
filters: repo:tlinden/rpnc is:open dependabot
|
||||||
|
layout:
|
||||||
|
repoName:
|
||||||
|
hidden: true
|
||||||
|
|
||||||
|
issuesSections:
|
||||||
|
- title: Responsible Issues
|
||||||
|
filters: is:open repo:tlinden/rpnc -author:@me
|
||||||
|
layout:
|
||||||
|
repoName:
|
||||||
|
hidden: true
|
||||||
|
|
||||||
|
- title: Note-to-Self Issues
|
||||||
|
filters: is:open repo:tlinden/rpnc author:@me
|
||||||
|
layout:
|
||||||
|
creator:
|
||||||
|
hidden: true
|
||||||
|
repoName:
|
||||||
|
hidden: true
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
preview:
|
||||||
|
open: false
|
||||||
|
width: 100
|
||||||
|
|
||||||
|
keybindings:
|
||||||
|
universal:
|
||||||
|
- key: "shift+down"
|
||||||
|
builtin: pageDown
|
||||||
|
- key: "shift+up"
|
||||||
|
builtin: pageUp
|
||||||
|
prs:
|
||||||
|
- key: g
|
||||||
|
name: gitu
|
||||||
|
command: >
|
||||||
|
cd {{.RepoPath}} && /home/scip/bin/gitu
|
||||||
|
- key: M
|
||||||
|
name: squash-merge
|
||||||
|
command: gh pr merge --rebase --squash --admin --repo {{.RepoName}} {{.PrNumber}}
|
||||||
|
- key: i
|
||||||
|
name: show ci checks
|
||||||
|
command: gh pr checks --repo {{.RepoName}} {{.PrNumber}} | glow -p
|
||||||
|
- key: e
|
||||||
|
name: edit pr
|
||||||
|
command: ~/.config/gh-dash/edit-gh-pr {{.RepoName}} {{.PrNumber}}
|
||||||
|
- key: E
|
||||||
|
name: open repo in emacs
|
||||||
|
command: emacsclient {{.RepoPath}} &
|
||||||
|
issues:
|
||||||
|
- key: v
|
||||||
|
name: view
|
||||||
|
command: gh issue view --repo {{.RepoName}} {{.IssueNumber}} | glow -p
|
||||||
|
- key: l
|
||||||
|
name: add label
|
||||||
|
command: gh issue --repo {{.RepoName}} edit {{.IssueNumber}} --add-label $(gum choose bug enhancement question dependencies wontfix)
|
||||||
|
- key: L
|
||||||
|
name: remove label
|
||||||
|
command: gh issue --repo {{.RepoName}} edit {{.IssueNumber}} --remove-label $(gum choose bug enhancement question dependencies wontfix)
|
||||||
|
- key: E
|
||||||
|
name: open repo in emacs
|
||||||
|
command: emacsclient {{.RepoPath}} &
|
||||||
|
|
||||||
|
theme:
|
||||||
|
ui:
|
||||||
|
sectionsShowCount: true
|
||||||
|
table:
|
||||||
|
compact: false
|
||||||
|
showSeparator: true
|
||||||
|
colors:
|
||||||
|
text:
|
||||||
|
primary: "#E2E1ED"
|
||||||
|
secondary: "#6770cb"
|
||||||
|
inverted: "#242347"
|
||||||
|
faint: "#b0793b"
|
||||||
|
warning: "#E0AF68"
|
||||||
|
success: "#3DF294"
|
||||||
|
background:
|
||||||
|
selected: "#1B1B33"
|
||||||
|
border:
|
||||||
|
primary: "#383B5B"
|
||||||
|
secondary: "#39386B"
|
||||||
|
faint: "#8d3e0b"
|
||||||
|
|
||||||
|
repoPaths:
|
||||||
|
:owner/:repo: ~/dev/:repo
|
||||||
|
|
||||||
|
pager:
|
||||||
|
diff: delta
|
||||||
17
command.go
17
command.go
@@ -20,6 +20,7 @@ package main
|
|||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"strconv"
|
"strconv"
|
||||||
@@ -263,7 +264,11 @@ func CommandEdit(calc *Calc) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
defer os.Remove(tmp.Name())
|
defer func() {
|
||||||
|
if err := os.Remove(tmp.Name()); err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
comment := `# add or remove numbers as you wish.
|
comment := `# add or remove numbers as you wish.
|
||||||
# each number must be on its own line.
|
# each number must be on its own line.
|
||||||
@@ -286,7 +291,9 @@ func CommandEdit(calc *Calc) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp.Close()
|
if err := tmp.Close(); err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
// determine which editor to use
|
// determine which editor to use
|
||||||
editor := "vi"
|
editor := "vi"
|
||||||
@@ -321,7 +328,11 @@ func CommandEdit(calc *Calc) {
|
|||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
defer modified.Close()
|
defer func() {
|
||||||
|
if err := modified.Close(); err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
// reset the stack
|
// reset the stack
|
||||||
calc.stack.Clear()
|
calc.stack.Clear()
|
||||||
|
|||||||
8
main.go
8
main.go
@@ -19,6 +19,7 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@@ -143,7 +144,12 @@ func Main() int {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
defer reader.Close()
|
defer func() {
|
||||||
|
if err := reader.Close(); err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
reader.CaptureExitSignal()
|
reader.CaptureExitSignal()
|
||||||
|
|
||||||
if inputIsStdin() {
|
if inputIsStdin() {
|
||||||
|
|||||||
Reference in New Issue
Block a user