diff mbox series

[v2,5/5] doc: document the GitHub Release Artifact fetcher and GH_TOKEN

Message ID 20250227090853.1632280-6-l.goehrs@pengutronix.de
State Not Applicable
Headers show
Series fetch2/github_release_artifact: fetcher for (private) release artifacts | expand

Commit Message

Leonard Göhrs Feb. 27, 2025, 9:08 a.m. UTC
The fetcher is quite niche, as it is only required when working with
private GitHub repositories (public releases have a stable public download
URL and do not need any authentication).

Hence it is only documented like a niche feature.

Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
---
 .../bitbake-user-manual-fetching.rst                |  2 ++
 .../bitbake-user-manual-ref-variables.rst           | 13 +++++++++++++
 2 files changed, 15 insertions(+)

Comments

Antonin Godard March 3, 2025, 8:10 a.m. UTC | #1
Hi Leonard,

On Thu Feb 27, 2025 at 10:08 AM CET, Leonard Göhrs wrote:
> The fetcher is quite niche, as it is only required when working with
> private GitHub repositories (public releases have a stable public download
> URL and do not need any authentication).
>
> Hence it is only documented like a niche feature.
>
> Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
> ---
>  .../bitbake-user-manual-fetching.rst                |  2 ++
>  .../bitbake-user-manual-ref-variables.rst           | 13 +++++++++++++
>  2 files changed, 15 insertions(+)
>
> diff --git a/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst b/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
> index fb4f0a23d..2f5224482 100644
> --- a/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
> +++ b/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
> @@ -842,6 +842,8 @@ Fetch submodules also exist for the following:
>  
>  -  Trees using Git Annex (``gitannex://``)
>  
> +-  Private GitHub Release Artifacts (``ghra://``)
> +
>  No documentation currently exists for these lesser used fetcher
>  submodules. However, you might find the code helpful and readable.
>  
> diff --git a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
> index 858de6347..228443e0b 100644
> --- a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
> +++ b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
> @@ -1083,6 +1083,19 @@ overview of their function and contents.
>        layer containing the recipe file. Code can use this to identify which
>        layer a recipe is from.
>  
> +   :term:`GH_TOKEN`
> +      GitHub Access Token. When using the
> +      :ref:`GitHub Release Artifact fetcher <bitbake-user-manual/bitbake-user-manual-fetching:fetchers>`
> +      This variable can be defined to be used by the fetcher to authenticate
> +      and gain access to non-public release artifacts::
> +
> +         GH_TOKEN = "github_pat_..."
> +
> +      Alternatively, the token can be specified in :term:`SRC_URI` with the ``token``
> +      parameter::
> +
> +         SRC_URI = "ghra://github.com...;token=github_pat_..."
> +
>     :term:`GITDIR`
>        The directory in which a local copy of a Git repository is stored
>        when it is cloned.

Reviewed-by: Antonin Godard <antonin.godard@bootlin.com>

Thank you for the changes!
Antonin
diff mbox series

Patch

diff --git a/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst b/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
index fb4f0a23d..2f5224482 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
+++ b/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
@@ -842,6 +842,8 @@  Fetch submodules also exist for the following:
 
 -  Trees using Git Annex (``gitannex://``)
 
+-  Private GitHub Release Artifacts (``ghra://``)
+
 No documentation currently exists for these lesser used fetcher
 submodules. However, you might find the code helpful and readable.
 
diff --git a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
index 858de6347..228443e0b 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
+++ b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
@@ -1083,6 +1083,19 @@  overview of their function and contents.
       layer containing the recipe file. Code can use this to identify which
       layer a recipe is from.
 
+   :term:`GH_TOKEN`
+      GitHub Access Token. When using the
+      :ref:`GitHub Release Artifact fetcher <bitbake-user-manual/bitbake-user-manual-fetching:fetchers>`
+      This variable can be defined to be used by the fetcher to authenticate
+      and gain access to non-public release artifacts::
+
+         GH_TOKEN = "github_pat_..."
+
+      Alternatively, the token can be specified in :term:`SRC_URI` with the ``token``
+      parameter::
+
+         SRC_URI = "ghra://github.com...;token=github_pat_..."
+
    :term:`GITDIR`
       The directory in which a local copy of a Git repository is stored
       when it is cloned.