Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow custom key mappings for the list of issues #517

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

martinpovolny
Copy link
Contributor

@martinpovolny martinpovolny commented Dec 3, 2022

With this, you can define custom keys and actions in the list of issues.

Example configuration (~/.config/.jira/.config.yml):

...
login: rhn-engineering-mpovolny
project:
  key: OSDEV
  type: ""
server: https://issues.redhat.com
custom_keys:
  issues:
    w: "jira issue view %KEY%"
    t: "&jira issue move %KEY% 'In Progress'; jira issue assign %KEY% rhn-engineering-mpovolny"
    s: '&jira sprint add $(jira sprint list --table --plain --no-headers --columns ID | head -1) %KEY%'
  • The "w" key is an example of a foreground running command mapped to the "w" key. It has no use, but a demo.
  • The "t" key implements a "take" action -- the issue is moved to "In Progress" and then assigned to me. This is run in a separate goroutine (because of the & at the beginning of the command line).
  • The "s" key puts the issue into the latest sprint.

This is just an example, this feature allows everyone to set his/her own mapping.

This MR needs rebasing, but I'd like to open a discussion about the feature and the implementation

@martinpovolny martinpovolny force-pushed the custom_keys_issues branch 2 times, most recently from da97fc4 to 3eab553 Compare December 3, 2022 10:35
@martinpovolny martinpovolny changed the title Allow custom key mappings for the list of issues feat: allow custom key mappings for the list of issues Dec 3, 2022
@ankitpokhrel
Copy link
Owner

Not sure if this would be the best way to add custom keys but it looks interesting. Let me play around a bit with this. Could you please resolve the conflicts and rebase. Thank you!

@martinpovolny
Copy link
Contributor Author

Rebased.

@prateek
Copy link

prateek commented Jan 29, 2023

One additional suggestion: It'd be great if this supported overriding the existing keybinds too - e.g. I'd prefer on jira issue list open the issue in the terminal and I'd define a bind like O or some such to open the issue in my browser.

@conrad760
Copy link

One additional suggestion: It'd be great if this supported overriding the existing keybinds too - e.g. I'd prefer on jira issue list open the issue in the terminal and I'd define a bind like O or some such to open the issue in my browser.

Came here to say this I want ctrl-k to be y/Y

I don't mind helping at all

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.

4 participants