github: Disable status, issues, and PRs by default
Try again to fix issue #11176. * layers/+source-control/github/packages.el (github/init-magithub): Disable the GitHub project status, pull requests, and issues sections by default. * layers/+source-control/github/README.org: Document that these sections are all disabled by default, and how to enable them.
This commit is contained in:
parent
6659088dc5
commit
4408788799
|
@ -49,21 +49,29 @@ Magithub, follow the installation instructions at hub.github.com. To force hub
|
||||||
to authenticate, you can use hub browse in a terminal (inside a GitHub repo).
|
to authenticate, you can use hub browse in a terminal (inside a GitHub repo).
|
||||||
|
|
||||||
** Magithub configuration
|
** Magithub configuration
|
||||||
Spacemacs configures =Magithub= to be in offline mode by default because loading
|
Spacemacs configures =Magithub= to be in offline mode by default and disables
|
||||||
|
displaying the GitHub project status, issues, and pull requests because loading
|
||||||
project data for repositories with many pull requests or issues can be
|
project data for repositories with many pull requests or issues can be
|
||||||
exorbitantly slow (see [[https://github.com/syl20bnr/spacemacs/issues/11176][issue #11176]]). To load project data when in offline
|
exorbitantly slow (see [[https://github.com/syl20bnr/spacemacs/issues/11176][issue #11176]]). To toggle online mode and the project
|
||||||
mode, use ~SPC u g r~ in the =magit status= buffer. To toggle online mode for the
|
status, issues, and pull requests sections for the current repository, open in
|
||||||
current repository, use ~@ C o~. To enable online mode by default, use the
|
the =magit status= buffer (~SPC g s~) and then open the Magithub settings popup
|
||||||
following shell command:
|
(~@ C~). To enable online mode and the project status, pull requests, and
|
||||||
|
issues sections by default, use the following shell commands:
|
||||||
|
|
||||||
#+BEGIN_SRC sh
|
#+BEGIN_SRC sh
|
||||||
git config --global --bool magithub.online true
|
git config --global --bool magithub.online true
|
||||||
|
git config --global --bool magithub.status.includeStatusHeader true
|
||||||
|
git config --global --bool magithub.status.includePullRequestsSection true
|
||||||
|
git config --global --bool magithub.status.includeIssuesSection true
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Alternatively, use the following Emacs form:
|
Alternatively, use the following Emacs forms:
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(magit-set "true" "--global" "magithub.online")
|
(magit-set "true" "--global" "magithub.online")
|
||||||
|
(magit-set "true" "--global" "magithub.status.includeStatusHeader")
|
||||||
|
(magit-set "true" "--global" "magithub.status.includePullRequestsSection")
|
||||||
|
(magit-set "true" "--global" "magithub.status.includeIssuesSection")
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* Key Bindings
|
* Key Bindings
|
||||||
|
@ -87,7 +95,7 @@ possible.
|
||||||
|
|
||||||
| Key Binding | Description |
|
| Key Binding | Description |
|
||||||
|-------------+--------------------------------------------------|
|
|-------------+--------------------------------------------------|
|
||||||
| ~@ C~ | configure Magithub |
|
| ~@ C~ | open the Magithub settings popup |
|
||||||
| ~@ H~ | opens the current repository in the browser |
|
| ~@ H~ | opens the current repository in the browser |
|
||||||
| ~@ c~ | pushes a brand-new local repository up to GitHub |
|
| ~@ c~ | pushes a brand-new local repository up to GitHub |
|
||||||
| ~@ f~ | create a fork of an existing repository |
|
| ~@ f~ | create a fork of an existing repository |
|
||||||
|
|
|
@ -90,7 +90,10 @@
|
||||||
;; projects with many pull requests or issues can be exorbitantly slow.
|
;; projects with many pull requests or issues can be exorbitantly slow.
|
||||||
;; See <https://github.com/syl20bnr/spacemacs/issues/11176>.
|
;; See <https://github.com/syl20bnr/spacemacs/issues/11176>.
|
||||||
(when (null (magit-get "--global" "magithub.online"))
|
(when (null (magit-get "--global" "magithub.online"))
|
||||||
(magit-set "false" "--global" "magithub.online"))
|
(magit-set "false" "--global" "magithub.online")
|
||||||
|
(magit-set "false" "--global" "magithub.status.includeStatusHeader")
|
||||||
|
(magit-set "false" "--global" "magithub.status.includePullRequestsSection")
|
||||||
|
(magit-set "false" "--global" "magithub.status.includeIssuesSection"))
|
||||||
(magithub-feature-autoinject t)
|
(magithub-feature-autoinject t)
|
||||||
(define-key magit-status-mode-map "@" #'magithub-dispatch-popup))))
|
(define-key magit-status-mode-map "@" #'magithub-dispatch-popup))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue