diff --git a/CHANGELOG.develop b/CHANGELOG.develop index 6a3cf296e03e..5d35b8cf735f 100644 --- a/CHANGELOG.develop +++ b/CHANGELOG.develop @@ -82,7 +82,7 @@ This file containes the change log for the next major version of Spacemacs. - New key binding ~SPC f i~ for =insert-file=. *** Layer changes **** GitHub -- Add new package =magithub= +- Add new packages =forge= and =magithub= - Remove package =github-browse-file= which has been replaced by =browse-at-remote= in =version-control= layer **** Git diff --git a/layers/+source-control/github/README.org b/layers/+source-control/github/README.org index 8629d84b0dc8..a497f2a8cdb0 100644 --- a/layers/+source-control/github/README.org +++ b/layers/+source-control/github/README.org @@ -13,6 +13,7 @@ - [[#key-bindings][Key bindings]] - [[#magit-gh-pulls][magit-gh-pulls]] - [[#magithub][magithub]] + - [[#forge][forge]] - [[#gistel][gist.el]] - [[#clone-repositories][Clone repositories]] @@ -21,7 +22,8 @@ This layers adds support for [[http://github.com][GitHub]]. ** Features: - [[https://github.com/sigma/magit-gh-pulls][magit-gh-pulls]]: handy =magit= add-on to manage GitHub pull requests. -- [[https://github.com/vermiculus/magithub][magithub]]: magit integrated interface to [[https://hub.github.com/][hub]] command line +- [[https://github.com/vermiculus/magithub][magithub]]: Magit-integrated interface to [[https://hub.github.com/][hub]] command line +- [[https://github.com/magit/forge][forge]]: integration with various forges, such as GitHub and GitLab. - [[https://github.com/defunkt/gist.el][gist.el]]: full-featured mode to browse and post GitHub gists. - [[https://github.com/sshaw/git-link][git-link]]: quickly generate URLs for commits or files. - [[https://github.com/dgtized/github-clone.el][github-clone]] allows for easy cloning and forking of repositories. @@ -102,6 +104,16 @@ possible. | ~@ p~ | submit pull request upstream | | ~@ i~ | create an issue | +** forge +In a =magit-status= buffer (~SPC g s~): + +| Key binding | Description | +|-------------+------------------------------------------------------------------------| +| ~F y~ | pull pull-requests and issues for the current repository | +| ~F Y~ | pull all notifications for the current repository's forge | +| ~b Y~ | create branch from pull-request | +| ~b y~ | create and check out branch from pull-request | + ** gist.el | Key binding | Description | diff --git a/layers/+source-control/github/packages.el b/layers/+source-control/github/packages.el index 8ab707e8d711..afb870e24547 100644 --- a/layers/+source-control/github/packages.el +++ b/layers/+source-control/github/packages.el @@ -11,6 +11,7 @@ (setq github-packages '( + forge gist github-clone github-search @@ -21,6 +22,12 @@ (spacemacs-github :location built-in) )) +(defun github/init-forge () + (use-package forge + :after magit + :init (setq forge-database-file (concat spacemacs-cache-directory + "forge-database.sqlite")))) + (defun github/init-gist () (use-package gist :defer t @@ -94,7 +101,13 @@ (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 `(,@(when (not (package-installed-p 'forge)) + '(issues-section + pull-requests-section)) + completion + status-checks-header + commit-browse + pull-request-merge)) (define-key magit-status-mode-map "@" #'magithub-dispatch-popup)))) (defun github/init-spacemacs-github ()