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

Creating a pull request with H p signals error (wrong-type-argument stringp nil) #367

Open
treese opened this issue Aug 30, 2018 · 1 comment
Labels
bug describes a defect in supported/advertised functionality unconfirmed has not been reproduced by a maintainer

Comments

@treese
Copy link

treese commented Aug 30, 2018

I tried to create a pull request, and got a Lisp error (backtrace details below). It's entirely possible that I did something wrong. I did the following:

  • magithub-clone to clone my fork of someone else's repository on GitHub
  • made a feature branch (update-8-30)
  • edit/commit/push my feature branch to my fork repop
  • H p to make a pull request

It prompts for a head branch, which I think is supposed to be my feature branch (update-8-30). After I hit return for that, I get the following stack backtrace:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  regexp-quote(nil)
  (concat (regexp-quote remote) "/\\(.*\\)")
  (let ((regexp (concat (regexp-quote remote) "/\\(.*\\)"))) (mapcar (function (lambda (it) (and (string-match regexp it) (match-string 1 it)))) (magit-list-remote-branch-names remote)))
  magithub-remote-branches(nil)
  (let ((branches (magithub-remote-branches remote))) (magit-completing-read (format "[%s] %s" (magithub-repo-name (magithub-repo-from-remote remote)) prompt) branches nil t nil nil (and (member default branches) default)))
  magithub-remote-branches-choose("Base branch" nil "master")
  (let* ((this-repo (magithub-read-repo "Fork's remote (this is you!) " (ghubp-username) t)) (this-repo-owner (let ((alist this-repo)) (let ((\.owner\.login (cdr ...))) \.owner\.login))) (parent-repo (or (alist-get (quote parent) this-repo) this-repo)) (this-remote (car (magithub-repo-remotes-for-repo this-repo))) (on-this-remote (string= (magit-get-push-remote) this-remote)) (base-remote (car (magithub-repo-remotes-for-repo parent-repo))) (head-branch (let ((branch (magithub-remote-branches-choose "Head branch" this-remote (if on-this-remote ...)))) (if (magit-rev-verify (magit-get-push-branch branch)) nil (user-error "`%s' has not yet been pushed to your fork (%s)" branch (magithub-repo-name this-repo))) branch)) (base (magithub-remote-branches-choose "Base branch" base-remote (or (and on-this-remote (magit-get-upstream-branch head-branch)) (let ((alist parent-repo)) (let (...) \.default_branch))))) (user+head (format "%s:%s" this-repo-owner head-branch))) (if (let ((G266 (ghubp-get-context)) ghubp-contextualize-function) (setq G266 (cons (cons (quote auth) (quote magithub)) G266)) (setq ghubp-contextualize-function (function (lambda nil G266))) (ghubp-get-repos-owner-repo-pulls parent-repo nil :head user+head)) (progn (user-error "A pull request on %s already exists for head \"%s\"" (magithub-repo-name parent-repo) user+head))) (list (cons (quote repo) parent-repo) (cons (quote base) base) (cons (quote head) (if (string= this-remote base-remote) head-branch user+head)) (cons (quote head-no-user) head-branch) (cons (quote fork) this-repo) (cons (quote user+head) user+head)))
  magithub-pull-request-new-arguments()
  (let ((alist (magithub-pull-request-new-arguments))) (let ((\.user+head (cdr (assq (quote user+head) alist))) (\.repo (cdr (assq (quote repo) alist))) (\.base (cdr (assq (quote base) alist))) (\.head (cdr (assq (quote head) alist))) (\.head-no-user (cdr (assq (quote head-no-user) alist)))) (magithub-confirm (quote pre-submit-pr) \.user+head (magithub-repo-name \.repo) \.base) (list \.repo \.base \.head \.head-no-user)))
  call-interactively(magithub-pull-request-new)
  magit-invoke-popup-action(112)
  funcall-interactively(magit-invoke-popup-action 112)
  call-interactively(magit-invoke-popup-action nil nil)
  command-execute(magit-invoke-popup-action)

Version information:
magithub.el says version 0.17; it's the latest (as of 8/30/18) from MELPA.
Magit version: Magit 20180828.1055, Git 2.15.2 (Apple Git-101.1), Emacs 25.3.50.1, darwin
This is Aquamacs 3.4 on Mac OS 10.13.6

Thanks for any help. It's pretty awesome to use.

@vspinu
Copy link

vspinu commented Aug 30, 2018

I am actually getting Wrong type argument: listp, magithub-issue-view-headers-hook on H p. Which comes from magithub-issue-view-insert-headers which calls magit-insert-headers which breaks.

@vermiculus vermiculus added bug describes a defect in supported/advertised functionality unconfirmed has not been reproduced by a maintainer labels Sep 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug describes a defect in supported/advertised functionality unconfirmed has not been reproduced by a maintainer
Projects
None yet
Development

No branches or pull requests

3 participants