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

3 arguments for sort instead of 2 #183

Open
lhernanz opened this issue Jan 7, 2025 · 2 comments
Open

3 arguments for sort instead of 2 #183

lhernanz opened this issue Jan 7, 2025 · 2 comments

Comments

@lhernanz
Copy link

lhernanz commented Jan 7, 2025

Describe the bug
When trying to retrieve the comments of a PR, the process fails with a message saying that sort only takes 2 arguments. The linter also complains about the same in the following line:

https://github.com/armindarvish/consult-gh/blame/28f472574b05647ffdff1d265e28b91250404241/consult-gh.el#L4565

It seems that the ':key' parameter should not be there.

To Reproduce
Steps to reproduce the behavior:
Use consult-gh-pr-list to try to retrieve the comments of a PR and it will fail.

Expected behavior
You can see the details of the PR without the sort related error.

@armindarvish
Copy link
Owner

armindarvish commented Jan 7, 2025

@lhernanz Please follow the bug report template and tell me what is the version of Emacs you are using.

The latest consult-gh code requires Emacs>30.0, which was not set correctly in the headers. I just pushed an update to change the requirements and made a new release as well.

Note that if you are on Emacs<30.0, you can use older releases <v1.0, which do not have the latest features, for example the full issue/pr commenting and review features. Alternatively, you can still use the latest consult-gh but have to customize the package to use a different issue or pr view action.

For example, opening the issue/PR in the browser:

(setq consult-gh-issue-action #'consult-gh--issue-browse-url-action)
(setq consult-gh-pr-action #'consult-gh--pr-browse-url-action)

or for using magit/forge:

(setq consult-gh-issue-action #'consult-gh-forge--issue-view-action)
(setq consult-gh-pr-action #'consult-gh-forge--pr-view-action)

@lhernanz
Copy link
Author

lhernanz commented Jan 7, 2025

I am sorry, you are absolutely right, I should have included the Emacs version that I am using (29.4). I completely missed the version 30 angle as the package was not marked as requiring 30.

Thanks for the additional information and advice!

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

No branches or pull requests

2 participants