Codebase list ghub-el / 62e8fe0
Import upstream version 3.5.3+git20210727.1.00a77b7 Debian Janitor 2 years ago
4 changed file(s) with 33 addition(s) and 29 deletion(s). Raw diff Collapse all Expand all
116116 (comments [(:edges t)]
117117 databaseId
118118 (author login)
119 createdAt
120 updatedAt
119 createdAt
120 updatedAt
121121 body)
122122 (labels [(:edges t)]
123123 id))
168168 databaseId
169169 (author login)
170170 createdAt
171 updatedAt
172 body)
171 updatedAt
172 body)
173173 (labels [(:edges t)]
174174 id)))))
175175
476476 `(,(car single)
477477 ,(vector (list (cadr single) (cdr (car lineage))))
478478 ,@(if (cdr lineage)
479 (ghub--graphql-narrow-query child (cdr lineage) cursor)
479 (ghub--graphql-narrow-query child (cdr lineage) cursor)
480480 child)))
481481 (let* ((child (or (assq (car lineage) (cdr query))
482482 ;; Alias
411411 (setq-default ghub-response-headers headers))
412412 page)
413413 (cdr (assq 'link-alist ghub-response-headers)))
414 (when-let ((rels (cdr (assoc "Link" (or headers ghub-response-headers)))))
415 (mapcar (lambda (elt)
416 (pcase-let ((`(,url ,rel) (split-string elt "; ")))
417 (cons (intern (substring rel 5 -1))
418 (substring url 1 -1))))
419 (split-string rels ", ")))))
414 (when-let ((rels (cdr (assoc "Link" (or headers ghub-response-headers)))))
415 (mapcar (lambda (elt)
416 (pcase-let ((`(,url ,rel) (split-string elt "; ")))
417 (cons (intern (substring rel 5 -1))
418 (substring url 1 -1))))
419 (split-string rels ", ")))))
420420
421421 (cl-defun ghub-repository-id (owner name &key username auth host forge noerror)
422422 "Return the id of the specified repository.
470470 - For any other non-nil value use the kludge, if and only if we
471471 believe that doing so is the correct thing to do.
472472
473 The default value of this variable is either nil or `forge'. It
474 is `forge' if using libgnutls >=3.6.3 (the version introducing
473 The default value of this variable is either nil or `force'. It
474 is `force' if using libgnutls >=3.6.3 (the version introducing
475475 TLS1.3); AND also using Emacs < 26.3 and/or macOS (any version).
476476
477477 If the value is any other non-nil value, then `ghub--retrieve'
77 #+TEXINFO_DIR_CATEGORY: Emacs
88 #+TEXINFO_DIR_TITLE: Ghub: (ghub).
99 #+TEXINFO_DIR_DESC: Minuscule client library for the Github API.
10 #+SUBTITLE: for version 3.5.3
10 #+SUBTITLE: for version 3.5.3 (v3.5.3-4-g39f9a5b+1)
1111
1212 #+TEXINFO_DEFFN: t
1313 #+OPTIONS: H:4 num:4 toc:2
1919 the APIs of various instances of various Git forge implementations.
2020
2121 #+TEXINFO: @noindent
22 This manual is for Ghub version 3.5.3.
22 This manual is for Ghub version 3.5.3 (v3.5.3-4-g39f9a5b+1).
2323
2424 #+BEGIN_QUOTE
2525 Copyright (C) 2017-2021 Jonas Bernoulli <jonas@bernoul.li>
150150 - ~gitea.HOST.user~ specifies the user for the HOST ~gitea~ instance.
151151 - ~gitea.host~ specifies the ~gitea~ host, unless the HOST argument is
152152 non-nil
153 - ~gogs.user~ is *not* used because no canonical ~gitea~ instance exists.
153 - ~gogs.user~ is *not* used because no canonical ~gogs~ instance exists.
154154 - ~gogs.HOST.user~ specifies the user for the HOST ~gogs~ instance.
155155 - ~gogs.host~ specifies the ~gogs~ host, unless the HOST argument is
156156 non-nil
166166
167167 *** Setting your Github.com Username
168168 :PROPERTIES:
169 :NONODE: t
169 :UNNUMBERED: notoc
170170 :END:
171171
172172 To inform Ghub about your "github.com" username do this:
185185
186186 *** Setting your Gitlab.com Username
187187 :PROPERTIES:
188 :NONODE: t
188 :UNNUMBERED: notoc
189189 :END:
190190
191191 To inform Ghub about your "gitlab.com" username do this:
207207
208208 *** Setting your Github Enterprise Username
209209 :PROPERTIES:
210 :NONODE: t
210 :UNNUMBERED: notoc
211211 :END:
212212
213213 For Github Enterprise instances you have to specify where the API
235235
236236 *** Setting your Username for Other Hosts and/or Forges
237237 :PROPERTIES:
238 :NONODE: t
238 :UNNUMBERED: notoc
239239 :END:
240240
241241 To inform Ghub about your username on HOST (a FORGE instance) do this:
268268 hosts:
269269
270270 - https://github.com/settings/tokens
271 - https://gitlab.com/profile/personal_access_tokens
271 - https://gitlab.com/-/profile/personal_access_tokens
272272
273273 For other forges we cannot provide a functioning URL because they
274274 contain unknown values such as your name. Just go to the general
3030 @finalout
3131 @titlepage
3232 @title Ghub User and Developer Manual
33 @subtitle for version 3.5.3
33 @subtitle for version 3.5.3 (v3.5.3-4-g39f9a5b+1)
3434 @author Jonas Bernoulli
3535 @page
3636 @vskip 0pt plus 1filll
4747 the APIs of various instances of various Git forge implementations.
4848
4949 @noindent
50 This manual is for Ghub version 3.5.3.
50 This manual is for Ghub version 3.5.3 (v3.5.3-4-g39f9a5b+1).
5151
5252 @quotation
5353 Copyright (C) 2017-2021 Jonas Bernoulli <jonas@@bernoul.li>
267267 non-nil
268268
269269 @item
270 @code{gogs.user} is @strong{not} used because no canonical @code{gitea} instance exists.
270 @code{gogs.user} is @strong{not} used because no canonical @code{gogs} instance exists.
271271
272272 @item
273273 @code{gogs.HOST.user} specifies the user for the HOST @code{gogs} instance.
286286 is needed because you might use different usernames on different
287287 hosts.
288288
289 @subsection Setting your Github.com Username
289 @anchor{Setting your Githubcom Username}
290 @subheading Setting your Github.com Username
290291
291292 To inform Ghub about your "github.com" username do this:
292293
302303 git config --local github.user USERNAME
303304 @end example
304305
305 @subsection Setting your Gitlab.com Username
306 @anchor{Setting your Gitlabcom Username}
307 @subheading Setting your Gitlab.com Username
306308
307309 To inform Ghub about your "gitlab.com" username do this:
308310
321323 Make sure you use the correct USERNAME for this forge/host. It might
322324 not be the same as on "github.com"!
323325
324 @subsection Setting your Github Enterprise Username
326 @anchor{Setting your Github Enterprise Username}
327 @subheading Setting your Github Enterprise Username
325328
326329 For Github Enterprise instances you have to specify where the API
327330 can be accessed and a different variable has to be used to set the
346349 git config --local github.host example.com/api/v3
347350 @end example
348351
349 @subsection Setting your Username for Other Hosts and/or Forges
352 @anchor{Setting your Username for Other Hosts and/or Forges}
353 @subheading Setting your Username for Other Hosts and/or Forges
350354
351355 To inform Ghub about your username on HOST (a FORGE instance) do this:
352356
390394 @uref{https://github.com/settings/tokens}
391395
392396 @item
393 @uref{https://gitlab.com/profile/personal_access_tokens}
397 @uref{https://gitlab.com/-/profile/personal_access_tokens}
394398 @end itemize
395399
396400 For other forges we cannot provide a functioning URL because they