Skip to content

Conversation

@sideshowbarker
Copy link
Contributor

Summary

This change exposes a PR/Issue author’s GH username as {{.Author}} in custom keybinding command templates.

That allows you to do things like this in your dash config file:

keybindings:
  prs:
    - key: P
      command: open https://github.com/{{.Author}}

In other words: you can, e.g., configure a key which — when you press it while you have a particular PR/issue selected in a dashboard in dash — will open their GH profile page in a browser.

How did you test this change?

Added tests to:

  • internal/tui/ui_test.go
  • internal/tui/modelUtils.go

require.Empty(t, sections, "sections should be empty when repo is nil")
}

func TestPRTemplateVariables(t *testing.T) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think these tests actually do anything :S

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think these tests actually do anything :S

They’re testing that Go’s struct field access works! 😆

But yeah, I guess I kinda should make them test more than just that, probably. I will give it a try.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, added some tests that actually test what they should be testing…

@sideshowbarker sideshowbarker force-pushed the author-variable branch 3 times, most recently from 35b60b7 to 0f144cc Compare January 22, 2026 06:35
This change exposes a PR/Issue author's GH username as {{.Author}} in
custom keybinding command templates.

That allows you to do things like this in your dash config file:

keybindings:
  prs:
    - key: P
      command: open https://github.com/{{.Author}}

In other words: you can, e.g., configure a key which — when you press it
while you have a particular PR/issue selected in a dashboard in dash —
will open their GH profile page in a browser.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants