Skip to content

GitHub Repository

Pulls GitHub repository files to disk for compile pipeline scanning.

Only downloads target folders when no matching symbol files exist for the current branch commit SHA.

Configuration

To configure the GitHub repository module, Edit these settings.

Below is the default configuration from: github/config.yaml (* Required Fields).

Edit Online

Edit config.yaml Locally

# 🔟❎ 'compile' GitHub pull sources configuration

# Configures GitHub repositories folders to pull to disk to scan its contents.
# To learn more see https://doc.log10x.com/compile/pull/github

# For a reference list of industry-standard frameworks, see:
#   modules/pipelines/compile/modules/pull/github/library.yaml

# Set the 10x pipeline to 'compile'
tenx: compile

# ============================== GitHub Options ===============================

githubPull:

    # 'token' specifies the access token for this repo using a shell variable (recommended) or inline
    #  See https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
  - token: $=TenXEnv.get("GH_TOKEN")  # (❗ EnvVar REQUIRED)

    # 'repo' specifies the repo names to pull from Github (e.g., apache/spark)
    repos: [
      #owner/project
    ]

    # 'branch' specifies the branch to pull within 'repos'. If not set, pulls each repo's default branch
    branch: null

    # 'repoFolders' defines folders within 'repos' to pull. If not specified, pull the entire repo
    folders: [
      # src/main
    ]

Options

Specify the options below to configure multiple GitHub repository:

Name Description
githubPullRepos Names of repo(s) to pull
githubPullToken GitHub API access token
githubPullBranch Target branch
githubPullFolders Repo folders to pull

githubPullRepos

Names of repo(s) to pull.

Type Default
List []

Identifies GitHub repositories to pull in the form of username/owner (e.g., opensearch-project/OpenSearch).

githubPullToken

GitHub API access token.

Type Required
String

defines an access token for accessing Github repos. To learn more see GitHub tokens.

This value should be set via an environment variable:

githubPullToken: $=TenXEnv.get("GH_TOKEN")

githubPullBranch

Target branch.

Type Default
String ""

Specifies the branch to use when pulling from githubPullRepos. If omitted, use the repository's default branch.

githubPullFolders

Repo folders to pull.

Type Default
List []

Identifies folder(s) within githubPullRepos to pull. if omitted, the entire repo is pulled.


This module is defined in github/module.yaml.