n0v1c3 / vira Goto Github PK
View Code? Open in Web Editor NEWCreate and update your Jira issues while inside Vim!
License: MIT License
Create and update your Jira issues while inside Vim!
License: MIT License
There is currently no dropdown menu being displayed. The command :anoremenu &Vira
shows that it is being properly created just not displayed.
There are old variables left over that should not be used any more. I was using global paths to make it easy at first and there are better proper ways to do this for a proper plugin set-up.
Also some variables that are global could be changed to plugin (g -> s).
There should be as few global variables, functions and key mappings as possible to ensure less problems with other Vim configurations.
Most of the functions should be safe as commands. This will eliminate the need for the call ViraXXX()
and replace it with a ViraXXX
.
As a user I would like to be able to track the time I spend coding as required on some projects. I would however, like this tracking to be as close to accurate as possible to my actual work and not my walking away and leaving vim
running.
Should not be impossible. Whenever you activate an issue end the last timer and submit to JIRA, start a new timer for the NEW issue, start program with the g:vira_null_issue
issue selected and no timer running, stop any active issue timers and submit and stop all timers if g:vira_null_issue
is selected again.
Rinse and repeat.
Show us a great recording that we can post on our other account. I am truly a back end programmer and have just got this far in the front end as needed.
If you are curious about the other account that is simply so our active vim users do not have any activity with the videos. No point in downloading viravid when just using vira...
@mikeboiko did throw us a small script to get started but my end goal as a back end programmer will to be able to run it anywhere with a few vars and we should have a new video or comment...
Let's decide on which version of python we're using first of all. How about we stick with the latest stable release of 3.7?
After this, I can create a Pipfile to specify all required packages.
There have been modifications that I will post here and then make sure the README has been updated.
Leave the cursor where it was between toggles. The position should be reset when the task has been changed.
As a developer I have broken the H
key mapping while changing the OoO for #45 the if
statment used to determine when they should be displayed will need to be adjusted. At least that is where it will begin.
if fixed != total or total == 0 or not int(self.versions_hide) == 1:
line 855 in python/Vira/vira_api.py
This buffer will be used to open the active issue and display the current status, description and comments. It should try to represent how JIRA is currently laying out the display for the website.
Followed README, but getting this when running :ViraServers
:
Error detected while processing function vira#_menu[42]..provider#python3#Call:
line 18:
Error invoking 'python_execute' on channel 4 (python3-script-host):
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'Vira' is not defined
output of :version
:version NVIM v0.4.4 Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fc
f-protection -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=1 -O2 -g -DMIN_LOG_LEVEL=3 -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE
-DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/builddir/build/BUILD/neovim-0.4.4/build/config -I/builddir/build/BUILD/neovim-0.4.4/src -I/usr/include -I/usr/include/lua-5.1 -I/builddir/build/BUILD/neovim-0.4.4/build/src/nvim/auto -I/builddir/build/BUILD/neovim-0.4.4/build/include
Compiled by mockbuild
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
Press ENTER or type command to continue
python3 output from healthcheck
## Python 3 provider (optional)
- INFO: pyenv: Path: /home/cbrodt/lib/pyenv/libexec/pyenv
- INFO: pyenv: Root: /home/cbrodt/lib/pyenv
- INFO: Using: g:python3_host_prog = "/home/cbrodt/lib/pyenv/versions/python_neovim3/bin/python"
- INFO: Executable: /home/cbrodt/lib/pyenv/versions/python_neovim3/bin/python
- INFO: Python version: 3.8.3
- INFO: pynvim version: 0.4.1
- OK: Latest pynvim is installed.
The statusline is going to be a very important feature requirement to make this a usable plug-in. Some extra planning should go into the design to ensure that the user always knows which Project, issue they are currently looking at.
Also we need to ensure that it will be fully compatible with tools like airline
to help show off how great it can be.
branch dev
steps to repro
let g:vira_active_issue = "ABC-1234"
ViraReport
if the JIRA ABC-1234 is not found in your server, it print a stacktrace to the current buffer.
It should just return an error message at the bottom.
Hey this looks like a really cool plugin.
I've read the entire readme.md but I cannot find how to browse jira issues.
I've created the two json files and tested my username and token are working properly.
I've created the following files according to
#41
~/.config/vira/vira_project.json
~/.config/vira/vira_servers.json
I have installed the python dependencies and I have python3 and python in my enviornment paht.
I'm using ubuntu 20.04 in WSL
Here's what I have tried:
:ViraServers
https://bob.atlassian.net/
and press ` (backtick)I have just installed vira and configured some servers in ~/.config/vira/vira_servers.json
but when I run any vira command, I have an issue:
Erreur détectée en traitant function vira#_menu[63]..vira#_print_menu :
ligne 3 :
E15: Expression invalide : >type() == type([]))
E15: Expression invalide : (a:list->type() == type([]))
Probably the MIT license.
branch dev
:
Lines 380 to 381 in be80ff2
branch VIRA-247
:
Lines 383 to 384 in e433204
In response from:
projectDesc = self.jira.createmeta(
projectKeys=project, expand='projects')
I get several:
{"expand": "projects", "projects": []}
It seems JIRA API returns empty "projects"
response for archived projects. Python plugin jira
uses issues/createmeta
which probably suffers from the same limitation mentioned here - archived projects have empty permission scheme so our user doesn't have the privilege to query it. (Maybe.)
Anyways, trying to access [0]
will cause IndexOutOfBounds
exception.
Would be great if you could filter the issues by sprint.
It should be simple to implement since you can trivially add it to the jql.
Personal access tokens authenticate via the 'Authorization: Bearer xxx' header. It looks like VIRA only supports basic auth at the moment.
Description of the feature is here: https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html
When using the python API, these creds can be provided via:
jir = JIRA(options={"headers": {"Authorization": "Bearer xxxx"}})
As a user I would like the ability to use this Vim plugin with either Jira or from GitHub to help make it unrequited to even change the software I am using to track my work on different servers. All function Vim level should look the same (unless simply something is only available from one of them) then the functions can do the server type confirmation and changes as required.
"Borrow" all the best templates for a readme that can be found and update all the sections properly.
I have very limited screen space.
When I open a VIRA report I would ideally like to open in full width rather than split.
I see the in the autoload file you hard code it to open in botright.
Would you be open to making that customisable?
I know how to set the default filter, but there are times when I want to filter issues on other conditions, for now, I have to reset the current filter and set them one by one, it's ineffective and stupid.
Is it possible to preset some groups of filters and switch to one of them with a single hotkey?
This would primarily be used to set server and auth info.
I could code this up using argparse.
As a user, I don't want an open VIRA report to be slow and I don't want each report to take a long time to load.
I suspect something is wrong with the async code.
I'm going to put a few examples of how to profile the python and vim code.
tabs
win....vira_prompt
is open on the fly and we need strings and numbers to work properlyreport
goes blank (VIRA-213) [627b6c4]function! vira#_print_report(list) " {{{2
" Write report output into buffer
python3 << EOF
import vim
import cProfile
with cProfile.Profile() as pr:
report = Vira.api.get_report().splitlines()
vim.current.buffer.append(report)
pr.dump_stats('/tmp/vira_print_report.dmp')
EOF
endfunction
Then i use snakeviz to check the results.
There's a function for getting the selected issue, but not one for setting it. This would be helpful for writing commands and scripts that automatically select the issue based on other criteria. For example, my current team has the policy of naming our git feature branches the Jira issue number. It would be very useful to set the issue based on my git branch name every time I open my editor.
┌---------------------------------┐
│ VIRA-250 │
├──────────────┬──────────────────┤
│ Created │ 2021-02-24 02:15 │
│ Updated │ 2021-02-24 02:15 │
│ Type │ Task │
│ Status │ To Do │
│ Story Points │ None │
│ Priority │ Medium │
│ Epic Link │ None │
│ Component(s) │ │
│ Version(s) │ │
│ Assignee │ Unassigned │
│ Reporter │ Travis Gall │
└──────────────┴──────────────────┘
┌──────────────┐
│ Summary │
└──────────────┘
menu reports `modifiable` toggle
┌──────────────┐
│ Description │
└──────────────┘
As a user all of our menus, reports and even this prompt should only be modifiable when approved by VIRA standards.
┌──────────────┐
│ Comments │
└──────────────┘
Start a list of useful functions that vira should have.
Hello! 👋
I have python3
package jira
and I've tried putting my credentials to ~/.netrc
and using jira
from python
console and it works well, I can connect and browse projects and everything.
However, using vira
vim plugin nothing happens. I have created ~/.config/vira/vira_servers.json
with content:
{
"https://company.atlassian.net": {
"username": "[email protected]",
"password": "my freshly generated api key"
}
}
When I issue :ViraServers
command, a new buffer opens in a bottom split and it has a single empty line. When i press <cr>
nothing happens - the buffer closes and that's it.
The same credentials (diff syntax) I use in ~/.netrc
for jira
python package which works fine.
I'm on arch
Linux work-x1c-arch 5.10.14-arch1-1 #1 SMP PREEMPT Sun, 07 Feb 2021 22:42:17 +0000 x86_64 GNU/Linux
and neovim:
NVIM v0.4.4
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/cc -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconver
sion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim/src/build/config -I/b
uild/neovim/src/neovim-0.4.4/src -I/usr/include -I/build/neovim/src/build/src/nvim/auto -I/build/neovim/src/build/include
Compiled by builduser
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
I've tried using normal and dev
version of the vira
plugin - same behavior.
I like the current prompting feature of g:vira_pass
However, I use the lastpass password manager CLI for all my password needs. It would be good if we had the option of running a script for the username/password instead of setting static strings.
For example, the vim config for me could like something like this:
let g:vira_user_script = "lpass show --username boiko.online"
let g:vira_pass_script = "lpass show --password boiko.online"
The vira_report and vira_menu are readonly.
Based on my usage, you have created vira_prompt so that you can edit each section of a jira individually.
Like in fugitive in the git status screen you aren't allowed to edit text.
As a user I would like to be able to adjust the story points on any issues I have permission to.
An error has been seen and reported regarding the ViraSetAssignee
command.
My current VIRA-177 branch has patched the private API 2 servers and I am currently looking at the Cloud public API 3 servers.
Filter was also not working however it appears to be working for both Privat API2 and Cloud API3 now with my first attempt.
I am currently storing the development related issues on a private JIRA server!
You are free to post your personal issues here (hopefully the ones related to the Vira software but I will help where I can) and they will be seen. I will keep users up to date with important tasks as required.
user (@chinwobble) had requested the ability to hide the menu and report titles. I had no issues seeing the value in this leading to this issue being created.
As a developer I have broken the ability to not create, along with never having never having the good was for code testing As this is now moving up in usefulness for more than myself priority is moving up with it.
It has been reported that some have been receiving the below error when attempting to login to an Atlassian Cloud server.
Basic authentication with passwords is deprecated
Currently the common solution is to go to https://id.atlassian.com/manage-profile/security/api-tokens and generate a key that can then be used directly as the password. This was modified by Atlassian for security.
This issue will remain open until an automated method or fall to readme update is complete.
As a user I currently cannot use the ViraFilterAssignees
function.
As a developer I have also removed the read data from the ViraComment
command to prevent the same issue regarding VIRA-164.
I propose to use flake8 as a linter
I propose using yapf as an auto-formatter
I have good settings configured for these 2 and can add them to the repository.
flake8/yapf should ideally be used within vim using the ALE (asynchronous linting package)
I search the doc and repo and found no way of setting the Sprint
of the task.
Is it possible or is it not yet implemented?
Thank you!
Hii, first of all thanks for this wonderful plugin
I have a question, i dont know why Epic Links are displaying None all the time, any ideas?
I wanted to know the identifier of the epic, in this case it would be NM-4233
This plugin works perfectly in neovim, but complained the following errors in vim:
Error detected while processing function vira#_menu:
line 39:
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'Vira' is not defined
Vim has +python3 enabled.
I have looked at a lot of the plugins but I am pretty sure we will need a full custom menu created from a temp buffer to pull of what I am dreaming.
Unite is pretty easy plugin to work with but I really want to "re-create" what is in the browser. I will break it down further what I think can be done but I have a feeling it is going to be a lot of Vim script.
I can almost create a "useful" popdown menu while in normal or insert mode using the "complete" and outdated "popup" vim commands and they seem pretty good for commenting and time tracking (select an issue to comment/start tracking)
I've configured ~/.config/vira/vira_projects.json
like so:
{
"/path/to/repo": {
"server": "https://myproject.atlassian.net",
"filter": {
"project": "CB",
"assignee": "Chris Brodt",
"component": "Development"
}
}
}
but when I run :ViraIssues
or :ViraReport
I get an unfiltered list of issues. Applying the filters with the ex commands in does work.
This tool would be a lot more useful if I could set up default filters, rather than have to manually select them each time I enter my editor. For example, my company hosts about 100 projects in a shared Jira server, and only one or two of those are all I'll ever care about. Right now, I have to select these each time I open my editor, but it would be nice to write this into my .vimrc file instead.
How exactly does When you're in a git repo, vira will auto-load your pre-defined settings by matching the local repo name from file path.
work? I have a vira_projects.json added to the default path following the readme, but whenever i try to look at issues i have to select the server first.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.