armindarvish / consult-gh

An Interactive interface for "GitHub CLI" client inside GNU Emacs using Consult

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clone repo after forking

agzam opened this issue · comments

Whenever I fork a repo, almost always, clonning follows right after. Would be nice to have a hook or something in consult-gh--repo-fork, so something like magit-clone can be chained to it.

A hook probably makes sense, so let me think about that and test some ideas on it.

But note, that you can also define a custom embark action, and do both fork and clone. See my blog post and the section about extending functionality:
https://www.armindarvish.com/en/post/consult-gh_working_with_github_inside_emacs_in_2023_/#extending-functionality-with-custom-functions

Let me know if you need help with that.

@agzam I just added hooks to both consult-gh-repo-fork and consult-gh-repo-clone and merged in develop (see #41). Try the the develop branch and let me know if it resolves this before I close this issue.

You can try:

(add-hook 'consult-gh-repo-post-fork-hook 'consult-gh-repo-clone)