Code Monkey home page Code Monkey logo

Comments (13)

kristijanhusak avatar kristijanhusak commented on August 12, 2024 1

@ptn unfortunately not. I had only like 20 lines of code that i ditched at the end. Don't think it would work now, it's been a long time.

from critiq.vim.

AGhost-7 avatar AGhost-7 commented on August 12, 2024

Not planned, but I did want to support other services at some point. Does bitbucket have feature parity with github?

from critiq.vim.

kristijanhusak avatar kristijanhusak commented on August 12, 2024

Yeah, it does. Only two things are missing if im not mistaken:

Labels
Request PR changes action.

Those could be just skipped.

from critiq.vim.

AGhost-7 avatar AGhost-7 commented on August 12, 2024

I'll try to refactor so that new "providers" can be implemented as a first step.

from critiq.vim.

AGhost-7 avatar AGhost-7 commented on August 12, 2024

Just completed the refactor, should be much easier to add support for other services now. There's still some work to be done for new services to be added, but most of the code has been layered in a way that it should largely just be adding a new file in the providers directory and implementing the same handlers as the github one.

from critiq.vim.

kristijanhusak avatar kristijanhusak commented on August 12, 2024

Ok thanks, i'll try to implement bitbucket provider.

from critiq.vim.

kristijanhusak avatar kristijanhusak commented on August 12, 2024

I ran into the first issue. Github api returns formatted json, where bitbucket returns it raw. Since bitbucket doesn't support returning json in that format, i'm trying to make github return raw json. I tried using this accept header application/vnd.github.VERSION.raw+json, but unfortunately curl still returns formatted json. Do you have any idea how could i make this work?

from critiq.vim.

AGhost-7 avatar AGhost-7 commented on August 12, 2024

The formatting shouldn't cause any issues AFAIK. What error did you encounter with parsing JSON from bitbucket? The critiq#request#send function might need to be adjusted.

from critiq.vim.

kristijanhusak avatar kristijanhusak commented on August 12, 2024

yeah that function needs to be tweaked a bit to make this work, because bitbucket returns single entry in stdout, which sets the body to empty dictionary. Why it does that (send function)?

from critiq.vim.

AGhost-7 avatar AGhost-7 commented on August 12, 2024

Hey, I think I fixed the issue. I tested my fix against the JIRA API and it seems to work now. Here's the relevant commit: a96bf62

Its merged into master so all you should have to do is pull in my changes.

The issue seems to have that the body wasn't terminated with a line break. Since the last line is supposed to be the http status code this was making the whole body disappear.

from critiq.vim.

AGhost-7 avatar AGhost-7 commented on August 12, 2024

@kristijanhusak,just wanted to mention that I've added a generic options parser in commit 43890ba for when you start up the plugin. I was thinking maybe we could use this to determine the provider, e.g.: :Critiq -provider=bitbucket neovim/neovim. Thoughts?

from critiq.vim.

kristijanhusak avatar kristijanhusak commented on August 12, 2024

I started it, but didn't had time to continue working on it.
We could determine the provider by the remote url (git config --get remote.origin.url)

from critiq.vim.

ptn avatar ptn commented on August 12, 2024

This looks interesting! @kristijanhusak I know it's been a long time, but any chance you still have your code somewhere? Even a wip commit would be helpful.

from critiq.vim.

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.