magit / forge

Work with Git forges from the comfort of Magit
GNU General Public License v3.0
1.3k stars 113 forks source link

Forge crashes when adding a Gitlab project pulling only individual topics #659

Closed nbarrientos closed 4 months ago

nbarrientos commented 4 months ago

Hi,

How to repro: N a i with a repository of type Gitlab. N a a works.

Haven't look very deep but I see that there have been some recent changes in the project adding interface and that :selective bit looks new so maybe ghub needs adjusting or forge patched. Sorry, I haven't had time to look further myself.

forge                         20240421.2325
ghub                          20240415.1555

No updates available.

Backtrace (partial, should be enough to pinpoint the origin though)

Debugger entered--Lisp error: (wrong-type-argument sequencep :selective)
  url-hexify-string(:selective)
  #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_22>((updated_after . :selective))
  ghub--url-encode-params(((per_page . 100) (order_by . "updated_at") (updated_after . :selective)))
  ghub-request("GET" "/projects/user%2Fproject-name/issues" ((per_page . 100) (order_by . "updated_at") (updated_after . :selective)) :forge gitlab :query nil :payload nil :headers nil :silent nil :unpaginate t :noerror nil :reader nil :username nil :auth forge :host "gitlab.example.com/api/v4" :callback #f(compiled-function (value headers status req) #<bytecode 0x9793579e4fd9e9b>) :errorback t :extra nil)
  glab-get("/projects/user%2Fproject-name/issues" ((per_page . 100) (order_by . "updated_at") (updated_after . :selective)) :host "gitlab.example.com/api/v4" :auth forge :query nil :payload nil :headers nil :silent nil :unpaginate t :noerror nil :reader nil :callback #f(compiled-function (value headers status req) #<bytecode 0x9793579e4fd9e9b>) :errorback t)

Thanks for looking!

Nacho

tarsius commented 4 months ago

3b91b959c035de57cbeebf3f269eea07dcd46d43 should do the trick.

nbarrientos commented 4 months ago

Much better, thanks :)