Giter Site home page Giter Site logo

Comments (5)

armindarvish avatar armindarvish commented on August 15, 2024

@agzam Are you saying that you don't see closed PRs? Or you don't see anything?

Here are some tips/suggestions for you:

1- If you are inside a git repo directory, and you want to see pr list, you can do:
a. M-x consult-gh-pr-list
b. use M-n to get autocompletion for the repo in the current directory
(when consult-gh-prioritize-local-folder is set to 'suggest, you can use M-n to get to current directory, otherwise if you set it to t, it should autocomplete to current directory without any key press, but this is true only after #86 was merged, so you may need to update!)
c. Wait for the dynamic completion to get a list of issues.

If the problem is that you are not seeing closed PRs, then you have to 2 options:

  • use additional arguments such as "-- -s all" "-- -s closed", etc.
  • set the variable consult-gh-prs-state-to-show to "all" (or "merged" "closed", ...) to globally change the setting. You would still be able to override this by typing "-- -s open", ... in the minibuffer input.

If you need to further narrow down the list for example by issue number or description, then you can use "#PRnumber" or "#description" at the end, like this:

#armindarvish/consult-gh#86

2- If you are looking for PRs in another repo, you can use C-u M-x consult-gh-pr-list, in which case you will be asked to search for a repo (so you don't need to be accurate with the Owner/Repo input) and then that is used to autocomplete the input in consult-gh-pr-list). The rest is the same.

The exact same approach should also work for consult-gh-issue-list (but you need to set consult-gh-issues-state-to-show for this one)

Here are screenshots with consult-gh-prs-state-to-show set to just "open" or "all":

------------------------- consult-gh-prs-state-to-show = "open" --------------------------

Screen Recording 2023-11-13 at 2 36 50 PM

------------------------- consult-gh-prs-state-to-show = "all" --------------------------
Screen Recording 2023-11-13 at 2 39 14 PM

from consult-gh.

agzam avatar agzam commented on August 15, 2024

This is what I'm talking about:

I'd run consult-gh-pr-list or consult-gh-issue-list, it picks up the repo (or not - depending on the settings), and then it shows a list of things.
So, why can't I immediately start typing text or numbers?

consult-gh

from consult-gh.

agzam avatar agzam commented on August 15, 2024

I kind of "improved" it for myself, making it possible to start typing text and numbers right away, with this:

(defadvice! consult-gh-issue-list-a (orig-fn &optional initial noaction)
    :around #'consult-gh-issue-list
    :around #'consult-gh-pr-list
    (if initial
        (fn initial noaction)
      (let ((repo (consult-gh--get-repo-from-directory)))
        (funcall
         orig-fn
         (format "%s -- -S " repo)))))

Apologies for the Doom macro, it's basically adding advice to both functions in one shot.

For some reason it initially complains unknown argument "30"; please quote all values that have spaces, or in general, when there's nothing after -S I see that message. At this point, that's just a tiny irritation.

from consult-gh.

agzam avatar agzam commented on August 15, 2024

Holy cow... I get it now. It works if I append # right after the repo name. I swear, when I tried before that didn't work. I probably had older version or something. OMG, I'm so dumb. Please consider appending it by default (but that might be specific to vertico, which I'm using). Closing this ticket now. Sorry for wasting your time with my nonsense.

from consult-gh.

armindarvish avatar armindarvish commented on August 15, 2024

The "#" is specific to consult--async. Look at consult-async-split-styles-alist and consult-grep docs for more details on how to use it. I played around with automatically appending it, but I ended up deciding it's better not to do that because if you are searching for a sentence which includes spaces, then having "#" would block searches because essentially everything after the second "#" character is used for narrow-down from the completion table in minibuffer and not for original search (like searching description of issues, ...). I feel like it's not too much of a hassle to add # when you want to switch to narrow down.

Note that if you want to force the async search to run with <3 characters you cna also insert "#" at the end. For example with M-c consult-gh-search-repos, I have to enter #mu# to see the results for mu otherwise the async completion does not run with just 2 caharcters.

I need to find some time to improve the documentation for all these interesting async features, but haven't had time yet.

from consult-gh.

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.