Giter Site home page Giter Site logo

Comments (11)

mikeboiko avatar mikeboiko commented on May 31, 2024

vira tries a couple of different methods in this order.

  1. Try to get local git repo using git rev-parse --show-toplevel
  2. Get last folder name using pwd

See code snippet from load_project_config() in vira/python/Vira/vira_api.py:

            repo = run_command('git rev-parse --show-toplevel')['stdout'].strip()
            if not self.vira_projects.get(repo):
                repo = repo.split('/')[-1]
            if not self.vira_projects.get(repo):
                repo = run_command('pwd')['stdout'].strip()
            if not self.vira_projects.get(repo):
                repo = repo.split('/')[-1]
            if not self.vira_projects.get(repo):
                repo = '__default__'
                if not self.vira_projects.get('__default__'):
                    return

from vira.

n0v1c3 avatar n0v1c3 commented on May 31, 2024

Hello @nathanaelcunningham the main goal was put in by @mikeboiko. When you are inside a folder and run vira ie connect to the server it will check that list that @mikeboiko mentioned above to see if there is a best fit otherwise fall to the __default__ settings or NO filter if there is no file at all. (Here simply the vira_servers.json/yaml file will be needed.

If you are inside vim once vira is already running a filter basically already exists this is where the commands like ViraFiterEdit and ViraFilterProjects will be useful. You can use these commands to edit the filters "on the fly" while using the "ViraFilterReset" to get back to NO filters other than the server you are connected to.

It looks like I may need to do a patch for the highlighting in the ViraFilterProjects menu but here are the key mappings and still appear to work:

  • D remove all selections, confirm and close menu
  • s select a single item for the list
  • S add all items to the list
  • u unselect a single item from the list
  • U unselect all items from the list
  • <cr> confirm selection and close menu

from vira.

n0v1c3 avatar n0v1c3 commented on May 31, 2024

There is also a bit better breakdown of the json format in #41 I will probable just update that at the same time and just call this one a bit easier for others.

from vira.

n0v1c3 avatar n0v1c3 commented on May 31, 2024

As I am reading to begin cleanup I can see som confusion is possible. I will try to make a simple as can be for here is json and here is yaml with a list bellow for what is each row. This way we can have simply ONE section for "here is a file and how you can make a copy for what you need it to do for you"

I personally use the "ViraFilterEdit" command a lot as I can simply take what I make from there and put it inside my vira_projects file if I want to attach it to a directory.

from vira.

n0v1c3 avatar n0v1c3 commented on May 31, 2024

https://stackoverflow.com/questions/62642858/captcha-challenge-on-login-with-python-jira

from vira.

n0v1c3 avatar n0v1c3 commented on May 31, 2024

@nathanaelcunningham hopefully to help you out, this is working for me. You should not need to put the filters into arrays if there is only one however it will just be easier to show them this way from the get go. It is also important that the filters are list inside of a list. This was mostly because there is another list for new issues. I know it is sloppy but that was to help break it down for you.

{  
  "__default__": {
    "server": "https://jira.testing.ca"
  },
  "__n0v1c3__": {
    "server": "https://n0v1c3.atlassian.net"
  },
  "__testing__": {
    "server": "https://jira.testing.ca"
  },
  "vira": {
    "template": "__testing__",
    "filter": {
      "project": ["VIRA"],
      "assignee": ["travis"],
      "fixVersion": ["0.5.0"]
    }
  },
  "vim": {
    "server": "https://jira.testing.ca",
    "filter": {
      "project": "VIM"
    }
  },
  "workProject": {
    "server": "https://jira.work.net",
    "filter": {
      "project": ["HARD", "EASY", "MONEY"],
      "fixVersion": ["0.0.3", "0.0.4", "0.0.5"]
    }
  }
}

from vira.

n0v1c3 avatar n0v1c3 commented on May 31, 2024

@nathanaelcunningham give a test on the VIRA-213 branch if you have a chance. I think that you had only one server and that was a bug in my code.

Plug 'n0v1c3/vira', {'branch': 'VIRA-213'}

from vira.

nathanaelcunningham avatar nathanaelcunningham commented on May 31, 2024

@n0v1c3 That branch is working. I tested the projects file with just the default server and that worked. Ill try project specific server setup in a bit.

from vira.

n0v1c3 avatar n0v1c3 commented on May 31, 2024

I have a feeling this one has floated past me for a little while now as my test were all done with multiple servers setup. One more test on a list that is being created. Thanks!

I did start with a README cleanup so I will probably do a quick wrapup of that and push it to master for the rest of the people. It appears to work fine on vim and nvim. Multiple servers still appears to work and should just open that menu if a __default__ is not defined.

I am sure some deeper testing will find something wrong and I know I took a sloppy way out but I am not worried with were my code is going for VIRA 0.5.0. The menus are going to completely change how they load and this will be affected.

from vira.

n0v1c3 avatar n0v1c3 commented on May 31, 2024

@nathanaelcunningham and @mikeboiko I daringly moved it to the master branch so lets see how that goes for everyone out there. It did not seem to break anythiny I had set up and only made it better so I cannot see to many complaints coming.

Thanks @nathanaelcunningham, I know that I started with the README and your config but I am sure there are other ways to keep making it better as I don't think I will ever get to finish VIRA-213. (It is a README based issue and here we are changing the login process).

from vira.

n0v1c3 avatar n0v1c3 commented on May 31, 2024

@nathanaelcunningham I assume not much new has come up for yourself on this? It is on the master branch and haven't heard much so far.

I will call it closed and new ones can be opened as needed.

from vira.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.