Skip to content

Commit

Permalink
ghub-fetch-{repository,issue,pullreq}: Add headers argument
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Masson <[email protected]>
  • Loading branch information
JulienMasson committed Apr 15, 2020
1 parent a8bf337 commit fc8a400
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions ghub-graphql.el
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ behave as for `ghub-request' (which see)."

(cl-defun ghub-fetch-repository (owner name callback
&optional until
&key username auth host forge errorback)
&key username auth host forge
headers errorback)
"Asynchronously fetch forge data about the specified repository.
Once all data has been collected, CALLBACK is called with the
data as the only argument."
Expand All @@ -175,11 +176,13 @@ data as the only argument."
:auth auth
:host host
:forge forge
:headers headers
:errorback errorback))

(cl-defun ghub-fetch-issue (owner name number callback
&optional until
&key username auth host forge errorback)
&key username auth host forge
headers errorback)
"Asynchronously fetch forge data about the specified issue.
Once all data has been collected, CALLBACK is called with the
data as the only argument."
Expand All @@ -194,11 +197,13 @@ data as the only argument."
:auth auth
:host host
:forge forge
:headers headers
:errorback errorback))

(cl-defun ghub-fetch-pullreq (owner name number callback
&optional until
&key username auth host forge errorback)
&key username auth host forge
headers errorback)
"Asynchronously fetch forge data about the specified pull-request.
Once all data has been collected, CALLBACK is called with the
data as the only argument."
Expand All @@ -213,6 +218,7 @@ data as the only argument."
:auth auth
:host host
:forge forge
:headers headers
:errorback errorback))

;;; Internal
Expand All @@ -231,7 +237,7 @@ data as the only argument."
(cl-defun ghub--graphql-vacuum (query variables callback
&optional until
&key narrow username auth host forge
errorback)
headers errorback)
"Make a GraphQL request using QUERY and VARIABLES.
See Info node `(ghub)GraphQL Support'."
(unless host
Expand All @@ -246,7 +252,7 @@ See Info node `(ghub)GraphQL Support'."
(substring host 0 -3)
host)))
:method "POST"
:headers (ghub--headers nil host auth username forge)
:headers (ghub--headers headers host auth username forge)
:handler 'ghub--graphql-handle-response
:query query
:variables variables
Expand Down

0 comments on commit fc8a400

Please sign in to comment.