Full Code of actions/checkout for AI

main 0c366fd6a839 cached
103 files
1.6 MB
475.2k tokens
1472 symbols
1 requests
Download .txt
Showing preview only (1,694K chars total). Download the full file or copy to clipboard to get everything.
Repository: actions/checkout
Branch: main
Commit: 0c366fd6a839
Files: 103
Total size: 1.6 MB

Directory structure:
gitextract_klaxvgmx/

├── .eslintignore
├── .eslintrc.json
├── .gitattributes
├── .github/
│   ├── dependabot.yml
│   └── workflows/
│       ├── check-dist.yml
│       ├── codeql-analysis.yml
│       ├── licensed.yml
│       ├── publish-immutable-actions.yml
│       ├── test.yml
│       ├── update-main-version.yml
│       └── update-test-ubuntu-git.yml
├── .gitignore
├── .licensed.yml
├── .licenses/
│   └── npm/
│       ├── @actions/
│       │   ├── core.dep.yml
│       │   ├── exec.dep.yml
│       │   ├── github.dep.yml
│       │   ├── http-client.dep.yml
│       │   ├── io.dep.yml
│       │   └── tool-cache.dep.yml
│       ├── @fastify/
│       │   └── busboy.dep.yml
│       ├── @octokit/
│       │   ├── auth-token.dep.yml
│       │   ├── core.dep.yml
│       │   ├── endpoint.dep.yml
│       │   ├── graphql.dep.yml
│       │   ├── openapi-types-20.0.0.dep.yml
│       │   ├── openapi-types-22.1.0.dep.yml
│       │   ├── plugin-paginate-rest.dep.yml
│       │   ├── plugin-rest-endpoint-methods.dep.yml
│       │   ├── request-error.dep.yml
│       │   ├── request.dep.yml
│       │   ├── types-12.6.0.dep.yml
│       │   └── types-13.4.1.dep.yml
│       ├── before-after-hook.dep.yml
│       ├── deprecation.dep.yml
│       ├── once.dep.yml
│       ├── semver.dep.yml
│       ├── tunnel.dep.yml
│       ├── undici.dep.yml
│       ├── universal-user-agent.dep.yml
│       ├── uuid-3.4.0.dep.yml
│       ├── uuid-8.3.2.dep.yml
│       ├── uuid-9.0.1.dep.yml
│       └── wrappy.dep.yml
├── .prettierignore
├── .prettierrc.json
├── CHANGELOG.md
├── CODEOWNERS
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── __test__/
│   ├── git-auth-helper.test.ts
│   ├── git-command-manager.test.ts
│   ├── git-directory-helper.test.ts
│   ├── git-version.test.ts
│   ├── input-helper.test.ts
│   ├── modify-work-tree.sh
│   ├── override-git-version.cmd
│   ├── override-git-version.sh
│   ├── ref-helper.test.ts
│   ├── retry-helper.test.ts
│   ├── url-helper.test.ts
│   ├── verify-basic.sh
│   ├── verify-clean.sh
│   ├── verify-fetch-filter.sh
│   ├── verify-fetch-tags.sh
│   ├── verify-lfs.sh
│   ├── verify-no-unstaged-changes.sh
│   ├── verify-side-by-side.sh
│   ├── verify-sparse-checkout-non-cone-mode.sh
│   ├── verify-sparse-checkout.sh
│   ├── verify-submodules-false.sh
│   ├── verify-submodules-recursive.sh
│   ├── verify-submodules-true.sh
│   └── verify-worktree.sh
├── action.yml
├── adrs/
│   └── 0153-checkout-v2.md
├── dist/
│   ├── index.js
│   └── problem-matcher.json
├── images/
│   ├── test-ubuntu-git.Dockerfile
│   └── test-ubuntu-git.md
├── jest.config.js
├── package.json
├── src/
│   ├── fs-helper.ts
│   ├── git-auth-helper.ts
│   ├── git-command-manager.ts
│   ├── git-directory-helper.ts
│   ├── git-source-provider.ts
│   ├── git-source-settings.ts
│   ├── git-version.ts
│   ├── github-api-helper.ts
│   ├── input-helper.ts
│   ├── main.ts
│   ├── misc/
│   │   ├── generate-docs.ts
│   │   ├── licensed-check.sh
│   │   ├── licensed-download.sh
│   │   └── licensed-generate.sh
│   ├── ref-helper.ts
│   ├── regexp-helper.ts
│   ├── retry-helper.ts
│   ├── state-helper.ts
│   ├── url-helper.ts
│   └── workflow-context-helper.ts
└── tsconfig.json

================================================
FILE CONTENTS
================================================

================================================
FILE: .eslintignore
================================================
dist/
lib/
node_modules/


================================================
FILE: .eslintrc.json
================================================
{
  "plugins": ["jest", "@typescript-eslint"],
  "extends": ["plugin:github/recommended"],
  "parser": "@typescript-eslint/parser",
  "parserOptions": {
    "ecmaVersion": 9,
    "sourceType": "module",
    "project": "./tsconfig.json"
  },
  "rules": {
    "eslint-comments/no-use": "off",
    "import/no-namespace": "off",
    "no-unused-vars": "off",
    "@typescript-eslint/no-unused-vars": "error",
    "@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}],
    "@typescript-eslint/no-require-imports": "error",
    "@typescript-eslint/array-type": "error",
    "@typescript-eslint/await-thenable": "error",
    "camelcase": "off",
    "@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
    "@typescript-eslint/func-call-spacing": ["error", "never"],
    "@typescript-eslint/no-array-constructor": "error",
    "@typescript-eslint/no-empty-interface": "error",
    "@typescript-eslint/no-explicit-any": "error",
    "@typescript-eslint/no-extraneous-class": "error",
    "@typescript-eslint/no-floating-promises": "error",
    "@typescript-eslint/no-for-in-array": "error",
    "@typescript-eslint/no-inferrable-types": "error",
    "@typescript-eslint/no-misused-new": "error",
    "@typescript-eslint/no-namespace": "error",
    "@typescript-eslint/no-non-null-assertion": "warn",
    "@typescript-eslint/no-unnecessary-qualifier": "error",
    "@typescript-eslint/no-unnecessary-type-assertion": "error",
    "@typescript-eslint/no-useless-constructor": "error",
    "@typescript-eslint/no-var-requires": "error",
    "@typescript-eslint/prefer-for-of": "warn",
    "@typescript-eslint/prefer-function-type": "warn",
    "@typescript-eslint/prefer-includes": "error",
    "@typescript-eslint/prefer-string-starts-ends-with": "error",
    "@typescript-eslint/promise-function-async": "error",
    "@typescript-eslint/require-array-sort-compare": "error",
    "@typescript-eslint/restrict-plus-operands": "error",
    "semi": "off",
    "@typescript-eslint/semi": ["error", "never"],
    "@typescript-eslint/type-annotation-spacing": "error",
    "@typescript-eslint/unbound-method": "error"
  },
  "env": {
    "node": true,
    "es6": true,
    "jest/globals": true
  }
}


================================================
FILE: .gitattributes
================================================
.licenses/** -diff linguist-generated=true

================================================
FILE: .github/dependabot.yml
================================================
---
version: 2

updates:
- package-ecosystem: "npm"
  directory: "/"
  schedule:
    interval: "weekly"
  groups:
    minor-npm-dependencies:
      # NPM: Only group minor and patch updates (we want to carefully review major updates)
      update-types: [minor, patch]
- package-ecosystem: "github-actions"
  directory: "/"
  schedule:
    interval: "weekly"
  groups:
    minor-actions-dependencies:
      # GitHub Actions: Only group minor and patch updates (we want to carefully review major updates)
      update-types: [minor, patch]


================================================
FILE: .github/workflows/check-dist.yml
================================================
# `dist/index.js` is a special file in Actions.
# When you reference an action with `uses:` in a workflow,
# `index.js` is the code that will run.
# For our project, we generate this file through a build process
# from other source files.
# We need to make sure the checked-in `index.js` actually matches what we expect it to be.
name: Check dist

on:
  push:
    branches:
      - main
    paths-ignore:
      - '**.md'
  pull_request:
    paths-ignore:
      - '**.md'
  workflow_dispatch:

jobs:
  check-dist:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v6

      - name: Set Node.js 24.x
        uses: actions/setup-node@v4
        with:
          node-version: 24.x

      - name: Install dependencies
        run: npm ci

      - name: Rebuild the index.js file
        run: npm run build

      - name: Compare the expected and actual dist/ directories
        run: |
          if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
            echo "Detected uncommitted changes after build.  See status below:"
            git diff
            exit 1
          fi

      # If dist/ was different than expected, upload the expected version as an artifact
      - uses: actions/upload-artifact@v4
        if: ${{ failure() && steps.diff.conclusion == 'failure' }}
        with:
          name: dist
          path: dist/


================================================
FILE: .github/workflows/codeql-analysis.yml
================================================
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
  push:
    branches: [ main ]
  pull_request:
    # The branches below must be a subset of the branches above
    branches: [ main ]
  schedule:
    - cron: '28 9 * * 0'

jobs:
  analyze:
    name: Analyze
    runs-on: ubuntu-latest
    permissions:
      actions: read
      contents: read
      security-events: write

    strategy:
      fail-fast: false
      matrix:
        language: [ 'javascript' ]
        # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
        # Learn more:
        # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

    steps:
    - name: Checkout repository
      uses: actions/checkout@v6

    - name: Initialize CodeQL
      uses: github/codeql-action/init@v3
      with:
        languages: ${{ matrix.language }}
        # If you wish to specify custom queries, you can do so here or in a config file.
        # By default, queries listed here will override any specified in a config file.
        # Prefix the list here with "+" to use these queries and those in the config file.
        # queries: ./path/to/local/query, your-org/your-repo/queries@main

    - run: npm ci
    - run: npm run build
    - run: rm -rf dist # We want code scanning to analyze lib instead (individual .js files)

    - name: Perform CodeQL Analysis
      uses: github/codeql-action/analyze@v3


================================================
FILE: .github/workflows/licensed.yml
================================================
name: Licensed

on:
  push: {branches: main}
  pull_request: {branches: main}

jobs:
  test:
    runs-on: ubuntu-latest
    name: Check licenses
    steps:
      - uses: actions/checkout@v6
      - run: npm ci
      - run: npm run licensed-check

================================================
FILE: .github/workflows/publish-immutable-actions.yml
================================================
name: 'Publish Immutable Action Version'

on:
  release:
    types: [published]

jobs:
  publish:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      id-token: write
      packages: write

    steps:
      - name: Checking out
        uses: actions/checkout@v6
      - name: Publish
        id: publish
        uses: actions/publish-immutable-action@0.0.3


================================================
FILE: .github/workflows/test.yml
================================================
name: Build and Test

on:
  pull_request:
  push:
    branches:
      - main
      - releases/*


# Note that when you see patterns like "ref: test-data/v2/basic" within this workflow,
# these refer to "test-data" branches on this actions/checkout repo.
# (For example, test-data/v2/basic -> https://github.com/actions/checkout/tree/test-data/v2/basic)

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/setup-node@v4
        with:
          node-version: 24.x
      - uses: actions/checkout@v6
      - run: npm ci
      - run: npm run build
      - run: npm run format-check
      - run: npm run lint
      - run: npm test
      - name: Verify no unstaged changes
        run: __test__/verify-no-unstaged-changes.sh

  test:
    strategy:
      matrix:
        runs-on: [ubuntu-latest, macos-latest, windows-latest]
    runs-on: ${{ matrix.runs-on }}

    steps:
      # Clone this repo
      - name: Checkout
        uses: actions/checkout@v6

      # Basic checkout
      - name: Checkout basic
        uses: ./
        with:
          ref: test-data/v2/basic
          path: basic
      - name: Verify basic
        shell: bash
        run: __test__/verify-basic.sh

      # Clean
      - name: Modify work tree
        shell: bash
        run: __test__/modify-work-tree.sh
      - name: Checkout clean
        uses: ./
        with:
          ref: test-data/v2/basic
          path: basic
      - name: Verify clean
        shell: bash
        run: __test__/verify-clean.sh

      # Side by side
      - name: Checkout side by side 1
        uses: ./
        with:
          ref: test-data/v2/side-by-side-1
          path: side-by-side-1
      - name: Checkout side by side 2
        uses: ./
        with:
          ref: test-data/v2/side-by-side-2
          path: side-by-side-2
      - name: Verify side by side
        shell: bash
        run: __test__/verify-side-by-side.sh

      # Filter
      - name: Fetch filter
        uses: ./
        with:
          filter: 'blob:none'
          path: fetch-filter

      - name: Verify fetch filter
        run: __test__/verify-fetch-filter.sh

      # Fetch tags
      - name: Checkout with fetch-tags
        uses: ./
        with:
          ref: test-data/v2/basic
          path: fetch-tags-test
          fetch-tags: true
      - name: Verify fetch-tags
        shell: bash
        run: __test__/verify-fetch-tags.sh

      # Sparse checkout
      - name: Sparse checkout
        uses: ./
        with:
          sparse-checkout: |
            __test__
            .github
            dist
          path: sparse-checkout

      - name: Verify sparse checkout
        run: __test__/verify-sparse-checkout.sh

      # Disabled sparse checkout in existing checkout
      - name: Disabled sparse checkout
        uses: ./
        with:
          path: sparse-checkout

      - name: Verify disabled sparse checkout
        shell: bash
        run: set -x && ls -l sparse-checkout/src/git-command-manager.ts

      # Sparse checkout (non-cone mode)
      - name: Sparse checkout (non-cone mode)
        uses: ./
        with:
          sparse-checkout: |
            /__test__/
            /.github/
            /dist/
          sparse-checkout-cone-mode: false
          path: sparse-checkout-non-cone-mode

      - name: Verify sparse checkout (non-cone mode)
        run: __test__/verify-sparse-checkout-non-cone-mode.sh

      # LFS
      - name: Checkout LFS
        uses: ./
        with:
          repository: actions/checkout # hardcoded, otherwise doesn't work from a fork
          ref: test-data/v2/lfs
          path: lfs
          lfs: true
      - name: Verify LFS
        shell: bash
        run: __test__/verify-lfs.sh

      # Submodules false
      - name: Checkout submodules false
        uses: ./
        with:
          ref: test-data/v2/submodule-ssh-url
          path: submodules-false
      - name: Verify submodules false
        run: __test__/verify-submodules-false.sh

      # Submodules one level
      - name: Checkout submodules true
        uses: ./
        with:
          ref: test-data/v2/submodule-ssh-url
          path: submodules-true
          submodules: true
      - name: Verify submodules true
        run: __test__/verify-submodules-true.sh

      # Submodules recursive
      - name: Checkout submodules recursive
        uses: ./
        with:
          ref: test-data/v2/submodule-ssh-url
          path: submodules-recursive
          submodules: recursive
      - name: Verify submodules recursive
        run: __test__/verify-submodules-recursive.sh

      # Worktree credentials
      - name: Checkout for worktree test
        uses: ./
        with:
          path: worktree-test
      - name: Verify worktree credentials
        shell: bash
        run: __test__/verify-worktree.sh worktree-test worktree-branch

      # Worktree credentials in container step
      - name: Verify worktree credentials in container step
        if: runner.os == 'Linux'
        uses: docker://bitnami/git:latest
        with:
          args: bash __test__/verify-worktree.sh worktree-test container-worktree-branch

      # Basic checkout using REST API
      - name: Remove basic
        if: runner.os != 'windows'
        run: rm -rf basic
      - name: Remove basic (Windows)
        if: runner.os == 'windows'
        shell: cmd
        run: rmdir /s /q basic
      - name: Override git version
        if: runner.os != 'windows'
        run: __test__/override-git-version.sh
      - name: Override git version (Windows)
        if: runner.os == 'windows'
        run: __test__\\override-git-version.cmd
      - name: Checkout basic using REST API
        uses: ./
        with:
          ref: test-data/v2/basic
          path: basic
      - name: Verify basic
        run: __test__/verify-basic.sh --archive

  test-proxy:
    runs-on: ubuntu-latest
    container:
      image: ghcr.io/actions/test-ubuntu-git:main.20240221.114913.703z
      options: --dns 127.0.0.1
    services:
      squid-proxy:
        image: ubuntu/squid:latest
        ports:
          - 3128:3128
    env:
      https_proxy: http://squid-proxy:3128
    steps:
      # Clone this repo
      - name: Checkout
        uses: actions/checkout@v6

      # Basic checkout using git
      - name: Checkout basic
        uses: ./
        with:
          ref: test-data/v2/basic
          path: basic
      - name: Verify basic
        run: __test__/verify-basic.sh

      # Basic checkout using REST API
      - name: Remove basic
        run: rm -rf basic
      - name: Override git version
        run: __test__/override-git-version.sh
      - name: Basic checkout using REST API
        uses: ./
        with:
          ref: test-data/v2/basic
          path: basic
      - name: Verify basic
        run: __test__/verify-basic.sh --archive

  test-bypass-proxy:
    runs-on: ubuntu-latest
    env:
      https_proxy: http://no-such-proxy:3128
      no_proxy: api.github.com,github.com
    steps:
      # Clone this repo
      - name: Checkout
        uses: actions/checkout@v6

      # Basic checkout using git
      - name: Checkout basic
        uses: ./
        with:
          ref: test-data/v2/basic
          path: basic
      - name: Verify basic
        run: __test__/verify-basic.sh
      - name: Remove basic
        run: rm -rf basic

      # Basic checkout using REST API
      - name: Override git version
        run: __test__/override-git-version.sh
      - name: Checkout basic using REST API
        uses: ./
        with:
          ref: test-data/v2/basic
          path: basic
      - name: Verify basic
        run: __test__/verify-basic.sh --archive

  test-git-container:
    runs-on: ubuntu-latest
    container: bitnami/git:latest
    steps:
      # Clone this repo
      - name: Checkout
        uses: actions/checkout@v6
        with:
          path: localClone

      # Basic checkout using git
      - name: Checkout basic
        uses: ./localClone
        with:
          ref: test-data/v2/basic
      - name: Verify basic
        run: |
          if [ ! -f "./basic-file.txt" ]; then
              echo "Expected basic file does not exist"
              exit 1
          fi

          # Verify .git folder
          if [ ! -d "./.git" ]; then
            echo "Expected ./.git folder to exist"
            exit 1
          fi

          # Verify auth token
          git config --global --add safe.directory "*"
          git fetch --no-tags --depth=1 origin +refs/heads/main:refs/remotes/origin/main

      # needed to make checkout post cleanup succeed
      - name: Fix Checkout v6
        uses: actions/checkout@v6
        with:
          path: localClone

  test-output:
    runs-on: ubuntu-latest
    steps:
      # Clone this repo
      - name: Checkout
        uses: actions/checkout@v6
        with:
          path: actions-checkout

      # Basic checkout using git
      - name: Checkout basic
        id: checkout
        uses: ./actions-checkout
        with:
          path: cloned-using-local-action
          ref: test-data/v2/basic

      # Verify output
      - name: Verify output
        run: |
          echo "Commit: ${{ steps.checkout.outputs.commit }}"
          echo "Ref: ${{ steps.checkout.outputs.ref }}"

          if [ "${{ steps.checkout.outputs.ref }}" != "test-data/v2/basic" ]; then
            echo "Expected ref to be test-data/v2/basic"
            exit 1
          fi

          if [ "${{ steps.checkout.outputs.commit }}" != "82f71901cf8c021332310dcc8cdba84c4193ff5d" ]; then
            echo "Expected commit to be 82f71901cf8c021332310dcc8cdba84c4193ff5d"
            exit 1
          fi


================================================
FILE: .github/workflows/update-main-version.yml
================================================
name: Update Main Version
run-name: Move ${{ github.event.inputs.major_version }} to ${{ github.event.inputs.target }}

on:
  workflow_dispatch:
    inputs:
      target:
        description: The tag or reference to use
        required: true
      major_version:
        type: choice
        description: The major version to update
        options:
          - v5
          - v4
          - v3
          - v2

jobs:
  tag:
    runs-on: ubuntu-latest
    steps:
    # Note this update workflow can also be used as a rollback tool.
    # For that reason, it's best to pin `actions/checkout` to a known, stable version
    # (typically, about two releases back).
    - uses: actions/checkout@v6
      with:
        fetch-depth: 0
    - name: Git config
      run: |
        git config user.name "github-actions[bot]"
        git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
    - name: Tag new target
      run: git tag -f ${{ github.event.inputs.major_version }} ${{ github.event.inputs.target }}
    - name: Push new tag
      run: git push origin ${{ github.event.inputs.major_version }} --force


================================================
FILE: .github/workflows/update-test-ubuntu-git.yml
================================================
name: Publish test-ubuntu-git Container

on:
  # Use an on demand workflow trigger.  
  # (Forked copies of actions/checkout won't have permission to update GHCR.io/actions, 
  #  so avoid trigger events that run automatically.)
  workflow_dispatch:
    inputs:
      publish:
        description:  'Publish to ghcr.io? (main branch only)'
        type: boolean
        required: true
        default: false

env:
  REGISTRY: ghcr.io
  IMAGE_NAME: actions/test-ubuntu-git

jobs:
  build-and-push-image:
    runs-on: ubuntu-latest
    # Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
    permissions:
      contents: read
      packages: write
 
    steps:
      - name: Checkout repository
        uses: actions/checkout@v6

      # Use `docker/login-action` to log in to GHCR.io. 
      # Once published, the packages are scoped to the account defined here.
      - name: Log in to the ghcr.io container registry
        uses: docker/login-action@v3.3.0
        with:
          registry: ${{ env.REGISTRY }}
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}

      - name: Format Timestamp
        id: timestamp
        # Use `date` with a custom format to achieve the key=value format GITHUB_OUTPUT expects.
        run: date -u "+now=%Y%m%d.%H%M%S.%3NZ" >> "$GITHUB_OUTPUT"

      - name: Issue Image Publish Warning
        if:  ${{ inputs.publish && github.ref_name != 'main' }}
        run: echo "::warning::test-ubuntu-git images can only be published from the actions/checkout 'main' branch.  Workflow will continue with push/publish disabled."

      # Use `docker/build-push-action` to build (and optionally publish) the image. 
      - name: Build Docker Image (with optional Push)
        uses: docker/build-push-action@v6.5.0
        with:
          context: .
          file: images/test-ubuntu-git.Dockerfile
          # For now, attempts to push to ghcr.io must target the `main` branch.
          # In the future, consider also allowing attempts from `releases/*` branches.
          push: ${{ inputs.publish && github.ref_name == 'main' }}
          tags: |
            ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}.${{ steps.timestamp.outputs.now }}


================================================
FILE: .gitignore
================================================
__test__/_temp
_temp/
lib/
node_modules/
.vscode/

================================================
FILE: .licensed.yml
================================================
sources:
  npm: true

allowed:
  - apache-2.0
  - bsd-2-clause
  - bsd-3-clause
  - isc
  - mit
  - cc0-1.0
  - unlicense

reviewed:
  npm:

================================================
FILE: .licenses/npm/@actions/core.dep.yml
================================================
---
name: "@actions/core"
version: 1.10.1
type: npm
summary: Actions core lib
homepage: https://github.com/actions/toolkit/tree/main/packages/core
license: mit
licenses:
- sources: LICENSE.md
  text: |-
    The MIT License (MIT)

    Copyright 2019 GitHub

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
notices: []


================================================
FILE: .licenses/npm/@actions/exec.dep.yml
================================================
---
name: "@actions/exec"
version: 1.1.1
type: npm
summary: Actions exec lib
homepage: https://github.com/actions/toolkit/tree/main/packages/exec
license: mit
licenses:
- sources: LICENSE.md
  text: |-
    The MIT License (MIT)

    Copyright 2019 GitHub

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
notices: []


================================================
FILE: .licenses/npm/@actions/github.dep.yml
================================================
---
name: "@actions/github"
version: 6.0.0
type: npm
summary: Actions github lib
homepage: https://github.com/actions/toolkit/tree/main/packages/github
license: mit
licenses:
- sources: LICENSE.md
  text: |-
    The MIT License (MIT)

    Copyright 2019 GitHub

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
notices: []


================================================
FILE: .licenses/npm/@actions/http-client.dep.yml
================================================
---
name: "@actions/http-client"
version: 2.2.1
type: npm
summary: Actions Http Client
homepage: https://github.com/actions/toolkit/tree/main/packages/http-client
license: mit
licenses:
- sources: LICENSE
  text: |
    Actions Http Client for Node.js

    Copyright (c) GitHub, Inc.

    All rights reserved.

    MIT License

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
    associated documentation files (the "Software"), to deal in the Software without restriction,
    including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
    and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
    subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
    LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
    NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
notices: []


================================================
FILE: .licenses/npm/@actions/io.dep.yml
================================================
---
name: "@actions/io"
version: 1.1.3
type: npm
summary: Actions io lib
homepage: https://github.com/actions/toolkit/tree/main/packages/io
license: mit
licenses:
- sources: LICENSE.md
  text: |-
    The MIT License (MIT)

    Copyright 2019 GitHub

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
notices: []


================================================
FILE: .licenses/npm/@actions/tool-cache.dep.yml
================================================
---
name: "@actions/tool-cache"
version: 2.0.1
type: npm
summary: Actions tool-cache lib
homepage: https://github.com/actions/toolkit/tree/main/packages/tool-cache
license: mit
licenses:
- sources: LICENSE.md
  text: |-
    The MIT License (MIT)

    Copyright 2019 GitHub

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
notices: []


================================================
FILE: .licenses/npm/@fastify/busboy.dep.yml
================================================
---
name: "@fastify/busboy"
version: 2.1.1
type: npm
summary: A streaming parser for HTML form data for node.js
homepage: 
license: mit
licenses:
- sources: LICENSE
  text: |-
    Copyright Brian White. All rights reserved.

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to
    deal in the Software without restriction, including without limitation the
    rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
    sell copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
    IN THE SOFTWARE.
notices: []


================================================
FILE: .licenses/npm/@octokit/auth-token.dep.yml
================================================
---
name: "@octokit/auth-token"
version: 4.0.0
type: npm
summary: GitHub API token authentication for browsers and Node.js
homepage: 
license: mit
licenses:
- sources: LICENSE
  text: |
    The MIT License

    Copyright (c) 2019 Octokit contributors

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    THE SOFTWARE.
- sources: README.md
  text: "[MIT](LICENSE)"
notices: []


================================================
FILE: .licenses/npm/@octokit/core.dep.yml
================================================
---
name: "@octokit/core"
version: 5.2.0
type: npm
summary: Extendable client for GitHub's REST & GraphQL APIs
homepage: 
license: mit
licenses:
- sources: LICENSE
  text: |
    The MIT License

    Copyright (c) 2019 Octokit contributors

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    THE SOFTWARE.
- sources: README.md
  text: "[MIT](LICENSE)"
notices: []


================================================
FILE: .licenses/npm/@octokit/endpoint.dep.yml
================================================
---
name: "@octokit/endpoint"
version: 9.0.6
type: npm
summary: Turns REST API endpoints into generic request options
homepage:
license: mit
licenses:
- sources: LICENSE
  text: |
    The MIT License

    Copyright (c) 2018 Octokit contributors

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    THE SOFTWARE.
- sources: README.md
  text: "[MIT](LICENSE)"
notices: []


================================================
FILE: .licenses/npm/@octokit/graphql.dep.yml
================================================
---
name: "@octokit/graphql"
version: 7.1.0
type: npm
summary: GitHub GraphQL API client for browsers and Node
homepage: 
license: mit
licenses:
- sources: LICENSE
  text: |
    The MIT License

    Copyright (c) 2018 Octokit contributors

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    THE SOFTWARE.
- sources: README.md
  text: "[MIT](LICENSE)"
notices: []


================================================
FILE: .licenses/npm/@octokit/openapi-types-20.0.0.dep.yml
================================================
---
name: "@octokit/openapi-types"
version: 20.0.0
type: npm
summary: Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com
homepage: 
license: mit
licenses:
- sources: LICENSE
  text: |-
    Copyright 2020 Gregor Martynus

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- sources: README.md
  text: "[MIT](LICENSE)"
notices: []


================================================
FILE: .licenses/npm/@octokit/openapi-types-22.1.0.dep.yml
================================================
---
name: "@octokit/openapi-types"
version: 22.1.0
type: npm
summary: Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com
homepage: 
license: mit
licenses:
- sources: LICENSE
  text: |-
    Copyright 2020 Gregor Martynus

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- sources: README.md
  text: "[MIT](LICENSE)"
notices: []


================================================
FILE: .licenses/npm/@octokit/plugin-paginate-rest.dep.yml
================================================
---
name: "@octokit/plugin-paginate-rest"
version: 9.2.2
type: npm
summary: Octokit plugin to paginate REST API endpoint responses
homepage:
license: mit
licenses:
- sources: LICENSE
  text: |
    MIT License Copyright (c) 2019 Octokit contributors

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- sources: README.md
  text: "[MIT](LICENSE)"
notices: []


================================================
FILE: .licenses/npm/@octokit/plugin-rest-endpoint-methods.dep.yml
================================================
---
name: "@octokit/plugin-rest-endpoint-methods"
version: 10.4.1
type: npm
summary: Octokit plugin adding one method for all of api.github.com REST API endpoints
homepage: 
license: mit
licenses:
- sources: LICENSE
  text: |
    MIT License Copyright (c) 2019 Octokit contributors

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- sources: README.md
  text: "[MIT](LICENSE)"
notices: []


================================================
FILE: .licenses/npm/@octokit/request-error.dep.yml
================================================
---
name: "@octokit/request-error"
version: 5.1.1
type: npm
summary: Error class for Octokit request errors
homepage:
license: mit
licenses:
- sources: LICENSE
  text: |
    The MIT License

    Copyright (c) 2019 Octokit contributors

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    THE SOFTWARE.
- sources: README.md
  text: "[MIT](LICENSE)"
notices: []


================================================
FILE: .licenses/npm/@octokit/request.dep.yml
================================================
---
name: "@octokit/request"
version: 8.4.1
type: npm
summary: Send parameterized requests to GitHub's APIs with sensible defaults in browsers
  and Node
homepage:
license: mit
licenses:
- sources: LICENSE
  text: |
    The MIT License

    Copyright (c) 2018 Octokit contributors

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    THE SOFTWARE.
- sources: README.md
  text: "[MIT](LICENSE)"
notices: []


================================================
FILE: .licenses/npm/@octokit/types-12.6.0.dep.yml
================================================
---
name: "@octokit/types"
version: 12.6.0
type: npm
summary: Shared TypeScript definitions for Octokit projects
homepage: 
license: mit
licenses:
- sources: LICENSE
  text: |
    MIT License Copyright (c) 2019 Octokit contributors

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- sources: README.md
  text: "[MIT](LICENSE)"
notices: []


================================================
FILE: .licenses/npm/@octokit/types-13.4.1.dep.yml
================================================
---
name: "@octokit/types"
version: 13.4.1
type: npm
summary: Shared TypeScript definitions for Octokit projects
homepage: 
license: mit
licenses:
- sources: LICENSE
  text: |
    MIT License Copyright (c) 2019 Octokit contributors

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- sources: README.md
  text: "[MIT](LICENSE)"
notices: []


================================================
FILE: .licenses/npm/before-after-hook.dep.yml
================================================
---
name: before-after-hook
version: 2.2.3
type: npm
summary: asynchronous before/error/after hooks for internal functionality
homepage: 
license: apache-2.0
licenses:
- sources: LICENSE
  text: |2
                                     Apache License
                               Version 2.0, January 2004
                            http://www.apache.org/licenses/

       TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

       1. Definitions.

          "License" shall mean the terms and conditions for use, reproduction,
          and distribution as defined by Sections 1 through 9 of this document.

          "Licensor" shall mean the copyright owner or entity authorized by
          the copyright owner that is granting the License.

          "Legal Entity" shall mean the union of the acting entity and all
          other entities that control, are controlled by, or are under common
          control with that entity. For the purposes of this definition,
          "control" means (i) the power, direct or indirect, to cause the
          direction or management of such entity, whether by contract or
          otherwise, or (ii) ownership of fifty percent (50%) or more of the
          outstanding shares, or (iii) beneficial ownership of such entity.

          "You" (or "Your") shall mean an individual or Legal Entity
          exercising permissions granted by this License.

          "Source" form shall mean the preferred form for making modifications,
          including but not limited to software source code, documentation
          source, and configuration files.

          "Object" form shall mean any form resulting from mechanical
          transformation or translation of a Source form, including but
          not limited to compiled object code, generated documentation,
          and conversions to other media types.

          "Work" shall mean the work of authorship, whether in Source or
          Object form, made available under the License, as indicated by a
          copyright notice that is included in or attached to the work
          (an example is provided in the Appendix below).

          "Derivative Works" shall mean any work, whether in Source or Object
          form, that is based on (or derived from) the Work and for which the
          editorial revisions, annotations, elaborations, or other modifications
          represent, as a whole, an original work of authorship. For the purposes
          of this License, Derivative Works shall not include works that remain
          separable from, or merely link (or bind by name) to the interfaces of,
          the Work and Derivative Works thereof.

          "Contribution" shall mean any work of authorship, including
          the original version of the Work and any modifications or additions
          to that Work or Derivative Works thereof, that is intentionally
          submitted to Licensor for inclusion in the Work by the copyright owner
          or by an individual or Legal Entity authorized to submit on behalf of
          the copyright owner. For the purposes of this definition, "submitted"
          means any form of electronic, verbal, or written communication sent
          to the Licensor or its representatives, including but not limited to
          communication on electronic mailing lists, source code control systems,
          and issue tracking systems that are managed by, or on behalf of, the
          Licensor for the purpose of discussing and improving the Work, but
          excluding communication that is conspicuously marked or otherwise
          designated in writing by the copyright owner as "Not a Contribution."

          "Contributor" shall mean Licensor and any individual or Legal Entity
          on behalf of whom a Contribution has been received by Licensor and
          subsequently incorporated within the Work.

       2. Grant of Copyright License. Subject to the terms and conditions of
          this License, each Contributor hereby grants to You a perpetual,
          worldwide, non-exclusive, no-charge, royalty-free, irrevocable
          copyright license to reproduce, prepare Derivative Works of,
          publicly display, publicly perform, sublicense, and distribute the
          Work and such Derivative Works in Source or Object form.

       3. Grant of Patent License. Subject to the terms and conditions of
          this License, each Contributor hereby grants to You a perpetual,
          worldwide, non-exclusive, no-charge, royalty-free, irrevocable
          (except as stated in this section) patent license to make, have made,
          use, offer to sell, sell, import, and otherwise transfer the Work,
          where such license applies only to those patent claims licensable
          by such Contributor that are necessarily infringed by their
          Contribution(s) alone or by combination of their Contribution(s)
          with the Work to which such Contribution(s) was submitted. If You
          institute patent litigation against any entity (including a
          cross-claim or counterclaim in a lawsuit) alleging that the Work
          or a Contribution incorporated within the Work constitutes direct
          or contributory patent infringement, then any patent licenses
          granted to You under this License for that Work shall terminate
          as of the date such litigation is filed.

       4. Redistribution. You may reproduce and distribute copies of the
          Work or Derivative Works thereof in any medium, with or without
          modifications, and in Source or Object form, provided that You
          meet the following conditions:

          (a) You must give any other recipients of the Work or
              Derivative Works a copy of this License; and

          (b) You must cause any modified files to carry prominent notices
              stating that You changed the files; and

          (c) You must retain, in the Source form of any Derivative Works
              that You distribute, all copyright, patent, trademark, and
              attribution notices from the Source form of the Work,
              excluding those notices that do not pertain to any part of
              the Derivative Works; and

          (d) If the Work includes a "NOTICE" text file as part of its
              distribution, then any Derivative Works that You distribute must
              include a readable copy of the attribution notices contained
              within such NOTICE file, excluding those notices that do not
              pertain to any part of the Derivative Works, in at least one
              of the following places: within a NOTICE text file distributed
              as part of the Derivative Works; within the Source form or
              documentation, if provided along with the Derivative Works; or,
              within a display generated by the Derivative Works, if and
              wherever such third-party notices normally appear. The contents
              of the NOTICE file are for informational purposes only and
              do not modify the License. You may add Your own attribution
              notices within Derivative Works that You distribute, alongside
              or as an addendum to the NOTICE text from the Work, provided
              that such additional attribution notices cannot be construed
              as modifying the License.

          You may add Your own copyright statement to Your modifications and
          may provide additional or different license terms and conditions
          for use, reproduction, or distribution of Your modifications, or
          for any such Derivative Works as a whole, provided Your use,
          reproduction, and distribution of the Work otherwise complies with
          the conditions stated in this License.

       5. Submission of Contributions. Unless You explicitly state otherwise,
          any Contribution intentionally submitted for inclusion in the Work
          by You to the Licensor shall be under the terms and conditions of
          this License, without any additional terms or conditions.
          Notwithstanding the above, nothing herein shall supersede or modify
          the terms of any separate license agreement you may have executed
          with Licensor regarding such Contributions.

       6. Trademarks. This License does not grant permission to use the trade
          names, trademarks, service marks, or product names of the Licensor,
          except as required for reasonable and customary use in describing the
          origin of the Work and reproducing the content of the NOTICE file.

       7. Disclaimer of Warranty. Unless required by applicable law or
          agreed to in writing, Licensor provides the Work (and each
          Contributor provides its Contributions) on an "AS IS" BASIS,
          WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
          implied, including, without limitation, any warranties or conditions
          of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
          PARTICULAR PURPOSE. You are solely responsible for determining the
          appropriateness of using or redistributing the Work and assume any
          risks associated with Your exercise of permissions under this License.

       8. Limitation of Liability. In no event and under no legal theory,
          whether in tort (including negligence), contract, or otherwise,
          unless required by applicable law (such as deliberate and grossly
          negligent acts) or agreed to in writing, shall any Contributor be
          liable to You for damages, including any direct, indirect, special,
          incidental, or consequential damages of any character arising as a
          result of this License or out of the use or inability to use the
          Work (including but not limited to damages for loss of goodwill,
          work stoppage, computer failure or malfunction, or any and all
          other commercial damages or losses), even if such Contributor
          has been advised of the possibility of such damages.

       9. Accepting Warranty or Additional Liability. While redistributing
          the Work or Derivative Works thereof, You may choose to offer,
          and charge a fee for, acceptance of support, warranty, indemnity,
          or other liability obligations and/or rights consistent with this
          License. However, in accepting such obligations, You may act only
          on Your own behalf and on Your sole responsibility, not on behalf
          of any other Contributor, and only if You agree to indemnify,
          defend, and hold each Contributor harmless for any liability
          incurred by, or claims asserted against, such Contributor by reason
          of your accepting any such warranty or additional liability.

       END OF TERMS AND CONDITIONS

       APPENDIX: How to apply the Apache License to your work.

          To apply the Apache License to your work, attach the following
          boilerplate notice, with the fields enclosed by brackets "{}"
          replaced with your own identifying information. (Don't include
          the brackets!)  The text should be enclosed in the appropriate
          comment syntax for the file format. We also recommend that a
          file or class name and description of purpose be included on the
          same "printed page" as the copyright notice for easier
          identification within third-party archives.

       Copyright 2018 Gregor Martynus and other contributors.

       Licensed under the Apache License, Version 2.0 (the "License");
       you may not use this file except in compliance with the License.
       You may obtain a copy of the License at

           http://www.apache.org/licenses/LICENSE-2.0

       Unless required by applicable law or agreed to in writing, software
       distributed under the License is distributed on an "AS IS" BASIS,
       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       See the License for the specific language governing permissions and
       limitations under the License.
- sources: README.md
  text: "[Apache 2.0](LICENSE)"
notices: []


================================================
FILE: .licenses/npm/deprecation.dep.yml
================================================
---
name: deprecation
version: 2.3.1
type: npm
summary: Log a deprecation message with stack
homepage: https://github.com/gr2m/deprecation#readme
license: isc
licenses:
- sources: LICENSE
  text: |
    The ISC License

    Copyright (c) Gregor Martynus and contributors

    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted, provided that the above
    copyright notice and this permission notice appear in all copies.

    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
    WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
    ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
    IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- sources: README.md
  text: "[ISC](LICENSE)"
notices: []


================================================
FILE: .licenses/npm/once.dep.yml
================================================
---
name: once
version: 1.4.0
type: npm
summary: Run a function exactly one time
homepage: https://github.com/isaacs/once#readme
license: isc
licenses:
- sources: LICENSE
  text: |
    The ISC License

    Copyright (c) Isaac Z. Schlueter and Contributors

    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted, provided that the above
    copyright notice and this permission notice appear in all copies.

    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
    WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
    ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
    IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
notices: []


================================================
FILE: .licenses/npm/semver.dep.yml
================================================
---
name: semver
version: 6.3.1
type: npm
summary: The semantic version parser used by npm.
homepage: 
license: isc
licenses:
- sources: LICENSE
  text: |
    The ISC License

    Copyright (c) Isaac Z. Schlueter and Contributors

    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted, provided that the above
    copyright notice and this permission notice appear in all copies.

    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
    WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
    ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
    IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
notices: []


================================================
FILE: .licenses/npm/tunnel.dep.yml
================================================
---
name: tunnel
version: 0.0.6
type: npm
summary: Node HTTP/HTTPS Agents for tunneling proxies
homepage: https://github.com/koichik/node-tunnel/
license: mit
licenses:
- sources: LICENSE
  text: |
    The MIT License (MIT)

    Copyright (c) 2012 Koichi Kobayashi

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    THE SOFTWARE.
- sources: README.md
  text: Licensed under the [MIT](https://github.com/koichik/node-tunnel/blob/master/LICENSE)
    license.
notices: []


================================================
FILE: .licenses/npm/undici.dep.yml
================================================
---
name: undici
version: 5.29.0
type: npm
summary: An HTTP/1.1 client, written from scratch for Node.js
homepage: https://undici.nodejs.org
license: mit
licenses:
- sources: LICENSE
  text: |
    MIT License

    Copyright (c) Matteo Collina and Undici contributors

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.
- sources: README.md
  text: MIT
notices: []


================================================
FILE: .licenses/npm/universal-user-agent.dep.yml
================================================
---
name: universal-user-agent
version: 6.0.1
type: npm
summary: Get a user agent string in both browser and node
homepage: 
license: isc
licenses:
- sources: LICENSE.md
  text: |
    # [ISC License](https://spdx.org/licenses/ISC)

    Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m)

    Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- sources: README.md
  text: "[ISC](LICENSE.md)"
notices: []


================================================
FILE: .licenses/npm/uuid-3.4.0.dep.yml
================================================
---
name: uuid
version: 3.4.0
type: npm
summary: RFC4122 (v1, v4, and v5) UUIDs
homepage: 
license: mit
licenses:
- sources: LICENSE.md
  text: |
    The MIT License (MIT)

    Copyright (c) 2010-2016 Robert Kieffer and other contributors

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.
notices:
- sources: AUTHORS
  text: |-
    Robert Kieffer <robert@broofa.com>
    Christoph Tavan <dev@tavan.de>
    AJ ONeal <coolaj86@gmail.com>
    Vincent Voyer <vincent@zeroload.net>
    Roman Shtylman <shtylman@gmail.com>


================================================
FILE: .licenses/npm/uuid-8.3.2.dep.yml
================================================
---
name: uuid
version: 8.3.2
type: npm
summary: RFC4122 (v1, v4, and v5) UUIDs
homepage: https://github.com/uuidjs/uuid#readme
license: mit
licenses:
- sources: LICENSE.md
  text: |
    The MIT License (MIT)

    Copyright (c) 2010-2020 Robert Kieffer and other contributors

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
notices: []


================================================
FILE: .licenses/npm/uuid-9.0.1.dep.yml
================================================
---
name: uuid
version: 9.0.1
type: npm
summary: RFC4122 (v1, v4, and v5) UUIDs
homepage: 
license: mit
licenses:
- sources: LICENSE.md
  text: |
    The MIT License (MIT)

    Copyright (c) 2010-2020 Robert Kieffer and other contributors

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
notices: []


================================================
FILE: .licenses/npm/wrappy.dep.yml
================================================
---
name: wrappy
version: 1.0.2
type: npm
summary: Callback wrapping utility
homepage: https://github.com/npm/wrappy
license: isc
licenses:
- sources: LICENSE
  text: |
    The ISC License

    Copyright (c) Isaac Z. Schlueter and Contributors

    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted, provided that the above
    copyright notice and this permission notice appear in all copies.

    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
    WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
    ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
    IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
notices: []


================================================
FILE: .prettierignore
================================================
dist/
lib/
node_modules/

================================================
FILE: .prettierrc.json
================================================
{
  "printWidth": 80,
  "tabWidth": 2,
  "useTabs": false,
  "semi": false,
  "singleQuote": true,
  "trailingComma": "none",
  "bracketSpacing": false,
  "arrowParens": "avoid",
  "parser": "typescript"
}

================================================
FILE: CHANGELOG.md
================================================
# Changelog

## v6.0.2
* Fix tag handling: preserve annotations and explicit fetch-tags by @ericsciple in https://github.com/actions/checkout/pull/2356

## v6.0.1
* Add worktree support for persist-credentials includeIf by @ericsciple in https://github.com/actions/checkout/pull/2327

## v6.0.0
* Persist creds to a separate file by @ericsciple in https://github.com/actions/checkout/pull/2286
* Update README to include Node.js 24 support details and requirements by @salmanmkc in https://github.com/actions/checkout/pull/2248

## v5.0.1
* Port v6 cleanup to v5 by @ericsciple in https://github.com/actions/checkout/pull/2301

## v5.0.0
* Update actions checkout to use node 24 by @salmanmkc in https://github.com/actions/checkout/pull/2226

## v4.3.1
* Port v6 cleanup to v4 by @ericsciple in https://github.com/actions/checkout/pull/2305

## v4.3.0
* docs: update README.md by @motss in https://github.com/actions/checkout/pull/1971
* Add internal repos for checking out multiple repositories by @mouismail in https://github.com/actions/checkout/pull/1977
* Documentation update - add recommended permissions to Readme by @benwells in https://github.com/actions/checkout/pull/2043
* Adjust positioning of user email note and permissions heading by @joshmgross in https://github.com/actions/checkout/pull/2044
* Update README.md by @nebuk89 in https://github.com/actions/checkout/pull/2194
* Update CODEOWNERS for actions by @TingluoHuang in https://github.com/actions/checkout/pull/2224
* Update package dependencies by @salmanmkc in https://github.com/actions/checkout/pull/2236

## v4.2.2
* `url-helper.ts` now leverages well-known environment variables by @jww3 in https://github.com/actions/checkout/pull/1941
* Expand unit test coverage for `isGhes` by @jww3 in https://github.com/actions/checkout/pull/1946

## v4.2.1
* Check out other refs/* by commit if provided, fall back to ref by @orhantoy in https://github.com/actions/checkout/pull/1924

## v4.2.0

* Add Ref and Commit outputs by @lucacome in https://github.com/actions/checkout/pull/1180
* Dependency updates by @dependabot- https://github.com/actions/checkout/pull/1777, https://github.com/actions/checkout/pull/1872

## v4.1.7
* Bump the minor-npm-dependencies group across 1 directory with 4 updates by @dependabot in https://github.com/actions/checkout/pull/1739
* Bump actions/checkout from 3 to 4 by @dependabot in https://github.com/actions/checkout/pull/1697
* Check out other refs/* by commit by @orhantoy in https://github.com/actions/checkout/pull/1774
* Pin actions/checkout's own workflows to a known, good, stable version. by @jww3 in https://github.com/actions/checkout/pull/1776

## v4.1.6
* Check platform to set archive extension appropriately by @cory-miller in https://github.com/actions/checkout/pull/1732

## v4.1.5
* Update NPM dependencies by @cory-miller in https://github.com/actions/checkout/pull/1703
* Bump github/codeql-action from 2 to 3 by @dependabot in https://github.com/actions/checkout/pull/1694
* Bump actions/setup-node from 1 to 4 by @dependabot in https://github.com/actions/checkout/pull/1696
* Bump actions/upload-artifact from 2 to 4 by @dependabot in https://github.com/actions/checkout/pull/1695
* README: Suggest `user.email` to be `41898282+github-actions[bot]@users.noreply.github.com` by @cory-miller in https://github.com/actions/checkout/pull/1707

## v4.1.4
- Disable `extensions.worktreeConfig` when disabling `sparse-checkout` by @jww3 in https://github.com/actions/checkout/pull/1692
- Add dependabot config by @cory-miller in https://github.com/actions/checkout/pull/1688
- Bump the minor-actions-dependencies group with 2 updates by @dependabot in https://github.com/actions/checkout/pull/1693
- Bump word-wrap from 1.2.3 to 1.2.5 by @dependabot in https://github.com/actions/checkout/pull/1643

## v4.1.3
- Check git version before attempting to disable `sparse-checkout` by @jww3 in https://github.com/actions/checkout/pull/1656
- Add SSH user parameter by @cory-miller in https://github.com/actions/checkout/pull/1685
- Update `actions/checkout` version in `update-main-version.yml` by @jww3 in https://github.com/actions/checkout/pull/1650

## v4.1.2
- Fix: Disable sparse checkout whenever `sparse-checkout` option is not present @dscho in https://github.com/actions/checkout/pull/1598

## v4.1.1
- Correct link to GitHub Docs by @peterbe in https://github.com/actions/checkout/pull/1511
- Link to release page from what's new section by @cory-miller in https://github.com/actions/checkout/pull/1514

## v4.1.0
- [Add support for partial checkout filters](https://github.com/actions/checkout/pull/1396)

## v4.0.0
- [Support fetching without the --progress option](https://github.com/actions/checkout/pull/1067)
- [Update to node20](https://github.com/actions/checkout/pull/1436)

## v3.6.0
- [Fix: Mark test scripts with Bash'isms to be run via Bash](https://github.com/actions/checkout/pull/1377)
- [Add option to fetch tags even if fetch-depth > 0](https://github.com/actions/checkout/pull/579)

## v3.5.3
- [Fix: Checkout fail in self-hosted runners when faulty submodule are checked-in](https://github.com/actions/checkout/pull/1196)
- [Fix typos found by codespell](https://github.com/actions/checkout/pull/1287)
- [Add support for sparse checkouts](https://github.com/actions/checkout/pull/1369)

## v3.5.2
- [Fix api endpoint for GHES](https://github.com/actions/checkout/pull/1289)

## v3.5.1
- [Fix slow checkout on Windows](https://github.com/actions/checkout/pull/1246)

## v3.5.0
* [Add new public key for known_hosts](https://github.com/actions/checkout/pull/1237)

## v3.4.0
- [Upgrade codeql actions to v2](https://github.com/actions/checkout/pull/1209)
- [Upgrade dependencies](https://github.com/actions/checkout/pull/1210)
- [Upgrade @actions/io](https://github.com/actions/checkout/pull/1225)

## v3.3.0
- [Implement branch list using callbacks from exec function](https://github.com/actions/checkout/pull/1045)
- [Add in explicit reference to private checkout options](https://github.com/actions/checkout/pull/1050)
- [Fix comment typos (that got added in #770)](https://github.com/actions/checkout/pull/1057)

## v3.2.0
- [Add GitHub Action to perform release](https://github.com/actions/checkout/pull/942)
- [Fix status badge](https://github.com/actions/checkout/pull/967)
- [Replace datadog/squid with ubuntu/squid Docker image](https://github.com/actions/checkout/pull/1002)
- [Wrap pipeline commands for submoduleForeach in quotes](https://github.com/actions/checkout/pull/964)
- [Update @actions/io to 1.1.2](https://github.com/actions/checkout/pull/1029)
- [Upgrading version to 3.2.0](https://github.com/actions/checkout/pull/1039)

## v3.1.0
- [Use @actions/core `saveState` and `getState`](https://github.com/actions/checkout/pull/939)
- [Add `github-server-url` input](https://github.com/actions/checkout/pull/922)

## v3.0.2
- [Add input `set-safe-directory`](https://github.com/actions/checkout/pull/770)

## v3.0.1
- [Fixed an issue where checkout failed to run in container jobs due to the new git setting `safe.directory`](https://github.com/actions/checkout/pull/762)
- [Bumped various npm package versions](https://github.com/actions/checkout/pull/744)

## v3.0.0

- [Update to node 16](https://github.com/actions/checkout/pull/689)

## v2.3.1

- [Fix default branch resolution for .wiki and when using SSH](https://github.com/actions/checkout/pull/284)

## v2.3.0

- [Fallback to the default branch](https://github.com/actions/checkout/pull/278)

## v2.2.0

- [Fetch all history for all tags and branches when fetch-depth=0](https://github.com/actions/checkout/pull/258)

## v2.1.1

- Changes to support GHES ([here](https://github.com/actions/checkout/pull/236) and [here](https://github.com/actions/checkout/pull/248))

## v2.1.0

- [Group output](https://github.com/actions/checkout/pull/191)
- [Changes to support GHES alpha release](https://github.com/actions/checkout/pull/199)
- [Persist core.sshCommand for submodules](https://github.com/actions/checkout/pull/184)
- [Add support ssh](https://github.com/actions/checkout/pull/163)
- [Convert submodule SSH URL to HTTPS, when not using SSH](https://github.com/actions/checkout/pull/179)
- [Add submodule support](https://github.com/actions/checkout/pull/157)
- [Follow proxy settings](https://github.com/actions/checkout/pull/144)
- [Fix ref for pr closed event when a pr is merged](https://github.com/actions/checkout/pull/141)
- [Fix issue checking detached when git less than 2.22](https://github.com/actions/checkout/pull/128)

## v2.0.0

- [Do not pass cred on command line](https://github.com/actions/checkout/pull/108)
- [Add input persist-credentials](https://github.com/actions/checkout/pull/107)
- [Fallback to REST API to download repo](https://github.com/actions/checkout/pull/104)

## v2 (beta)

- Improved fetch performance
  - The default behavior now fetches only the SHA being checked-out
- Script authenticated git commands
  - Persists `with.token` in the local git config
  - Enables your scripts to run authenticated git commands
  - Post-job cleanup removes the token
  - Coming soon: Opt out by setting `with.persist-credentials` to `false`
- Creates a local branch
  - No longer detached HEAD when checking out a branch
  - A local branch is created with the corresponding upstream branch set
- Improved layout
  - `with.path` is always relative to `github.workspace`
  - Aligns better with container actions, where `github.workspace` gets mapped in
- Removed input `submodules`


## v1

Refer [here](https://github.com/actions/checkout/blob/v1/CHANGELOG.md) for the V1 changelog


================================================
FILE: CODEOWNERS
================================================
* @actions/actions-runtime


================================================
FILE: CONTRIBUTING.md
================================================
# Contributing

## Submitting a pull request

1. Fork and clone the repository
1. Configure and install the dependencies: `npm install`
1. Create a new branch: `git checkout -b my-branch-name`
1. Make your change, add tests, and make sure the tests still pass: `npm run test`
1. Make sure your code is correctly formatted: `npm run format`
1. Update `dist/index.js` using `npm run build`. This creates a single javascript file that is used as an entrypoint for the action
1. Push to your fork and submit a pull request
1. Pat yourself on the back and wait for your pull request to be reviewed and merged

Here are a few things you can do that will increase the likelihood of your pull request being accepted:

- Write tests.
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.

## Resources

- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
- [Using Pull Requests](https://help.github.com/articles/about-pull-requests/)
- [GitHub Help](https://help.github.com)
- [Writing good commit messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)

Thanks! :heart: :heart: :heart:

GitHub Actions Team :octocat:


================================================
FILE: LICENSE
================================================

The MIT License (MIT)

Copyright (c) 2018 GitHub, Inc. and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


================================================
FILE: README.md
================================================
[![Build and Test](https://github.com/actions/checkout/actions/workflows/test.yml/badge.svg)](https://github.com/actions/checkout/actions/workflows/test.yml)

# Checkout v6

## What's new

- Improved credential security: `persist-credentials` now stores credentials in a separate file under `$RUNNER_TEMP` instead of directly in `.git/config`
- No workflow changes required — `git fetch`, `git push`, etc. continue to work automatically
- Running authenticated git commands from a [Docker container action](https://docs.github.com/actions/sharing-automations/creating-actions/creating-a-docker-container-action) requires Actions Runner [v2.329.0](https://github.com/actions/runner/releases/tag/v2.329.0) or later

# Checkout v5

## What's new

- Updated to the node24 runtime
  - This requires a minimum Actions Runner version of [v2.327.1](https://github.com/actions/runner/releases/tag/v2.327.1) to run.


# Checkout v4

This action checks-out your repository under `$GITHUB_WORKSPACE`, so your workflow can access it.

Only a single commit is fetched by default, for the ref/SHA that triggered the workflow. Set `fetch-depth: 0` to fetch all history for all branches and tags. Refer [here](https://docs.github.com/actions/using-workflows/events-that-trigger-workflows) to learn which commit `$GITHUB_SHA` points to for different events.

The auth token is persisted in the local git config. This enables your scripts to run authenticated git commands. The token is removed during post-job cleanup. Set `persist-credentials: false` to opt-out.

When Git 2.18 or higher is not in your PATH, falls back to the REST API to download the files.

### Note

Thank you for your interest in this GitHub action, however, right now we are not taking contributions. 

We continue to focus our resources on strategic areas that help our customers be successful while making developers' lives easier. While GitHub Actions remains a key part of this vision, we are allocating resources towards other areas of Actions and are not taking contributions to this repository at this time. The GitHub public roadmap is the best place to follow along for any updates on features we’re working on and what stage they’re in.

We are taking the following steps to better direct requests related to GitHub Actions, including:

1. We will be directing questions and support requests to our [Community Discussions area](https://github.com/orgs/community/discussions/categories/actions)

2. High Priority bugs can be reported through Community Discussions or you can report these to our support team https://support.github.com/contact/bug-report.

3. Security Issues should be handled as per our [security.md](security.md)

We will still provide security updates for this project and fix major breaking changes during this time.

You are welcome to still raise bugs in this repo.

# What's new

Please refer to the [release page](https://github.com/actions/checkout/releases/latest) for the latest release notes.

# Usage

<!-- start usage -->
```yaml
- uses: actions/checkout@v6
  with:
    # Repository name with owner. For example, actions/checkout
    # Default: ${{ github.repository }}
    repository: ''

    # The branch, tag or SHA to checkout. When checking out the repository that
    # triggered a workflow, this defaults to the reference or SHA for that event.
    # Otherwise, uses the default branch.
    ref: ''

    # Personal access token (PAT) used to fetch the repository. The PAT is configured
    # with the local git config, which enables your scripts to run authenticated git
    # commands. The post-job step removes the PAT.
    #
    # We recommend using a service account with the least permissions necessary. Also
    # when generating a new PAT, select the least scopes necessary.
    #
    # [Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)
    #
    # Default: ${{ github.token }}
    token: ''

    # SSH key used to fetch the repository. The SSH key is configured with the local
    # git config, which enables your scripts to run authenticated git commands. The
    # post-job step removes the SSH key.
    #
    # We recommend using a service account with the least permissions necessary.
    #
    # [Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)
    ssh-key: ''

    # Known hosts in addition to the user and global host key database. The public SSH
    # keys for a host may be obtained using the utility `ssh-keyscan`. For example,
    # `ssh-keyscan github.com`. The public key for github.com is always implicitly
    # added.
    ssh-known-hosts: ''

    # Whether to perform strict host key checking. When true, adds the options
    # `StrictHostKeyChecking=yes` and `CheckHostIP=no` to the SSH command line. Use
    # the input `ssh-known-hosts` to configure additional hosts.
    # Default: true
    ssh-strict: ''

    # The user to use when connecting to the remote SSH host. By default 'git' is
    # used.
    # Default: git
    ssh-user: ''

    # Whether to configure the token or SSH key with the local git config
    # Default: true
    persist-credentials: ''

    # Relative path under $GITHUB_WORKSPACE to place the repository
    path: ''

    # Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching
    # Default: true
    clean: ''

    # Partially clone against a given filter. Overrides sparse-checkout if set.
    # Default: null
    filter: ''

    # Do a sparse checkout on given patterns. Each pattern should be separated with
    # new lines.
    # Default: null
    sparse-checkout: ''

    # Specifies whether to use cone-mode when doing a sparse checkout.
    # Default: true
    sparse-checkout-cone-mode: ''

    # Number of commits to fetch. 0 indicates all history for all branches and tags.
    # Default: 1
    fetch-depth: ''

    # Whether to fetch tags, even if fetch-depth > 0.
    # Default: false
    fetch-tags: ''

    # Whether to show progress status output when fetching.
    # Default: true
    show-progress: ''

    # Whether to download Git-LFS files
    # Default: false
    lfs: ''

    # Whether to checkout submodules: `true` to checkout submodules or `recursive` to
    # recursively checkout submodules.
    #
    # When the `ssh-key` input is not provided, SSH URLs beginning with
    # `git@github.com:` are converted to HTTPS.
    #
    # Default: false
    submodules: ''

    # Add repository path as safe.directory for Git global config by running `git
    # config --global --add safe.directory <path>`
    # Default: true
    set-safe-directory: ''

    # The base URL for the GitHub instance that you are trying to clone from, will use
    # environment defaults to fetch from the same instance that the workflow is
    # running from unless specified. Example URLs are https://github.com or
    # https://my-ghes-server.example.com
    github-server-url: ''
```
<!-- end usage -->

# Scenarios

- [Checkout V5](#checkout-v5)
  - [What's new](#whats-new)
- [Checkout V4](#checkout-v4)
    - [Note](#note)
- [What's new](#whats-new-1)
- [Usage](#usage)
- [Scenarios](#scenarios)
  - [Fetch only the root files](#fetch-only-the-root-files)
  - [Fetch only the root files and `.github` and `src` folder](#fetch-only-the-root-files-and-github-and-src-folder)
  - [Fetch only a single file](#fetch-only-a-single-file)
  - [Fetch all history for all tags and branches](#fetch-all-history-for-all-tags-and-branches)
  - [Checkout a different branch](#checkout-a-different-branch)
  - [Checkout HEAD^](#checkout-head)
  - [Checkout multiple repos (side by side)](#checkout-multiple-repos-side-by-side)
  - [Checkout multiple repos (nested)](#checkout-multiple-repos-nested)
  - [Checkout multiple repos (private)](#checkout-multiple-repos-private)
  - [Checkout pull request HEAD commit instead of merge commit](#checkout-pull-request-head-commit-instead-of-merge-commit)
  - [Checkout pull request on closed event](#checkout-pull-request-on-closed-event)
  - [Push a commit using the built-in token](#push-a-commit-using-the-built-in-token)
  - [Push a commit to a PR using the built-in token](#push-a-commit-to-a-pr-using-the-built-in-token)
- [Recommended permissions](#recommended-permissions)
- [License](#license)

## Fetch only the root files

```yaml
- uses: actions/checkout@v6
  with:
    sparse-checkout: .
```

## Fetch only the root files and `.github` and `src` folder

```yaml
- uses: actions/checkout@v6
  with:
    sparse-checkout: |
      .github
      src
```

## Fetch only a single file

```yaml
- uses: actions/checkout@v6
  with:
    sparse-checkout: |
      README.md
    sparse-checkout-cone-mode: false
```

## Fetch all history for all tags and branches

```yaml
- uses: actions/checkout@v6
  with:
    fetch-depth: 0
```

## Checkout a different branch

```yaml
- uses: actions/checkout@v6
  with:
    ref: my-branch
```

## Checkout HEAD^

```yaml
- uses: actions/checkout@v6
  with:
    fetch-depth: 2
- run: git checkout HEAD^
```

## Checkout multiple repos (side by side)

```yaml
- name: Checkout
  uses: actions/checkout@v6
  with:
    path: main

- name: Checkout tools repo
  uses: actions/checkout@v6
  with:
    repository: my-org/my-tools
    path: my-tools
```
> - If your secondary repository is private or internal you will need to add the option noted in [Checkout multiple repos (private)](#Checkout-multiple-repos-private)

## Checkout multiple repos (nested)

```yaml
- name: Checkout
  uses: actions/checkout@v6

- name: Checkout tools repo
  uses: actions/checkout@v6
  with:
    repository: my-org/my-tools
    path: my-tools
```
> - If your secondary repository is private or internal you will need to add the option noted in [Checkout multiple repos (private)](#Checkout-multiple-repos-private)

## Checkout multiple repos (private)

```yaml
- name: Checkout
  uses: actions/checkout@v6
  with:
    path: main

- name: Checkout private tools
  uses: actions/checkout@v6
  with:
    repository: my-org/my-private-tools
    token: ${{ secrets.GH_PAT }} # `GH_PAT` is a secret that contains your PAT
    path: my-tools
```

> - `${{ github.token }}` is scoped to the current repository, so if you want to checkout a different repository that is private you will need to provide your own [PAT](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line).


## Checkout pull request HEAD commit instead of merge commit

```yaml
- uses: actions/checkout@v6
  with:
    ref: ${{ github.event.pull_request.head.sha }}
```

## Checkout pull request on closed event

```yaml
on:
  pull_request:
    branches: [main]
    types: [opened, synchronize, closed]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
```

## Push a commit using the built-in token

```yaml
on: push
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - run: |
          date > generated.txt
          # Note: the following account information will not work on GHES
          git config user.name "github-actions[bot]"
          git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
          git add .
          git commit -m "generated"
          git push
```
*NOTE:* The user email is `{user.id}+{user.login}@users.noreply.github.com`. See users API: https://api.github.com/users/github-actions%5Bbot%5D

## Push a commit to a PR using the built-in token

In a pull request trigger, `ref` is required as GitHub Actions checks out in detached HEAD mode, meaning it doesn’t check out your branch by default.

```yaml
on: pull_request
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
        with:
          ref: ${{ github.head_ref }}
      - run: |
          date > generated.txt
          # Note: the following account information will not work on GHES
          git config user.name "github-actions[bot]"
          git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
          git add .
          git commit -m "generated"
          git push
```

*NOTE:* The user email is `{user.id}+{user.login}@users.noreply.github.com`. See users API: https://api.github.com/users/github-actions%5Bbot%5D

# Recommended permissions

When using the `checkout` action in your GitHub Actions workflow, it is recommended to set the following `GITHUB_TOKEN` permissions to ensure proper functionality, unless alternative auth is provided via the `token` or `ssh-key` inputs:

```yaml
permissions:
  contents: read
```

# License

The scripts and documentation in this project are released under the [MIT License](LICENSE)


================================================
FILE: __test__/git-auth-helper.test.ts
================================================
import * as core from '@actions/core'
import * as fs from 'fs'
import * as gitAuthHelper from '../lib/git-auth-helper'
import * as io from '@actions/io'
import * as os from 'os'
import * as path from 'path'
import * as stateHelper from '../lib/state-helper'
import {IGitCommandManager} from '../lib/git-command-manager'
import {IGitSourceSettings} from '../lib/git-source-settings'

const isWindows = process.platform === 'win32'
const testWorkspace = path.join(__dirname, '_temp', 'git-auth-helper')
const originalRunnerTemp = process.env['RUNNER_TEMP']
const originalHome = process.env['HOME']
let workspace: string
let localGitConfigPath: string
let globalGitConfigPath: string
let runnerTemp: string
let tempHomedir: string
let git: IGitCommandManager & {env: {[key: string]: string}}
let settings: IGitSourceSettings
let sshPath: string
let githubServerUrl: string

describe('git-auth-helper tests', () => {
  beforeAll(async () => {
    // SSH
    sshPath = await io.which('ssh')

    // Clear test workspace
    await io.rmRF(testWorkspace)
  })

  beforeEach(() => {
    // Mock setSecret
    jest.spyOn(core, 'setSecret').mockImplementation((secret: string) => {})

    // Mock error/warning/info/debug
    jest.spyOn(core, 'error').mockImplementation(jest.fn())
    jest.spyOn(core, 'warning').mockImplementation(jest.fn())
    jest.spyOn(core, 'info').mockImplementation(jest.fn())
    jest.spyOn(core, 'debug').mockImplementation(jest.fn())

    // Mock state helper
    jest.spyOn(stateHelper, 'setSshKeyPath').mockImplementation(jest.fn())
    jest
      .spyOn(stateHelper, 'setSshKnownHostsPath')
      .mockImplementation(jest.fn())
  })

  afterEach(() => {
    // Unregister mocks
    jest.restoreAllMocks()

    // Restore HOME
    if (originalHome) {
      process.env['HOME'] = originalHome
    } else {
      delete process.env['HOME']
    }
  })

  afterAll(() => {
    // Restore RUNNER_TEMP
    delete process.env['RUNNER_TEMP']
    if (originalRunnerTemp) {
      process.env['RUNNER_TEMP'] = originalRunnerTemp
    }
  })

  async function testAuthHeader(
    testName: string,
    serverUrl: string | undefined = undefined
  ) {
    // Arrange
    let expectedServerUrl = 'https://github.com'
    if (serverUrl) {
      githubServerUrl = serverUrl
      expectedServerUrl = githubServerUrl
    }

    await setup(testName)
    expect(settings.authToken).toBeTruthy() // sanity check
    const authHelper = gitAuthHelper.createAuthHelper(git, settings)

    // Act
    await authHelper.configureAuth()

    // Assert config - check that .git/config contains includeIf entries
    const localConfigContent = (
      await fs.promises.readFile(localGitConfigPath)
    ).toString()
    expect(
      localConfigContent.indexOf('includeIf.gitdir:')
    ).toBeGreaterThanOrEqual(0)

    // Assert credentials config file contains the actual credentials
    const credentialsFiles = (await fs.promises.readdir(runnerTemp)).filter(
      f => f.startsWith('git-credentials-') && f.endsWith('.config')
    )
    expect(credentialsFiles.length).toBe(1)
    const credentialsConfigPath = path.join(runnerTemp, credentialsFiles[0])
    const credentialsContent = (
      await fs.promises.readFile(credentialsConfigPath)
    ).toString()
    const basicCredential = Buffer.from(
      `x-access-token:${settings.authToken}`,
      'utf8'
    ).toString('base64')
    expect(
      credentialsContent.indexOf(
        `http.${expectedServerUrl}/.extraheader AUTHORIZATION: basic ${basicCredential}`
      )
    ).toBeGreaterThanOrEqual(0)
  }

  const configureAuth_configuresAuthHeader =
    'configureAuth configures auth header'
  it(configureAuth_configuresAuthHeader, async () => {
    await testAuthHeader(configureAuth_configuresAuthHeader)
  })

  const configureAuth_AcceptsGitHubServerUrl =
    'inject https://my-ghes-server.com as github server url'
  it(configureAuth_AcceptsGitHubServerUrl, async () => {
    await testAuthHeader(
      configureAuth_AcceptsGitHubServerUrl,
      'https://my-ghes-server.com'
    )
  })

  const configureAuth_AcceptsGitHubServerUrlSetToGHEC =
    'inject https://github.com as github server url'
  it(configureAuth_AcceptsGitHubServerUrlSetToGHEC, async () => {
    await testAuthHeader(
      configureAuth_AcceptsGitHubServerUrlSetToGHEC,
      'https://github.com'
    )
  })

  const configureAuth_configuresAuthHeaderEvenWhenPersistCredentialsFalse =
    'configureAuth configures auth header even when persist credentials false'
  it(
    configureAuth_configuresAuthHeaderEvenWhenPersistCredentialsFalse,
    async () => {
      // Arrange
      await setup(
        configureAuth_configuresAuthHeaderEvenWhenPersistCredentialsFalse
      )
      expect(settings.authToken).toBeTruthy() // sanity check
      settings.persistCredentials = false
      const authHelper = gitAuthHelper.createAuthHelper(git, settings)

      // Act
      await authHelper.configureAuth()

      // Assert config - check credentials config file (not local .git/config)
      const credentialsFiles = (await fs.promises.readdir(runnerTemp)).filter(
        f => f.startsWith('git-credentials-') && f.endsWith('.config')
      )
      expect(credentialsFiles.length).toBe(1)
      const credentialsConfigPath = path.join(runnerTemp, credentialsFiles[0])
      const credentialsContent = (
        await fs.promises.readFile(credentialsConfigPath)
      ).toString()
      expect(
        credentialsContent.indexOf(
          `http.https://github.com/.extraheader AUTHORIZATION`
        )
      ).toBeGreaterThanOrEqual(0)
    }
  )

  const configureAuth_copiesUserKnownHosts =
    'configureAuth copies user known hosts'
  it(configureAuth_copiesUserKnownHosts, async () => {
    if (!sshPath) {
      process.stdout.write(
        `Skipped test "${configureAuth_copiesUserKnownHosts}". Executable 'ssh' not found in the PATH.\n`
      )
      return
    }

    // Arange
    await setup(configureAuth_copiesUserKnownHosts)
    expect(settings.sshKey).toBeTruthy() // sanity check

    // Mock fs.promises.readFile
    const realReadFile = fs.promises.readFile
    jest
      .spyOn(fs.promises, 'readFile')
      .mockImplementation(async (file: any, options: any): Promise<Buffer> => {
        const userKnownHostsPath = path.join(
          os.homedir(),
          '.ssh',
          'known_hosts'
        )
        if (file === userKnownHostsPath) {
          return Buffer.from('some-domain.com ssh-rsa ABCDEF')
        }

        return await realReadFile(file, options)
      })

    // Act
    const authHelper = gitAuthHelper.createAuthHelper(git, settings)
    await authHelper.configureAuth()

    // Assert known hosts
    const actualSshKnownHostsPath = await getActualSshKnownHostsPath()
    const actualSshKnownHostsContent = (
      await fs.promises.readFile(actualSshKnownHostsPath)
    ).toString()
    expect(actualSshKnownHostsContent).toMatch(
      /some-domain\.com ssh-rsa ABCDEF/
    )
    expect(actualSshKnownHostsContent).toMatch(/github\.com ssh-rsa AAAAB3N/)
  })

  const configureAuth_registersBasicCredentialAsSecret =
    'configureAuth registers basic credential as secret'
  it(configureAuth_registersBasicCredentialAsSecret, async () => {
    // Arrange
    await setup(configureAuth_registersBasicCredentialAsSecret)
    expect(settings.authToken).toBeTruthy() // sanity check
    const authHelper = gitAuthHelper.createAuthHelper(git, settings)

    // Act
    await authHelper.configureAuth()

    // Assert secret
    const setSecretSpy = core.setSecret as jest.Mock<any, any>
    expect(setSecretSpy).toHaveBeenCalledTimes(1)
    const expectedSecret = Buffer.from(
      `x-access-token:${settings.authToken}`,
      'utf8'
    ).toString('base64')
    expect(setSecretSpy).toHaveBeenCalledWith(expectedSecret)
  })

  const setsSshCommandEnvVarWhenPersistCredentialsFalse =
    'sets SSH command env var when persist-credentials false'
  it(setsSshCommandEnvVarWhenPersistCredentialsFalse, async () => {
    if (!sshPath) {
      process.stdout.write(
        `Skipped test "${setsSshCommandEnvVarWhenPersistCredentialsFalse}". Executable 'ssh' not found in the PATH.\n`
      )
      return
    }

    // Arrange
    await setup(setsSshCommandEnvVarWhenPersistCredentialsFalse)
    settings.persistCredentials = false
    const authHelper = gitAuthHelper.createAuthHelper(git, settings)

    // Act
    await authHelper.configureAuth()

    // Assert git env var
    const actualKeyPath = await getActualSshKeyPath()
    const actualKnownHostsPath = await getActualSshKnownHostsPath()
    const expectedSshCommand = `"${sshPath}" -i "$RUNNER_TEMP/${path.basename(
      actualKeyPath
    )}" -o StrictHostKeyChecking=yes -o CheckHostIP=no -o "UserKnownHostsFile=$RUNNER_TEMP/${path.basename(
      actualKnownHostsPath
    )}"`
    expect(git.setEnvironmentVariable).toHaveBeenCalledWith(
      'GIT_SSH_COMMAND',
      expectedSshCommand
    )

    // Assert git config
    const gitConfigLines = (await fs.promises.readFile(localGitConfigPath))
      .toString()
      .split('\n')
      .filter(x => x)
    // Should have includeIf entries pointing to credentials file
    expect(gitConfigLines.length).toBeGreaterThan(0)
    expect(
      gitConfigLines.some(line => line.indexOf('includeIf.gitdir:') >= 0)
    ).toBeTruthy()
  })

  const configureAuth_setsSshCommandWhenPersistCredentialsTrue =
    'sets SSH command when persist-credentials true'
  it(configureAuth_setsSshCommandWhenPersistCredentialsTrue, async () => {
    if (!sshPath) {
      process.stdout.write(
        `Skipped test "${configureAuth_setsSshCommandWhenPersistCredentialsTrue}". Executable 'ssh' not found in the PATH.\n`
      )
      return
    }

    // Arrange
    await setup(configureAuth_setsSshCommandWhenPersistCredentialsTrue)
    const authHelper = gitAuthHelper.createAuthHelper(git, settings)

    // Act
    await authHelper.configureAuth()

    // Assert git env var
    const actualKeyPath = await getActualSshKeyPath()
    const actualKnownHostsPath = await getActualSshKnownHostsPath()
    const expectedSshCommand = `"${sshPath}" -i "$RUNNER_TEMP/${path.basename(
      actualKeyPath
    )}" -o StrictHostKeyChecking=yes -o CheckHostIP=no -o "UserKnownHostsFile=$RUNNER_TEMP/${path.basename(
      actualKnownHostsPath
    )}"`
    expect(git.setEnvironmentVariable).toHaveBeenCalledWith(
      'GIT_SSH_COMMAND',
      expectedSshCommand
    )

    // Asserty git config
    expect(git.config).toHaveBeenCalledWith(
      'core.sshCommand',
      expectedSshCommand
    )
  })

  const configureAuth_writesExplicitKnownHosts = 'writes explicit known hosts'
  it(configureAuth_writesExplicitKnownHosts, async () => {
    if (!sshPath) {
      process.stdout.write(
        `Skipped test "${configureAuth_writesExplicitKnownHosts}". Executable 'ssh' not found in the PATH.\n`
      )
      return
    }

    // Arrange
    await setup(configureAuth_writesExplicitKnownHosts)
    expect(settings.sshKey).toBeTruthy() // sanity check
    settings.sshKnownHosts = 'my-custom-host.com ssh-rsa ABC123'
    const authHelper = gitAuthHelper.createAuthHelper(git, settings)

    // Act
    await authHelper.configureAuth()

    // Assert known hosts
    const actualSshKnownHostsPath = await getActualSshKnownHostsPath()
    const actualSshKnownHostsContent = (
      await fs.promises.readFile(actualSshKnownHostsPath)
    ).toString()
    expect(actualSshKnownHostsContent).toMatch(
      /my-custom-host\.com ssh-rsa ABC123/
    )
    expect(actualSshKnownHostsContent).toMatch(/github\.com ssh-rsa AAAAB3N/)
  })

  const configureAuth_writesSshKeyAndImplicitKnownHosts =
    'writes SSH key and implicit known hosts'
  it(configureAuth_writesSshKeyAndImplicitKnownHosts, async () => {
    if (!sshPath) {
      process.stdout.write(
        `Skipped test "${configureAuth_writesSshKeyAndImplicitKnownHosts}". Executable 'ssh' not found in the PATH.\n`
      )
      return
    }

    // Arrange
    await setup(configureAuth_writesSshKeyAndImplicitKnownHosts)
    expect(settings.sshKey).toBeTruthy() // sanity check
    const authHelper = gitAuthHelper.createAuthHelper(git, settings)

    // Act
    await authHelper.configureAuth()

    // Assert SSH key
    const actualSshKeyPath = await getActualSshKeyPath()
    expect(actualSshKeyPath).toBeTruthy()
    const actualSshKeyContent = (
      await fs.promises.readFile(actualSshKeyPath)
    ).toString()
    expect(actualSshKeyContent).toBe(settings.sshKey + '\n')
    if (!isWindows) {
      // Assert read/write for user, not group or others.
      // Otherwise SSH client will error.
      expect((await fs.promises.stat(actualSshKeyPath)).mode & 0o777).toBe(
        0o600
      )
    }

    // Assert known hosts
    const actualSshKnownHostsPath = await getActualSshKnownHostsPath()
    const actualSshKnownHostsContent = (
      await fs.promises.readFile(actualSshKnownHostsPath)
    ).toString()
    expect(actualSshKnownHostsContent).toMatch(/github\.com ssh-rsa AAAAB3N/)
  })

  const configureGlobalAuth_configuresUrlInsteadOfWhenSshKeyNotSet =
    'configureGlobalAuth configures URL insteadOf when SSH key not set'
  it(configureGlobalAuth_configuresUrlInsteadOfWhenSshKeyNotSet, async () => {
    // Arrange
    await setup(configureGlobalAuth_configuresUrlInsteadOfWhenSshKeyNotSet)
    settings.sshKey = ''
    const authHelper = gitAuthHelper.createAuthHelper(git, settings)

    // Act
    await authHelper.configureAuth()
    await authHelper.configureGlobalAuth()

    // Assert temporary global config
    expect(git.env['HOME']).toBeTruthy()
    const configContent = (
      await fs.promises.readFile(path.join(git.env['HOME'], '.gitconfig'))
    ).toString()
    expect(
      configContent.indexOf(`url.https://github.com/.insteadOf git@github.com`)
    ).toBeGreaterThanOrEqual(0)
  })

  const configureGlobalAuth_copiesGlobalGitConfig =
    'configureGlobalAuth copies global git config'
  it(configureGlobalAuth_copiesGlobalGitConfig, async () => {
    // Arrange
    await setup(configureGlobalAuth_copiesGlobalGitConfig)
    await fs.promises.writeFile(globalGitConfigPath, 'value-from-global-config')
    const authHelper = gitAuthHelper.createAuthHelper(git, settings)

    // Act
    await authHelper.configureAuth()
    await authHelper.configureGlobalAuth()

    // Assert original global config not altered
    let configContent = (
      await fs.promises.readFile(globalGitConfigPath)
    ).toString()
    expect(configContent).toBe('value-from-global-config')

    // Assert temporary global config
    expect(git.env['HOME']).toBeTruthy()
    const basicCredential = Buffer.from(
      `x-access-token:${settings.authToken}`,
      'utf8'
    ).toString('base64')
    configContent = (
      await fs.promises.readFile(path.join(git.env['HOME'], '.gitconfig'))
    ).toString()
    expect(
      configContent.indexOf('value-from-global-config')
    ).toBeGreaterThanOrEqual(0)
    // Global config should have include.path pointing to credentials file
    expect(configContent.indexOf('include.path')).toBeGreaterThanOrEqual(0)

    // Check credentials in the separate config file
    const credentialsFiles = (await fs.promises.readdir(runnerTemp)).filter(
      f => f.startsWith('git-credentials-') && f.endsWith('.config')
    )
    expect(credentialsFiles.length).toBeGreaterThan(0)
    const credentialsConfigPath = path.join(runnerTemp, credentialsFiles[0])
    const credentialsContent = (
      await fs.promises.readFile(credentialsConfigPath)
    ).toString()
    expect(
      credentialsContent.indexOf(
        `http.https://github.com/.extraheader AUTHORIZATION: basic ${basicCredential}`
      )
    ).toBeGreaterThanOrEqual(0)
  })

  const configureGlobalAuth_createsNewGlobalGitConfigWhenGlobalDoesNotExist =
    'configureGlobalAuth creates new git config when global does not exist'
  it(
    configureGlobalAuth_createsNewGlobalGitConfigWhenGlobalDoesNotExist,
    async () => {
      // Arrange
      await setup(
        configureGlobalAuth_createsNewGlobalGitConfigWhenGlobalDoesNotExist
      )
      await io.rmRF(globalGitConfigPath)
      const authHelper = gitAuthHelper.createAuthHelper(git, settings)

      // Act
      await authHelper.configureAuth()
      await authHelper.configureGlobalAuth()

      // Assert original global config not recreated
      try {
        await fs.promises.stat(globalGitConfigPath)
        throw new Error(
          `Did not expect file to exist: '${globalGitConfigPath}'`
        )
      } catch (err) {
        if ((err as any)?.code !== 'ENOENT') {
          throw err
        }
      }

      // Assert temporary global config
      expect(git.env['HOME']).toBeTruthy()
      const basicCredential = Buffer.from(
        `x-access-token:${settings.authToken}`,
        'utf8'
      ).toString('base64')
      const configContent = (
        await fs.promises.readFile(path.join(git.env['HOME'], '.gitconfig'))
      ).toString()
      // Global config should have include.path pointing to credentials file
      expect(configContent.indexOf('include.path')).toBeGreaterThanOrEqual(0)

      // Check credentials in the separate config file
      const credentialsFiles = (await fs.promises.readdir(runnerTemp)).filter(
        f => f.startsWith('git-credentials-') && f.endsWith('.config')
      )
      expect(credentialsFiles.length).toBeGreaterThan(0)
      const credentialsConfigPath = path.join(runnerTemp, credentialsFiles[0])
      const credentialsContent = (
        await fs.promises.readFile(credentialsConfigPath)
      ).toString()
      expect(
        credentialsContent.indexOf(
          `http.https://github.com/.extraheader AUTHORIZATION: basic ${basicCredential}`
        )
      ).toBeGreaterThanOrEqual(0)
    }
  )

  const configureSubmoduleAuth_configuresSubmodulesWhenPersistCredentialsFalseAndSshKeyNotSet =
    'configureSubmoduleAuth configures submodules when persist credentials false and SSH key not set'
  it(
    configureSubmoduleAuth_configuresSubmodulesWhenPersistCredentialsFalseAndSshKeyNotSet,
    async () => {
      // Arrange
      await setup(
        configureSubmoduleAuth_configuresSubmodulesWhenPersistCredentialsFalseAndSshKeyNotSet
      )
      settings.persistCredentials = false
      settings.sshKey = ''
      const authHelper = gitAuthHelper.createAuthHelper(git, settings)
      await authHelper.configureAuth()
      const mockSubmoduleForeach = git.submoduleForeach as jest.Mock<any, any>
      mockSubmoduleForeach.mockClear() // reset calls

      // Act
      await authHelper.configureSubmoduleAuth()

      // Assert
      expect(mockSubmoduleForeach).toBeCalledTimes(1)
      expect(mockSubmoduleForeach.mock.calls[0][0] as string).toMatch(
        /unset-all.*insteadOf/
      )
    }
  )

  const configureSubmoduleAuth_configuresSubmodulesWhenPersistCredentialsFalseAndSshKeySet =
    'configureSubmoduleAuth configures submodules when persist credentials false and SSH key set'
  it(
    configureSubmoduleAuth_configuresSubmodulesWhenPersistCredentialsFalseAndSshKeySet,
    async () => {
      if (!sshPath) {
        process.stdout.write(
          `Skipped test "${configureSubmoduleAuth_configuresSubmodulesWhenPersistCredentialsFalseAndSshKeySet}". Executable 'ssh' not found in the PATH.\n`
        )
        return
      }

      // Arrange
      await setup(
        configureSubmoduleAuth_configuresSubmodulesWhenPersistCredentialsFalseAndSshKeySet
      )
      settings.persistCredentials = false
      const authHelper = gitAuthHelper.createAuthHelper(git, settings)
      await authHelper.configureAuth()
      const mockSubmoduleForeach = git.submoduleForeach as jest.Mock<any, any>
      mockSubmoduleForeach.mockClear() // reset calls

      // Act
      await authHelper.configureSubmoduleAuth()

      // Assert
      expect(mockSubmoduleForeach).toHaveBeenCalledTimes(1)
      expect(mockSubmoduleForeach.mock.calls[0][0]).toMatch(
        /unset-all.*insteadOf/
      )
    }
  )

  const configureSubmoduleAuth_configuresSubmodulesWhenPersistCredentialsTrueAndSshKeyNotSet =
    'configureSubmoduleAuth configures submodules when persist credentials true and SSH key not set'
  it(
    configureSubmoduleAuth_configuresSubmodulesWhenPersistCredentialsTrueAndSshKeyNotSet,
    async () => {
      // Arrange
      await setup(
        configureSubmoduleAuth_configuresSubmodulesWhenPersistCredentialsTrueAndSshKeyNotSet
      )
      settings.sshKey = ''
      const authHelper = gitAuthHelper.createAuthHelper(git, settings)
      await authHelper.configureAuth()
      const mockSubmoduleForeach = git.submoduleForeach as jest.Mock<any, any>
      mockSubmoduleForeach.mockClear() // reset calls

      // Act
      await authHelper.configureSubmoduleAuth()

      // Assert
      // Should configure insteadOf (2 calls for two values)
      expect(mockSubmoduleForeach).toHaveBeenCalledTimes(3)
      expect(mockSubmoduleForeach.mock.calls[0][0]).toMatch(
        /unset-all.*insteadOf/
      )
      expect(mockSubmoduleForeach.mock.calls[1][0]).toMatch(
        /url.*insteadOf.*git@github.com:/
      )
      expect(mockSubmoduleForeach.mock.calls[2][0]).toMatch(
        /url.*insteadOf.*org-123456@github.com:/
      )
    }
  )

  const configureSubmoduleAuth_configuresSubmodulesWhenPersistCredentialsTrueAndSshKeySet =
    'configureSubmoduleAuth configures submodules when persist credentials true and SSH key set'
  it(
    configureSubmoduleAuth_configuresSubmodulesWhenPersistCredentialsTrueAndSshKeySet,
    async () => {
      if (!sshPath) {
        process.stdout.write(
          `Skipped test "${configureSubmoduleAuth_configuresSubmodulesWhenPersistCredentialsTrueAndSshKeySet}". Executable 'ssh' not found in the PATH.\n`
        )
        return
      }

      // Arrange
      await setup(
        configureSubmoduleAuth_configuresSubmodulesWhenPersistCredentialsTrueAndSshKeySet
      )
      const authHelper = gitAuthHelper.createAuthHelper(git, settings)
      await authHelper.configureAuth()
      const mockSubmoduleForeach = git.submoduleForeach as jest.Mock<any, any>
      mockSubmoduleForeach.mockClear() // reset calls

      // Act
      await authHelper.configureSubmoduleAuth()

      // Assert
      // Should configure sshCommand (1 call)
      expect(mockSubmoduleForeach).toHaveBeenCalledTimes(2)
      expect(mockSubmoduleForeach.mock.calls[0][0]).toMatch(
        /unset-all.*insteadOf/
      )
      expect(mockSubmoduleForeach.mock.calls[1][0]).toMatch(/core\.sshCommand/)
    }
  )

  const removeAuth_removesSshCommand = 'removeAuth removes SSH command'
  it(removeAuth_removesSshCommand, async () => {
    if (!sshPath) {
      process.stdout.write(
        `Skipped test "${removeAuth_removesSshCommand}". Executable 'ssh' not found in the PATH.\n`
      )
      return
    }

    // Arrange
    await setup(removeAuth_removesSshCommand)
    const authHelper = gitAuthHelper.createAuthHelper(git, settings)
    await authHelper.configureAuth()
    let gitConfigContent = (
      await fs.promises.readFile(localGitConfigPath)
    ).toString()
    expect(gitConfigContent.indexOf('core.sshCommand')).toBeGreaterThanOrEqual(
      0
    ) // sanity check
    const actualKeyPath = await getActualSshKeyPath()
    expect(actualKeyPath).toBeTruthy()
    await fs.promises.stat(actualKeyPath)
    const actualKnownHostsPath = await getActualSshKnownHostsPath()
    expect(actualKnownHostsPath).toBeTruthy()
    await fs.promises.stat(actualKnownHostsPath)

    // Act
    await authHelper.removeAuth()

    // Assert git config
    gitConfigContent = (
      await fs.promises.readFile(localGitConfigPath)
    ).toString()
    expect(gitConfigContent.indexOf('core.sshCommand')).toBeLessThan(0)

    // Assert SSH key file
    try {
      await fs.promises.stat(actualKeyPath)
      throw new Error('SSH key should have been deleted')
    } catch (err) {
      if ((err as any)?.code !== 'ENOENT') {
        throw err
      }
    }

    // Assert known hosts file
    try {
      await fs.promises.stat(actualKnownHostsPath)
      throw new Error('SSH known hosts should have been deleted')
    } catch (err) {
      if ((err as any)?.code !== 'ENOENT') {
        throw err
      }
    }
  })

  const removeAuth_removesToken = 'removeAuth removes token'
  it(removeAuth_removesToken, async () => {
    // Arrange
    await setup(removeAuth_removesToken)
    const authHelper = gitAuthHelper.createAuthHelper(git, settings)
    await authHelper.configureAuth()

    // Verify includeIf entries exist in local config
    let localConfigContent = (
      await fs.promises.readFile(localGitConfigPath)
    ).toString()
    expect(
      localConfigContent.indexOf('includeIf.gitdir:')
    ).toBeGreaterThanOrEqual(0)

    // Verify both host and container includeIf entries are present
    const hostGitDir = path.join(workspace, '.git').replace(/\\/g, '/')
    expect(
      localConfigContent.indexOf(`includeIf.gitdir:${hostGitDir}.path`)
    ).toBeGreaterThanOrEqual(0)
    expect(
      localConfigContent.indexOf('includeIf.gitdir:/github/workspace/.git.path')
    ).toBeGreaterThanOrEqual(0)

    // Verify credentials file exists
    let credentialsFiles = (await fs.promises.readdir(runnerTemp)).filter(
      f => f.startsWith('git-credentials-') && f.endsWith('.config')
    )
    expect(credentialsFiles.length).toBe(1)
    const credentialsFilePath = path.join(runnerTemp, credentialsFiles[0])

    // Verify credentials file contains the auth token
    let credentialsContent = (
      await fs.promises.readFile(credentialsFilePath)
    ).toString()
    const basicCredential = Buffer.from(
      `x-access-token:${settings.authToken}`,
      'utf8'
    ).toString('base64')
    expect(
      credentialsContent.indexOf(
        `http.https://github.com/.extraheader AUTHORIZATION: basic ${basicCredential}`
      )
    ).toBeGreaterThanOrEqual(0)

    // Verify the includeIf entries point to the credentials file
    const containerCredentialsPath = path.posix.join(
      '/github/runner_temp',
      path.basename(credentialsFilePath)
    )
    expect(
      localConfigContent.indexOf(credentialsFilePath)
    ).toBeGreaterThanOrEqual(0)
    expect(
      localConfigContent.indexOf(containerCredentialsPath)
    ).toBeGreaterThanOrEqual(0)

    // Act
    await authHelper.removeAuth()

    // Assert all includeIf entries removed from local git config
    localConfigContent = (
      await fs.promises.readFile(localGitConfigPath)
    ).toString()
    expect(localConfigContent.indexOf('includeIf.gitdir:')).toBeLessThan(0)
    expect(
      localConfigContent.indexOf(`includeIf.gitdir:${hostGitDir}.path`)
    ).toBeLessThan(0)
    expect(
      localConfigContent.indexOf('includeIf.gitdir:/github/workspace/.git.path')
    ).toBeLessThan(0)
    expect(localConfigContent.indexOf(credentialsFilePath)).toBeLessThan(0)
    expect(localConfigContent.indexOf(containerCredentialsPath)).toBeLessThan(0)

    // Assert credentials config file deleted
    credentialsFiles = (await fs.promises.readdir(runnerTemp)).filter(
      f => f.startsWith('git-credentials-') && f.endsWith('.config')
    )
    expect(credentialsFiles.length).toBe(0)

    // Verify credentials file no longer exists on disk
    try {
      await fs.promises.stat(credentialsFilePath)
      throw new Error('Credentials file should have been deleted')
    } catch (err) {
      if ((err as any)?.code !== 'ENOENT') {
        throw err
      }
    }
  })

  const removeAuth_removesTokenFromSubmodules =
    'removeAuth removes token from submodules'
  it(removeAuth_removesTokenFromSubmodules, async () => {
    // Arrange
    await setup(removeAuth_removesTokenFromSubmodules)

    // Create fake submodule config paths
    const submodule1Dir = path.join(workspace, '.git', 'modules', 'submodule-1')
    const submodule2Dir = path.join(workspace, '.git', 'modules', 'submodule-2')
    const submodule1ConfigPath = path.join(submodule1Dir, 'config')
    const submodule2ConfigPath = path.join(submodule2Dir, 'config')

    await fs.promises.mkdir(submodule1Dir, {recursive: true})
    await fs.promises.mkdir(submodule2Dir, {recursive: true})
    await fs.promises.writeFile(submodule1ConfigPath, '')
    await fs.promises.writeFile(submodule2ConfigPath, '')

    // Mock getSubmoduleConfigPaths to return our fake submodules (for both configure and remove)
    const mockGetSubmoduleConfigPaths =
      git.getSubmoduleConfigPaths as jest.Mock<any, any>
    mockGetSubmoduleConfigPaths.mockResolvedValue([
      submodule1ConfigPath,
      submodule2ConfigPath
    ])

    const authHelper = gitAuthHelper.createAuthHelper(git, settings)
    await authHelper.configureAuth()
    await authHelper.configureSubmoduleAuth()

    // Verify credentials file exists
    let credentialsFiles = (await fs.promises.readdir(runnerTemp)).filter(
      f => f.startsWith('git-credentials-') && f.endsWith('.config')
    )
    expect(credentialsFiles.length).toBe(1)
    const credentialsFilePath = path.join(runnerTemp, credentialsFiles[0])

    // Verify submodule 1 config has includeIf entries
    let submodule1Content = (
      await fs.promises.readFile(submodule1ConfigPath)
    ).toString()
    const submodule1GitDir = submodule1Dir.replace(/\\/g, '/')
    expect(
      submodule1Content.indexOf(`includeIf.gitdir:${submodule1GitDir}.path`)
    ).toBeGreaterThanOrEqual(0)
    expect(
      submodule1Content.indexOf(credentialsFilePath)
    ).toBeGreaterThanOrEqual(0)

    // Verify submodule 2 config has includeIf entries
    let submodule2Content = (
      await fs.promises.readFile(submodule2ConfigPath)
    ).toString()
    const submodule2GitDir = submodule2Dir.replace(/\\/g, '/')
    expect(
      submodule2Content.indexOf(`includeIf.gitdir:${submodule2GitDir}.path`)
    ).toBeGreaterThanOrEqual(0)
    expect(
      submodule2Content.indexOf(credentialsFilePath)
    ).toBeGreaterThanOrEqual(0)

    // Verify both host and container paths are in each submodule config
    const containerCredentialsPath = path.posix.join(
      '/github/runner_temp',
      path.basename(credentialsFilePath)
    )
    expect(
      submodule1Content.indexOf(containerCredentialsPath)
    ).toBeGreaterThanOrEqual(0)
    expect(
      submodule2Content.indexOf(containerCredentialsPath)
    ).toBeGreaterThanOrEqual(0)

    // Act - ensure mock persists for removeAuth
    mockGetSubmoduleConfigPaths.mockResolvedValue([
      submodule1ConfigPath,
      submodule2ConfigPath
    ])
    await authHelper.removeAuth()

    // Assert submodule 1 includeIf entries removed
    submodule1Content = (
      await fs.promises.readFile(submodule1ConfigPath)
    ).toString()
    expect(submodule1Content.indexOf('includeIf.gitdir:')).toBeLessThan(0)
    expect(submodule1Content.indexOf(credentialsFilePath)).toBeLessThan(0)
    expect(submodule1Content.indexOf(containerCredentialsPath)).toBeLessThan(0)

    // Assert submodule 2 includeIf entries removed
    submodule2Content = (
      await fs.promises.readFile(submodule2ConfigPath)
    ).toString()
    expect(submodule2Content.indexOf('includeIf.gitdir:')).toBeLessThan(0)
    expect(submodule2Content.indexOf(credentialsFilePath)).toBeLessThan(0)
    expect(submodule2Content.indexOf(containerCredentialsPath)).toBeLessThan(0)

    // Assert credentials config file deleted
    credentialsFiles = (await fs.promises.readdir(runnerTemp)).filter(
      f => f.startsWith('git-credentials-') && f.endsWith('.config')
    )
    expect(credentialsFiles.length).toBe(0)

    // Verify credentials file no longer exists on disk
    try {
      await fs.promises.stat(credentialsFilePath)
      throw new Error('Credentials file should have been deleted')
    } catch (err) {
      if ((err as any)?.code !== 'ENOENT') {
        throw err
      }
    }
  })

  const removeGlobalConfig_removesOverride =
    'removeGlobalConfig removes override'
  it(removeGlobalConfig_removesOverride, async () => {
    // Arrange
    await setup(removeGlobalConfig_removesOverride)
    const authHelper = gitAuthHelper.createAuthHelper(git, settings)
    await authHelper.configureAuth()
    await authHelper.configureGlobalAuth()
    const homeOverride = git.env['HOME'] // Sanity check
    expect(homeOverride).toBeTruthy()
    await fs.promises.stat(path.join(git.env['HOME'], '.gitconfig'))

    // Act
    await authHelper.removeGlobalConfig()

    // Assert
    expect(git.env['HOME']).toBeUndefined()
    try {
      await fs.promises.stat(homeOverride)
      throw new Error(`Should have been deleted '${homeOverride}'`)
    } catch (err) {
      if ((err as any)?.code !== 'ENOENT') {
        throw err
      }
    }
  })

  const testCredentialsConfigPath_matchesCredentialsConfigPaths =
    'testCredentialsConfigPath matches credentials config paths'
  it(testCredentialsConfigPath_matchesCredentialsConfigPaths, async () => {
    // Arrange
    await setup(testCredentialsConfigPath_matchesCredentialsConfigPaths)
    const authHelper = gitAuthHelper.createAuthHelper(git, settings)

    // Get a real credentials config path
    const credentialsConfigPath = await (
      authHelper as any
    ).getCredentialsConfigPath()

    // Act & Assert
    expect(
      (authHelper as any).testCredentialsConfigPath(credentialsConfigPath)
    ).toBe(true)
    expect(
      (authHelper as any).testCredentialsConfigPath(
        '/some/path/git-credentials-12345678-abcd-1234-5678-123456789012.config'
      )
    ).toBe(true)
    expect(
      (authHelper as any).testCredentialsConfigPath(
        '/some/path/git-credentials-abcdef12-3456-7890-abcd-ef1234567890.config'
      )
    ).toBe(true)

    // Test invalid paths
    expect(
      (authHelper as any).testCredentialsConfigPath(
        '/some/path/other-config.config'
      )
    ).toBe(false)
    expect(
      (authHelper as any).testCredentialsConfigPath(
        '/some/path/git-credentials-invalid.config'
      )
    ).toBe(false)
    expect(
      (authHelper as any).testCredentialsConfigPath(
        '/some/path/git-credentials-.config'
      )
    ).toBe(false)
    expect((authHelper as any).testCredentialsConfigPath('')).toBe(false)
  })
})

async function setup(testName: string): Promise<void> {
  testName = testName.replace(/[^a-zA-Z0-9_]+/g, '-')

  // Directories
  workspace = path.join(testWorkspace, testName, 'workspace')
  runnerTemp = path.join(testWorkspace, testName, 'runner-temp')
  tempHomedir = path.join(testWorkspace, testName, 'home-dir')
  await fs.promises.mkdir(workspace, {recursive: true})
  await fs.promises.mkdir(runnerTemp, {recursive: true})
  await fs.promises.mkdir(tempHomedir, {recursive: true})
  process.env['RUNNER_TEMP'] = runnerTemp
  process.env['HOME'] = tempHomedir
  process.env['GITHUB_WORKSPACE'] = workspace

  // Create git config
  globalGitConfigPath = path.join(tempHomedir, '.gitconfig')
  await fs.promises.writeFile(globalGitConfigPath, '')
  localGitConfigPath = path.join(workspace, '.git', 'config')
  await fs.promises.mkdir(path.dirname(localGitConfigPath), {recursive: true})
  await fs.promises.writeFile(localGitConfigPath, '')

  git = {
    branchDelete: jest.fn(),
    branchExists: jest.fn(),
    branchList: jest.fn(),
    disableSparseCheckout: jest.fn(),
    sparseCheckout: jest.fn(),
    sparseCheckoutNonConeMode: jest.fn(),
    checkout: jest.fn(),
    checkoutDetach: jest.fn(),
    config: jest.fn(
      async (
        key: string,
        value: string,
        globalConfig?: boolean,
        add?: boolean,
        configFile?: string
      ) => {
        const configPath =
          configFile ||
          (globalConfig
            ? path.join(git.env['HOME'] || tempHomedir, '.gitconfig')
            : localGitConfigPath)
        // Ensure directory exists
        await fs.promises.mkdir(path.dirname(configPath), {recursive: true})
        await fs.promises.appendFile(configPath, `\n${key} ${value}`)
      }
    ),
    configExists: jest.fn(
      async (key: string, globalConfig?: boolean): Promise<boolean> => {
        const configPath = globalConfig
          ? path.join(git.env['HOME'] || tempHomedir, '.gitconfig')
          : localGitConfigPath
        const content = await fs.promises.readFile(configPath)
        const lines = content
          .toString()
          .split('\n')
          .filter(x => x)
        return lines.some(x => x.startsWith(key))
      }
    ),
    env: {},
    fetch: jest.fn(),
    getDefaultBranch: jest.fn(),
    getSubmoduleConfigPaths: jest.fn(async () => []),
    getWorkingDirectory: jest.fn(() => workspace),
    init: jest.fn(),
    isDetached: jest.fn(),
    lfsFetch: jest.fn(),
    lfsInstall: jest.fn(),
    log1: jest.fn(),
    remoteAdd: jest.fn(),
    removeEnvironmentVariable: jest.fn((name: string) => delete git.env[name]),
    revParse: jest.fn(),
    setEnvironmentVariable: jest.fn((name: string, value: string) => {
      git.env[name] = value
    }),
    shaExists: jest.fn(),
    submoduleForeach: jest.fn(async () => {
      return ''
    }),
    submoduleSync: jest.fn(),
    submoduleStatus: jest.fn(async () => {
      return true
    }),
    submoduleUpdate: jest.fn(),
    tagExists: jest.fn(),
    tryClean: jest.fn(),
    tryConfigUnset: jest.fn(
      async (key: string, globalConfig?: boolean): Promise<boolean> => {
        const configPath = globalConfig
          ? path.join(git.env['HOME'] || tempHomedir, '.gitconfig')
          : localGitConfigPath
        let content = await fs.promises.readFile(configPath)
        let lines = content
          .toString()
          .split('\n')
          .filter(x => x)
          .filter(x => !x.startsWith(key))
        await fs.promises.writeFile(configPath, lines.join('\n'))
        return true
      }
    ),
    tryConfigUnsetValue: jest.fn(
      async (
        key: string,
        value: string,
        globalConfig?: boolean,
        configPath?: string
      ): Promise<boolean> => {
        const targetConfigPath =
          configPath ||
          (globalConfig
            ? path.join(git.env['HOME'] || tempHomedir, '.gitconfig')
            : localGitConfigPath)
        let content = await fs.promises.readFile(targetConfigPath)
        let lines = content
          .toString()
          .split('\n')
          .filter(x => x)
          .filter(x => !(x.startsWith(key) && x.includes(value)))
        await fs.promises.writeFile(targetConfigPath, lines.join('\n'))
        return true
      }
    ),
    tryDisableAutomaticGarbageCollection: jest.fn(),
    tryGetFetchUrl: jest.fn(),
    tryGetConfigValues: jest.fn(
      async (
        key: string,
        globalConfig?: boolean,
        configPath?: string
      ): Promise<string[]> => {
        const targetConfigPath =
          configPath ||
          (globalConfig
            ? path.join(git.env['HOME'] || tempHomedir, '.gitconfig')
            : localGitConfigPath)
        const content = await fs.promises.readFile(targetConfigPath)
        const lines = content
          .toString()
          .split('\n')
          .filter(x => x && x.startsWith(key))
          .map(x => x.substring(key.length).trim())
        return lines
      }
    ),
    tryGetConfigKeys: jest.fn(
      async (
        pattern: string,
        globalConfig?: boolean,
        configPath?: string
      ): Promise<string[]> => {
        const targetConfigPath =
          configPath ||
          (globalConfig
            ? path.join(git.env['HOME'] || tempHomedir, '.gitconfig')
            : localGitConfigPath)
        const content = await fs.promises.readFile(targetConfigPath)
        const lines = content
          .toString()
          .split('\n')
          .filter(x => x)
        const keys = lines
          .filter(x => new RegExp(pattern).test(x.split(' ')[0]))
          .map(x => x.split(' ')[0])
        return [...new Set(keys)] // Remove duplicates
      }
    ),
    tryReset: jest.fn(),
    version: jest.fn()
  }

  settings = {
    authToken: 'some auth token',
    clean: true,
    commit: '',
    filter: undefined,
    sparseCheckout: [],
    sparseCheckoutConeMode: true,
    fetchDepth: 1,
    fetchTags: false,
    showProgress: true,
    lfs: false,
    submodules: false,
    nestedSubmodules: false,
    persistCredentials: true,
    ref: 'refs/heads/main',
    repositoryName: 'my-repo',
    repositoryOwner: 'my-org',
    repositoryPath: '',
    sshKey: sshPath ? 'some ssh private key' : '',
    sshKnownHosts: '',
    sshStrict: true,
    sshUser: '',
    workflowOrganizationId: 123456,
    setSafeDirectory: true,
    githubServerUrl: githubServerUrl
  }
}

async function getActualSshKeyPath(): Promise<string> {
  let actualTempFiles = (await fs.promises.readdir(runnerTemp))
    .filter(x => !x.startsWith('git-credentials-')) // Exclude credentials config file
    .sort()
    .map(x => path.join(runnerTemp, x))
  if (actualTempFiles.length === 0) {
    return ''
  }

  expect(actualTempFiles).toHaveLength(2)
  expect(actualTempFiles[0].endsWith('_known_hosts')).toBeFalsy()
  return actualTempFiles[0]
}

async function getActualSshKnownHostsPath(): Promise<string> {
  let actualTempFiles = (await fs.promises.readdir(runnerTemp))
    .filter(x => !x.startsWith('git-credentials-')) // Exclude credentials config file
    .sort()
    .map(x => path.join(runnerTemp, x))
  if (actualTempFiles.length === 0) {
    return ''
  }

  expect(actualTempFiles).toHaveLength(2)
  expect(actualTempFiles[1].endsWith('_known_hosts')).toBeTruthy()
  expect(actualTempFiles[1].startsWith(actualTempFiles[0])).toBeTruthy()
  return actualTempFiles[1]
}


================================================
FILE: __test__/git-command-manager.test.ts
================================================
import * as exec from '@actions/exec'
import * as fshelper from '../lib/fs-helper'
import * as commandManager from '../lib/git-command-manager'

let git: commandManager.IGitCommandManager
let mockExec = jest.fn()

describe('git-auth-helper tests', () => {
  beforeAll(async () => {})

  beforeEach(async () => {
    jest.spyOn(fshelper, 'fileExistsSync').mockImplementation(jest.fn())
    jest.spyOn(fshelper, 'directoryExistsSync').mockImplementation(jest.fn())
  })

  afterEach(() => {
    jest.restoreAllMocks()
  })

  afterAll(() => {})

  it('branch list matches', async () => {
    mockExec.mockImplementation((path, args, options) => {
      console.log(args, options.listeners.stdout)

      if (args.includes('version')) {
        options.listeners.stdout(Buffer.from('2.18'))
        return 0
      }

      if (args.includes('rev-parse')) {
        options.listeners.stdline(Buffer.from('refs/heads/foo'))
        options.listeners.stdline(Buffer.from('refs/heads/bar'))
        return 0
      }

      return 1
    })
    jest.spyOn(exec, 'exec').mockImplementation(mockExec)
    const workingDirectory = 'test'
    const lfs = false
    const doSparseCheckout = false
    git = await commandManager.createCommandManager(
      workingDirectory,
      lfs,
      doSparseCheckout
    )

    let branches = await git.branchList(false)

    expect(branches).toHaveLength(2)
    expect(branches.sort()).toEqual(['foo', 'bar'].sort())
  })

  it('ambiguous ref name output is captured', async () => {
    mockExec.mockImplementation((path, args, options) => {
      console.log(args, options.listeners.stdout)

      if (args.includes('version')) {
        options.listeners.stdout(Buffer.from('2.18'))
        return 0
      }

      if (args.includes('rev-parse')) {
        options.listeners.stdline(Buffer.from('refs/heads/foo'))
        // If refs/tags/v1 and refs/heads/tags/v1 existed on this repository
        options.listeners.errline(
          Buffer.from("error: refname 'tags/v1' is ambiguous")
        )
        return 0
      }

      return 1
    })
    jest.spyOn(exec, 'exec').mockImplementation(mockExec)
    const workingDirectory = 'test'
    const lfs = false
    const doSparseCheckout = false
    git = await commandManager.createCommandManager(
      workingDirectory,
      lfs,
      doSparseCheckout
    )

    let branches = await git.branchList(false)

    expect(branches).toHaveLength(1)
    expect(branches.sort()).toEqual(['foo'].sort())
  })
})

describe('Test fetchDepth and fetchTags options', () => {
  beforeEach(async () => {
    jest.spyOn(fshelper, 'fileExistsSync').mockImplementation(jest.fn())
    jest.spyOn(fshelper, 'directoryExistsSync').mockImplementation(jest.fn())
    mockExec.mockImplementation((path, args, options) => {
      console.log(args, options.listeners.stdout)

      if (args.includes('version')) {
        options.listeners.stdout(Buffer.from('2.18'))
      }

      return 0
    })
  })

  afterEach(() => {
    jest.restoreAllMocks()
  })

  it('should call execGit with the correct arguments when fetchDepth is 0', async () => {
    jest.spyOn(exec, 'exec').mockImplementation(mockExec)
    const workingDirectory = 'test'
    const lfs = false
    const doSparseCheckout = false
    git = await commandManager.createCommandManager(
      workingDirectory,
      lfs,
      doSparseCheckout
    )

    const refSpec = ['refspec1', 'refspec2']
    const options = {
      filter: 'filterValue',
      fetchDepth: 0
    }

    await git.fetch(refSpec, options)

    expect(mockExec).toHaveBeenCalledWith(
      expect.any(String),
      [
        '-c',
        'protocol.version=2',
        'fetch',
        '--no-tags',
        '--prune',
        '--no-recurse-submodules',
        '--filter=filterValue',
        'origin',
        'refspec1',
        'refspec2'
      ],
      expect.any(Object)
    )
  })

  it('should call execGit with the correct arguments when fetchDepth is 0 and refSpec includes tags', async () => {
    jest.spyOn(exec, 'exec').mockImplementation(mockExec)

    const workingDirectory = 'test'
    const lfs = false
    const doSparseCheckout = false
    git = await commandManager.createCommandManager(
      workingDirectory,
      lfs,
      doSparseCheckout
    )
    const refSpec = ['refspec1', 'refspec2', '+refs/tags/*:refs/tags/*']
    const options = {
      filter: 'filterValue',
      fetchDepth: 0
    }

    await git.fetch(refSpec, options)

    expect(mockExec).toHaveBeenCalledWith(
      expect.any(String),
      [
        '-c',
        'protocol.version=2',
        'fetch',
        '--no-tags',
        '--prune',
        '--no-recurse-submodules',
        '--filter=filterValue',
        'origin',
        'refspec1',
        'refspec2',
        '+refs/tags/*:refs/tags/*'
      ],
      expect.any(Object)
    )
  })

  it('should call execGit with the correct arguments when fetchDepth is 1', async () => {
    jest.spyOn(exec, 'exec').mockImplementation(mockExec)

    const workingDirectory = 'test'
    const lfs = false
    const doSparseCheckout = false
    git = await commandManager.createCommandManager(
      workingDirectory,
      lfs,
      doSparseCheckout
    )
    const refSpec = ['refspec1', 'refspec2']
    const options = {
      filter: 'filterValue',
      fetchDepth: 1
    }

    await git.fetch(refSpec, options)

    expect(mockExec).toHaveBeenCalledWith(
      expect.any(String),
      [
        '-c',
        'protocol.version=2',
        'fetch',
        '--no-tags',
        '--prune',
        '--no-recurse-submodules',
        '--filter=filterValue',
        '--depth=1',
        'origin',
        'refspec1',
        'refspec2'
      ],
      expect.any(Object)
    )
  })

  it('should call execGit with the correct arguments when fetchDepth is 1 and refSpec includes tags', async () => {
    jest.spyOn(exec, 'exec').mockImplementation(mockExec)

    const workingDirectory = 'test'
    const lfs = false
    const doSparseCheckout = false
    git = await commandManager.createCommandManager(
      workingDirectory,
      lfs,
      doSparseCheckout
    )
    const refSpec = ['refspec1', 'refspec2', '+refs/tags/*:refs/tags/*']
    const options = {
      filter: 'filterValue',
      fetchDepth: 1
    }

    await git.fetch(refSpec, options)

    expect(mockExec).toHaveBeenCalledWith(
      expect.any(String),
      [
        '-c',
        'protocol.version=2',
        'fetch',
        '--no-tags',
        '--prune',
        '--no-recurse-submodules',
        '--filter=filterValue',
        '--depth=1',
        'origin',
        'refspec1',
        'refspec2',
        '+refs/tags/*:refs/tags/*'
      ],
      expect.any(Object)
    )
  })

  it('should call execGit with the correct arguments when showProgress is true', async () => {
    jest.spyOn(exec, 'exec').mockImplementation(mockExec)

    const workingDirectory = 'test'
    const lfs = false
    const doSparseCheckout = false
    git = await commandManager.createCommandManager(
      workingDirectory,
      lfs,
      doSparseCheckout
    )
    const refSpec = ['refspec1', 'refspec2']
    const options = {
      filter: 'filterValue',
      showProgress: true
    }

    await git.fetch(refSpec, options)

    expect(mockExec).toHaveBeenCalledWith(
      expect.any(String),
      [
        '-c',
        'protocol.version=2',
        'fetch',
        '--no-tags',
        '--prune',
        '--no-recurse-submodules',
        '--progress',
        '--filter=filterValue',
        'origin',
        'refspec1',
        'refspec2'
      ],
      expect.any(Object)
    )
  })

  it('should call execGit with the correct arguments when fetchDepth is 42 and showProgress is true', async () => {
    jest.spyOn(exec, 'exec').mockImplementation(mockExec)

    const workingDirectory = 'test'
    const lfs = false
    const doSparseCheckout = false
    git = await commandManager.createCommandManager(
      workingDirectory,
      lfs,
      doSparseCheckout
    )
    const refSpec = ['refspec1', 'refspec2']
    const options = {
      filter: 'filterValue',
      fetchDepth: 42,
      showProgress: true
    }

    await git.fetch(refSpec, options)

    expect(mockExec).toHaveBeenCalledWith(
      expect.any(String),
      [
        '-c',
        'protocol.version=2',
        'fetch',
        '--no-tags',
        '--prune',
        '--no-recurse-submodules',
        '--progress',
        '--filter=filterValue',
        '--depth=42',
        'origin',
        'refspec1',
        'refspec2'
      ],
      expect.any(Object)
    )
  })

  it('should call execGit with the correct arguments when showProgress is true and refSpec includes tags', async () => {
    jest.spyOn(exec, 'exec').mockImplementation(mockExec)

    const workingDirectory = 'test'
    const lfs = false
    const doSparseCheckout = false
    git = await commandManager.createCommandManager(
      workingDirectory,
      lfs,
      doSparseCheckout
    )
    const refSpec = ['refspec1', 'refspec2', '+refs/tags/*:refs/tags/*']
    const options = {
      filter: 'filterValue',
      showProgress: true
    }

    await git.fetch(refSpec, options)

    expect(mockExec).toHaveBeenCalledWith(
      expect.any(String),
      [
        '-c',
        'protocol.version=2',
        'fetch',
        '--no-tags',
        '--prune',
        '--no-recurse-submodules',
        '--progress',
        '--filter=filterValue',
        'origin',
        'refspec1',
        'refspec2',
        '+refs/tags/*:refs/tags/*'
      ],
      expect.any(Object)
    )
  })
})

describe('git user-agent with orchestration ID', () => {
  beforeEach(async () => {
    jest.spyOn(fshelper, 'fileExistsSync').mockImplementation(jest.fn())
    jest.spyOn(fshelper, 'directoryExistsSync').mockImplementation(jest.fn())
  })

  afterEach(() => {
    jest.restoreAllMocks()
    // Clean up environment variable to prevent test pollution
    delete process.env['ACTIONS_ORCHESTRATION_ID']
  })

  it('should include orchestration ID in user-agent when ACTIONS_ORCHESTRATION_ID is set', async () => {
    const orchId = 'test-orch-id-12345'
    process.env['ACTIONS_ORCHESTRATION_ID'] = orchId

    let capturedEnv: any = null
    mockExec.mockImplementation((path, args, options) => {
      if (args.includes('version')) {
        options.listeners.stdout(Buffer.from('2.18'))
      }
      // Capture env on any command
      capturedEnv = options.env
      return 0
    })
    jest.spyOn(exec, 'exec').mockImplementation(mockExec)

    const workingDirectory = 'test'
    const lfs = false
    const doSparseCheckout = false
    git = await commandManager.createCommandManager(
      workingDirectory,
      lfs,
      doSparseCheckout
    )

    // Call a git command to trigger env capture after user-agent is set
    await git.init()

    // Verify the user agent includes the orchestration ID
    expect(git).toBeDefined()
    expect(capturedEnv).toBeDefined()
    expect(capturedEnv['GIT_HTTP_USER_AGENT']).toBe(
      `git/2.18 (github-actions-checkout) actions_orchestration_id/${orchId}`
    )
  })

  it('should sanitize invalid characters in orchestration ID', async () => {
    const orchId = 'test (with) special/chars'
    process.env['ACTIONS_ORCHESTRATION_ID'] = orchId

    let capturedEnv: any = null
    mockExec.mockImplementation((path, args, options) => {
      if (args.includes('version')) {
        options.listeners.stdout(Buffer.from('2.18'))
      }
      // Capture env on any command
      capturedEnv = options.env
      return 0
    })
    jest.spyOn(exec, 'exec').mockImplementation(mockExec)

    const workingDirectory = 'test'
    const lfs = false
    const doSparseCheckout = false
    git = await commandManager.createCommandManager(
      workingDirectory,
      lfs,
      doSparseCheckout
    )

    // Call a git command to trigger env capture after user-agent is set
    await git.init()

    // Verify the user agent has sanitized orchestration ID (spaces, parentheses, slash replaced)
    expect(git).toBeDefined()
    expect(capturedEnv).toBeDefined()
    expect(capturedEnv['GIT_HTTP_USER_AGENT']).toBe(
      'git/2.18 (github-actions-checkout) actions_orchestration_id/test__with__special_chars'
    )
  })

  it('should not modify user-agent when ACTIONS_ORCHESTRATION_ID is not set', async () => {
    delete process.env['ACTIONS_ORCHESTRATION_ID']

    let capturedEnv: any = null
    mockExec.mockImplementation((path, args, options) => {
      if (args.includes('version')) {
        options.listeners.stdout(Buffer.from('2.18'))
      }
      // Capture env on any command
      capturedEnv = options.env
      return 0
    })
    jest.spyOn(exec, 'exec').mockImplementation(mockExec)

    const workingDirectory = 'test'
    const lfs = false
    const doSparseCheckout = false
    git = await commandManager.createCommandManager(
      workingDirectory,
      lfs,
      doSparseCheckout
    )

    // Call a git command to trigger env capture after user-agent is set
    await git.init()

    // Verify the user agent does NOT contain orchestration ID
    expect(git).toBeDefined()
    expect(capturedEnv).toBeDefined()
    expect(capturedEnv['GIT_HTTP_USER_AGENT']).toBe(
      'git/2.18 (github-actions-checkout)'
    )
  })
})


================================================
FILE: __test__/git-directory-helper.test.ts
================================================
import * as core from '@actions/core'
import * as fs from 'fs'
import * as gitDirectoryHelper from '../lib/git-directory-helper'
import * as io from '@actions/io'
import * as path from 'path'
import {IGitCommandManager} from '../lib/git-command-manager'

const testWorkspace = path.join(__dirname, '_temp', 'git-directory-helper')
let repositoryPath: string
let repositoryUrl: string
let clean: boolean
let ref: string
let git: IGitCommandManager

describe('git-directory-helper tests', () => {
  beforeAll(async () => {
    // Clear test workspace
    await io.rmRF(testWorkspace)
  })

  beforeEach(() => {
    // Mock error/warning/info/debug
    jest.spyOn(core, 'error').mockImplementation(jest.fn())
    jest.spyOn(core, 'warning').mockImplementation(jest.fn())
    jest.spyOn(core, 'info').mockImplementation(jest.fn())
    jest.spyOn(core, 'debug').mockImplementation(jest.fn())
  })

  afterEach(() => {
    // Unregister mocks
    jest.restoreAllMocks()
  })

  const cleansWhenCleanTrue = 'cleans when clean true'
  it(cleansWhenCleanTrue, async () => {
    // Arrange
    await setup(cleansWhenCleanTrue)
    await fs.promises.writeFile(path.join(repositoryPath, 'my-file'), '')

    // Act
    await gitDirectoryHelper.prepareExistingDirectory(
      git,
      repositoryPath,
      repositoryUrl,
      clean,
      ref
    )

    // Assert
    const files = await fs.promises.readdir(repositoryPath)
    expect(files.sort()).toEqual(['.git', 'my-file'])
    expect(git.tryClean).toHaveBeenCalled()
    expect(git.tryReset).toHaveBeenCalled()
    expect(core.warning).not.toHaveBeenCalled()
  })

  const checkoutDetachWhenNotDetached = 'checkout detach when not detached'
  it(checkoutDetachWhenNotDetached, async () => {
    // Arrange
    await setup(checkoutDetachWhenNotDetached)
    await fs.promises.writeFile(path.join(repositoryPath, 'my-file'), '')

    // Act
    await gitDirectoryHelper.prepareExistingDirectory(
      git,
      repositoryPath,
      repositoryUrl,
      clean,
      ref
    )

    // Assert
    const files = await fs.promises.readdir(repositoryPath)
    expect(files.sort()).toEqual(['.git', 'my-file'])
    expect(git.checkoutDetach).toHaveBeenCalled()
  })

  const doesNotCheckoutDetachWhenNotAlreadyDetached =
    'does not checkout detach when already detached'
  it(doesNotCheckoutDetachWhenNotAlreadyDetached, async () => {
    // Arrange
    await setup(doesNotCheckoutDetachWhenNotAlreadyDetached)
    await fs.promises.writeFile(path.join(repositoryPath, 'my-file'), '')
    const mockIsDetached = git.isDetached as jest.Mock<any, any>
    mockIsDetached.mockImplementation(async () => {
      return true
    })

    // Act
    await gitDirectoryHelper.prepareExistingDirectory(
      git,
      repositoryPath,
      repositoryUrl,
      clean,
      ref
    )

    // Assert
    const files = await fs.promises.readdir(repositoryPath)
    expect(files.sort()).toEqual(['.git', 'my-file'])
    expect(git.checkoutDetach).not.toHaveBeenCalled()
  })

  const doesNotCleanWhenCleanFalse = 'does not clean when clean false'
  it(doesNotCleanWhenCleanFalse, async () => {
    // Arrange
    await setup(doesNotCleanWhenCleanFalse)
    clean = false
    await fs.promises.writeFile(path.join(repositoryPath, 'my-file'), '')

    // Act
    await gitDirectoryHelper.prepareExistingDirectory(
      git,
      repositoryPath,
      repositoryUrl,
      clean,
      ref
    )

    // Assert
    const files = await fs.promises.readdir(repositoryPath)
    expect(files.sort()).toEqual(['.git', 'my-file'])
    expect(git.isDetached).toHaveBeenCalled()
    expect(git.branchList).toHaveBeenCalled()
    expect(core.warning).not.toHaveBeenCalled()
    expect(git.tryClean).not.toHaveBeenCalled()
    expect(git.tryReset).not.toHaveBeenCalled()
  })

  const removesContentsWhenCleanFails = 'removes contents when clean fails'
  it(removesContentsWhenCleanFails, async () => {
    // Arrange
    await setup(removesContentsWhenCleanFails)
    await fs.promises.writeFile(path.join(repositoryPath, 'my-file'), '')
    let mockTryClean = git.tryClean as jest.Mock<any, any>
    mockTryClean.mockImplementation(async () => {
      return false
    })

    // Act
    await gitDirectoryHelper.prepareExistingDirectory(
      git,
      repositoryPath,
      repositoryUrl,
      clean,
      ref
    )

    // Assert
    const files = await fs.promises.readdir(repositoryPath)
    expect(files).toHaveLength(0)
    expect(git.tryClean).toHaveBeenCalled()
    expect(core.warning).toHaveBeenCalled()
    expect(git.tryReset).not.toHaveBeenCalled()
  })

  const removesContentsWhenDifferentRepositoryUrl =
    'removes contents when different repository url'
  it(removesContentsWhenDifferentRepositoryUrl, async () => {
    // Arrange
    await setup(removesContentsWhenDifferentRepositoryUrl)
    clean = false
    await fs.promises.writeFile(path.join(repositoryPath, 'my-file'), '')
    const differentRepositoryUrl =
      'https://github.com/my-different-org/my-different-repo'

    // Act
    await gitDirectoryHelper.prepareExistingDirectory(
      git,
      repositoryPath,
      differentRepositoryUrl,
      clean,
      ref
    )

    // Assert
    const files = await fs.promises.readdir(repositoryPath)
    expect(files).toHaveLength(0)
    expect(core.warning).not.toHaveBeenCalled()
    expect(git.isDetached).not.toHaveBeenCalled()
  })

  const removesContentsWhenNoGitDirectory =
    'removes contents when no git directory'
  it(removesContentsWhenNoGitDirectory, async () => {
    // Arrange
    await setup(removesContentsWhenNoGitDirectory)
    clean = false
    await io.rmRF(path.join(repositoryPath, '.git'))
    await fs.promises.writeFile(path.join(repositoryPath, 'my-file'), '')

    // Act
    await gitDirectoryHelper.prepareExistingDirectory(
      git,
      repositoryPath,
      repositoryUrl,
      clean,
      ref
    )

    // Assert
    const files = await fs.promises.readdir(repositoryPath)
    expect(files).toHaveLength(0)
    expect(core.warning).not.toHaveBeenCalled()
    expect(git.isDetached).not.toHaveBeenCalled()
  })

  const removesContentsWhenResetFails = 'removes contents when reset fails'
  it(removesContentsWhenResetFails, async () => {
    // Arrange
    await setup(removesContentsWhenResetFails)
    await fs.promises.writeFile(path.join(repositoryPath, 'my-file'), '')
    let mockTryReset = git.tryReset as jest.Mock<any, any>
    mockTryReset.mockImplementation(async () => {
      return false
    })

    // Act
    await gitDirectoryHelper.prepareExistingDirectory(
      git,
      repositoryPath,
      repositoryUrl,
      clean,
      ref
    )

    // Assert
    const files = await fs.promises.readdir(repositoryPath)
    expect(files).toHaveLength(0)
    expect(git.tryClean).toHaveBeenCalled()
    expect(git.tryReset).toHaveBeenCalled()
    expect(core.warning).toHaveBeenCalled()
  })

  const removesContentsWhenUndefinedGitCommandManager =
    'removes contents when undefined git command manager'
  it(removesContentsWhenUndefinedGitCommandManager, async () => {
    // Arrange
    await setup(removesContentsWhenUndefinedGitCommandManager)
    clean = false
    await fs.promises.writeFile(path.join(repositoryPath, 'my-file'), '')

    // Act
    await gitDirectoryHelper.prepareExistingDirectory(
      undefined,
      repositoryPath,
      repositoryUrl,
      clean,
      ref
    )

    // Assert
    const files = await fs.promises.readdir(repositoryPath)
    expect(files).toHaveLength(0)
    expect(core.warning).not.toHaveBeenCalled()
  })

  const removesLocalBranches = 'removes local branches'
  it(removesLocalBranches, async () => {
    // Arrange
    await setup(removesLocalBranches)
    await fs.promises.writeFile(path.join(repositoryPath, 'my-file'), '')
    const mockBranchList = git.branchList as jest.Mock<any, any>
    mockBranchList.mockImplementation(async (remote: boolean) => {
      return remote ? [] : ['local-branch-1', 'local-branch-2']
    })

    // Act
    await gitDirectoryHelper.prepareExistingDirectory(
      git,
      repositoryPath,
      repositoryUrl,
      clean,
      ref
    )

    // Assert
    const files = await fs.promises.readdir(repositoryPath)
    expect(files.sort()).toEqual(['.git', 'my-file'])
    expect(git.branchDelete).toHaveBeenCalledWith(false, 'local-branch-1')
    expect(git.branchDelete).toHaveBeenCalledWith(false, 'local-branch-2')
  })

  const cleanWhenSubmoduleStatusIsFalse =
    'cleans when submodule status is false'

  it(cleanWhenSubmoduleStatusIsFalse, async () => {
    // Arrange
    await setup(cleanWhenSubmoduleStatusIsFalse)
    await fs.promises.writeFile(path.join(repositoryPath, 'my-file'), '')

    //mock bad submodule

    const submoduleStatus = git.submoduleStatus as jest.Mock<any, any>
    submoduleStatus.mockImplementation(async (remote: boolean) => {
      return false
    })

    // Act
    await gitDirectoryHelper.prepareExistingDirectory(
      git,
      repositoryPath,
      repositoryUrl,
      clean,
      ref
    )

    // Assert
    const files = await fs.promises.readdir(repositoryPath)
    expect(files).toHaveLength(0)
    expect(git.tryClean).toHaveBeenCalled()
  })

  const doesNotCleanWhenSubmoduleStatusIsTrue =
    'does not clean when submodule status is true'

  it(doesNotCleanWhenSubmoduleStatusIsTrue, async () => {
    // Arrange
    await setup(doesNotCleanWhenSubmoduleStatusIsTrue)
    await fs.promises.writeFile(path.join(repositoryPath, 'my-file'), '')

    const submoduleStatus = git.submoduleStatus as jest.Mock<any, any>
    submoduleStatus.mockImplementation(async (remote: boolean) => {
      return true
    })

    // Act
    await gitDirectoryHelper.prepareExistingDirectory(
      git,
      repositoryPath,
      repositoryUrl,
      clean,
      ref
    )

    // Assert

    const files = await fs.promises.readdir(repositoryPath)
    expect(files.sort()).toEqual(['.git', 'my-file'])
    expect(git.tryClean).toHaveBeenCalled()
  })

  const removesLockFiles = 'removes lock files'
  it(removesLockFiles, async () => {
    // Arrange
    await setup(removesLockFiles)
    clean = false
    await fs.promises.writeFile(
      path.join(repositoryPath, '.git', 'index.lock'),
      ''
    )
    await fs.promises.writeFile(
      path.join(repositoryPath, '.git', 'shallow.lock'),
      ''
    )
    await fs.promises.writeFile(path.join(repositoryPath, 'my-file'), '')

    // Act
    await gitDirectoryHelper.prepareExistingDirectory(
      git,
      repositoryPath,
      repositoryUrl,
      clean,
      ref
    )

    // Assert
    let files = await fs.promises.readdir(path.join(repositoryPath, '.git'))
    expect(files).toHaveLength(0)
    files = await fs.promises.readdir(repositoryPath)
    expect(files.sort()).toEqual(['.git', 'my-file'])
    expect(git.isDetached).toHaveBeenCalled()
    expect(git.branchList).toHaveBeenCalled()
    expect(core.warning).not.toHaveBeenCalled()
    expect(git.tryClean).not.toHaveBeenCalled()
    expect(git.tryReset).not.toHaveBeenCalled()
  })

  const removesAncestorRemoteBranch = 'removes ancestor remote branch'
  it(removesAncestorRemoteBranch, async () => {
    // Arrange
    await setup(removesAncestorRemoteBranch)
    await fs.promises.writeFile(path.join(repositoryPath, 'my-file'), '')
    const mockBranchList = git.branchList as jest.Mock<any, any>
    mockBranchList.mockImplementation(async (remote: boolean) => {
      return remote ? ['origin/remote-branch-1', 'origin/remote-branch-2'] : []
    })
    ref = 'remote-branch-1/conflict'

    // Act
    await gitDirectoryHelper.prepareExistingDirectory(
      git,
      repositoryPath,
      repositoryUrl,
      clean,
      ref
    )

    // Assert
    const files = await fs.promises.readdir(repositoryPath)
    expect(files.sort()).toEqual(['.git', 'my-file'])
    expect(git.branchDelete).toHaveBeenCalledTimes(1)
    expect(git.branchDelete).toHaveBeenCalledWith(
      true,
      'origin/remote-branch-1'
    )
  })

  const removesDescendantRemoteBranches = 'removes descendant remote branch'
  it(removesDescendantRemoteBranches, async () => {
    // Arrange
    await setup(removesDescendantRemoteBranches)
    await fs.promises.writeFile(path.join(repositoryPath, 'my-file'), '')
    const mockBranchList = git.branchList as jest.Mock<any, any>
    mockBranchList.mockImplementation(async (remote: boolean) => {
      return remote
        ? ['origin/remote-branch-1/conflict', 'origin/remote-branch-2']
        : []
    })
    ref = 'remote-branch-1'

    // Act
    await gitDirectoryHelper.prepareExistingDirectory(
      git,
      repositoryPath,
      repositoryUrl,
      clean,
      ref
    )

    // Assert
    const files = await fs.promises.readdir(repositoryPath)
    expect(files.sort()).toEqual(['.git', 'my-file'])
    expect(git.branchDelete).toHaveBeenCalledTimes(1)
    expect(git.branchDelete).toHaveBeenCalledWith(
      true,
      'origin/remote-branch-1/conflict'
    )
  })
})

async function setup(testName: string): Promise<void> {
  testName = testName.replace(/[^a-zA-Z0-9_]+/g, '-')

  // Repository directory
  repositoryPath = path.join(testWorkspace, testName)
  await fs.promises.mkdir(path.join(repositoryPath, '.git'), {recursive: true})

  // Repository URL
  repositoryUrl = 'https://github.com/my-org/my-repo'

  // Clean
  clean = true

  // Ref
  ref = ''

  // Git command manager
  git = {
    branchDelete: jest.fn(),
    branchExists: jest.fn(),
    branchList: jest.fn(async () => {
      return []
    }),
    disableSparseCheckout: jest.fn(),
    sparseCheckout: jest.fn(),
    sparseCheckoutNonConeMode: jest.fn(),
    checkout: jest.fn(),
    checkoutDetach: jest.fn(),
    config: jest.fn(),
    configExists: jest.fn(),
    fetch: jest.fn(),
    getDefaultBranch: jest.fn(),
    getSubmoduleConfigPaths: jest.fn(async () => []),
    getWorkingDirectory: jest.fn(() => repositoryPath),
    init: jest.fn(),
    isDetached: jest.fn(),
    lfsFetch: jest.fn(),
    lfsInstall: jest.fn(),
    log1: jest.fn(),
    remoteAdd: jest.fn(),
    removeEnvironmentVariable: jest.fn(),
    revParse: jest.fn(),
    setEnvironmentVariable: jest.fn(),
    shaExists: jest.fn(),
    submoduleForeach: jest.fn(),
    submoduleSync: jest.fn(),
    submoduleUpdate: jest.fn(),
    submoduleStatus: jest.fn(async () => {
      return true
    }),
    tagExists: jest.fn(),
    tryClean: jest.fn(async () => {
      return true
    }),
    tryConfigUnset: jest.fn(),
    tryConfigUnsetValue: jest.fn(),
    tryDisableAutomaticGarbageCollection: jest.fn(),
    tryGetFetchUrl: jest.fn(async () => {
      // Sanity check - this function shouldn't be called when the .git directory doesn't exist
      await fs.promises.stat(path.join(repositoryPath, '.git'))
      return repositoryUrl
    }),
    tryGetConfigValues: jest.fn(),
    tryGetConfigKeys: jest.fn(),
    tryReset: jest.fn(async () => {
      return true
    }),
    version: jest.fn()
  }
}


================================================
FILE: __test__/git-version.test.ts
================================================
import {GitVersion} from '../src/git-version'
import {MinimumGitSparseCheckoutVersion} from '../src/git-command-manager'

describe('git-version tests', () => {
  it('basics', async () => {
    let version = new GitVersion('')
    expect(version.isValid()).toBeFalsy()

    version = new GitVersion('asdf')
    expect(version.isValid()).toBeFalsy()

    version = new GitVersion('1.2')
    expect(version.isValid()).toBeTruthy()
    expect(version.toString()).toBe('1.2')

    version = new GitVersion('1.2.3')
    expect(version.isValid()).toBeTruthy()
    expect(version.toString()).toBe('1.2.3')
  })

  it('check minimum', async () => {
    let version = new GitVersion('4.5')
    expect(version.checkMinimum(new GitVersion('3.6'))).toBeTruthy()
    expect(version.checkMinimum(new GitVersion('3.6.7'))).toBeTruthy()
    expect(version.checkMinimum(new GitVersion('4.4'))).toBeTruthy()
    expect(version.checkMinimum(new GitVersion('4.5'))).toBeTruthy()
    expect(version.checkMinimum(new GitVersion('4.5.0'))).toBeTruthy()
    expect(version.checkMinimum(new GitVersion('4.6'))).toBeFalsy()
    expect(version.checkMinimum(new GitVersion('4.6.0'))).toBeFalsy()
    expect(version.checkMinimum(new GitVersion('5.1'))).toBeFalsy()
    expect(version.checkMinimum(new GitVersion('5.1.2'))).toBeFalsy()

    version = new GitVersion('4.5.6')
    expect(version.checkMinimum(new GitVersion('3.6'))).toBeTruthy()
    expect(version.checkMinimum(new GitVersion('3.6.7'))).toBeTruthy()
    expect(version.checkMinimum(new GitVersion('4.4'))).toBeTruthy()
    expect(version.checkMinimum(new GitVersion('4.5'))).toBeTruthy()
    expect(version.checkMinimum(new GitVersion('4.5.5'))).toBeTruthy()
    expect(version.checkMinimum(new GitVersion('4.5.6'))).toBeTruthy()
    expect(version.checkMinimum(new GitVersion('4.5.7'))).toBeFalsy()
    expect(version.checkMinimum(new GitVersion('4.6'))).toBeFalsy()
    expect(version.checkMinimum(new GitVersion('4.6.0'))).toBeFalsy()
    expect(version.checkMinimum(new GitVersion('5.1'))).toBeFalsy()
    expect(version.checkMinimum(new GitVersion('5.1.2'))).toBeFalsy()
  })

  it('sparse checkout', async () => {
    const minSparseVer = MinimumGitSparseCheckoutVersion
    expect(new GitVersion('1.0').checkMinimum(minSparseVer)).toBeFalsy()
    expect(new GitVersion('1.99').checkMinimum(minSparseVer)).toBeFalsy()
    expect(new GitVersion('2.0').checkMinimum(minSparseVer)).toBeFalsy()
    expect(new GitVersion('2.24').checkMinimum(minSparseVer)).toBeFalsy()
    expect(new GitVersion('2.24.0').checkMinimum(minSparseVer)).toBeFalsy()
    expect(new GitVersion('2.24.9').checkMinimum(minSparseVer)).toBeFalsy()
    expect(new GitVersion('2.25').checkMinimum(minSparseVer)).toBeFalsy()
    expect(new GitVersion('2.25.0').checkMinimum(minSparseVer)).toBeFalsy()
    expect(new GitVersion('2.25.1').checkMinimum(minSparseVer)).toBeFalsy()
    expect(new GitVersion('2.25.9').checkMinimum(minSparseVer)).toBeFalsy()
    expect(new GitVersion('2.26').checkMinimum(minSparseVer)).toBeFalsy()
    expect(new GitVersion('2.26.0').checkMinimum(minSparseVer)).toBeFalsy()
    expect(new GitVersion('2.26.1').checkMinimum(minSparseVer)).toBeFalsy()
    expect(new GitVersion('2.26.9').checkMinimum(minSparseVer)).toBeFalsy()
    expect(new GitVersion('2.27').checkMinimum(minSparseVer)).toBeFalsy()
    expect(new GitVersion('2.27.0').checkMinimum(minSparseVer)).toBeFalsy()
    expect(new GitVersion('2.27.1').checkMinimum(minSparseVer)).toBeFalsy()
    expect(new GitVersion('2.27.9').checkMinimum(minSparseVer)).toBeFalsy()
    //                             /---------------------------------------
    //         ^^^ before         /         after vvv
    // --------------------------/
    expect(new GitVersion('2.28').checkMinimum(minSparseVer)).toBeTruthy()
    expect(new GitVersion('2.28.0').checkMinimum(minSparseVer)).toBeTruthy()
    expect(new GitVersion('2.28.1').checkMinimum(minSparseVer)).toBeTruthy()
    expect(new GitVersion('2.28.9').checkMinimum(minSparseVer)).toBeTruthy()
    expect(new GitVersion('2.29').checkMinimum(minSparseVer)).toBeTruthy()
    expect(new GitVersion('2.29.0').checkMinimum(minSparseVer)).toBeTruthy()
    expect(new GitVersion('2.29.1').checkMinimum(minSparseVer)).toBeTruthy()
    expect(new GitVersion('2.29.9').checkMinimum(minSparseVer)).toBeTruthy()
    expect(new GitVersion('2.99').checkMinimum(minSparseVer)).toBeTruthy()
    expect(new GitVersion('3.0').checkMinimum(minSparseVer)).toBeTruthy()
    expect(new GitVersion('3.99').checkMinimum(minSparseVer)).toBeTruthy()
    expect(new GitVersion('4.0').checkMinimum(minSparseVer)).toBeTruthy()
    expect(new GitVersion('4.99').checkMinimum(minSparseVer)).toBeTruthy()
    expect(new GitVersion('5.0').checkMinimum(minSparseVer)).toBeTruthy()
    expect(new GitVersion('5.99').checkMinimum(minSparseVer)).toBeTruthy()
  })
})


================================================
FILE: __test__/input-helper.test.ts
================================================
import * as core from '@actions/core'
import * as fsHelper from '../lib/fs-helper'
import * as github from '@actions/github'
import * as inputHelper from '../lib/input-helper'
import * as path from 'path'
import * as workflowContextHelper from '../lib/workflow-context-helper'
import {IGitSourceSettings} from '../lib/git-source-settings'

const originalGitHubWorkspace = process.env['GITHUB_WORKSPACE']
const gitHubWorkspace = path.resolve('/checkout-tests/workspace')

// Inputs for mock @actions/core
let inputs = {} as any

// Shallow clone original @actions/github context
let originalContext = {...github.context}

describe('input-helper tests', () => {
  beforeAll(() => {
    // Mock getInput
    jest.spyOn(core, 'getInput').mockImplementation((name: string) => {
      return inputs[name]
    })

    // Mock error/warning/info/debug
    jest.spyOn(core, 'error').mockImplementation(jest.fn())
    jest.spyOn(core, 'warning').mockImplementation(jest.fn())
    jest.spyOn(core, 'info').mockImplementation(jest.fn())
    jest.spyOn(core, 'debug').mockImplementation(jest.fn())

    // Mock github context
    jest.spyOn(github.context, 'repo', 'get').mockImplementation(() => {
      return {
        owner: 'some-owner',
        repo: 'some-repo'
      }
    })
    github.context.ref = 'refs/heads/some-ref'
    github.context.sha = '1234567890123456789012345678901234567890'

    // Mock ./fs-helper directoryExistsSync()
    jest
      .spyOn(fsHelper, 'directoryExistsSync')
      .mockImplementation((path: string) => path == gitHubWorkspace)

    // Mock ./workflowContextHelper getOrganizationId()
    jest
      .spyOn(workflowContextHelper, 'getOrganizationId')
      .mockImplementation(() => Promise.resolve(123456))

    // GitHub workspace
    process.env['GITHUB_WORKSPACE'] = gitHubWorkspace
  })

  beforeEach(() => {
    // Reset inputs
    inputs = {}
  })

  afterAll(() => {
    // Restore GitHub workspace
    delete process.env['GITHUB_WORKSPACE']
    if (originalGitHubWorkspace) {
      process.env['GITHUB_WORKSPACE'] = originalGitHubWorkspace
    }

    // Restore @actions/github context
    github.context.ref = originalContext.ref
    github.context.sha = originalContext.sha

    // Restore
    jest.restoreAllMocks()
  })

  it('sets defaults', async () => {
    const settings: IGitSourceSettings = await inputHelper.getInputs()
    expect(settings).toBeTruthy()
    expect(settings.authToken).toBeFalsy()
    expect(settings.clean).toBe(true)
    expect(settings.commit).toBeTruthy()
    expect(settings.commit).toBe('1234567890123456789012345678901234567890')
    expect(settings.filter).toBe(undefined)
    expect(settings.sparseCheckout).toBe(undefined)
    expect(settings.sparseCheckoutConeMode).toBe(true)
    expect(settings.fetchDepth).toBe(1)
    expect(settings.fetchTags).toBe(false)
    expect(settings.showProgress).toBe(true)
    expect(settings.lfs).toBe(false)
    expect(settings.ref).toBe('refs/heads/some-ref')
    expect(settings.repositoryName).toBe('some-repo')
    expect(settings.repositoryOwner).toBe('some-owner')
    expect(settings.repositoryPath).toBe(gitHubWorkspace)
    expect(settings.setSafeDirectory).toBe(true)
  })

  it('qualifies ref', async () => {
    let originalRef = github.context.ref
    try {
      github.context.ref = 'some-unqualified-ref'
      const settings: IGitSourceSettings = await inputHelper.getInputs()
      expect(settings).toBeTruthy()
      expect(settings.commit).toBe('1234567890123456789012345678901234567890')
      expect(settings.ref).toBe('refs/heads/some-unqualified-ref')
    } finally {
      github.context.ref = originalRef
    }
  })

  it('requires qualified repo', async () => {
    inputs.repository = 'some-unqualified-repo'
    try {
      await inputHelper.getInputs()
      throw 'should not reach here'
    } catch (err) {
      expect(`(${(err as any).message}`).toMatch(
        "Invalid repository 'some-unqualified-repo'"
      )
    }
  })

  it('roots path', async () => {
    inputs.path = 'some-directory/some-subdirectory'
    const settings: IGitSourceSettings = await inputHelper.getInputs()
    expect(settings.repositoryPath).toBe(
      path.join(gitHubWorkspace, 'some-directory', 'some-subdirectory')
    )
  })

  it('sets ref to empty when explicit sha', async () => {
    inputs.ref = '1111111111222222222233333333334444444444'
    const settings: IGitSourceSettings = await inputHelper.getInputs()
    expect(settings.ref).toBeFalsy()
    expect(settings.commit).toBe('1111111111222222222233333333334444444444')
  })

  it('sets sha to empty when explicit ref', async () => {
    inputs.ref = 'refs/heads/some-other-ref'
    const settings: IGitSourceSettings = await inputHelper.getInputs()
    expect(settings.ref).toBe('refs/heads/some-other-ref')
    expect(settings.commit).toBeFalsy()
  })

  it('sets workflow organization ID', async () => {
    const settings: IGitSourceSettings = await inputHelper.getInputs()
    expect(settings.workflowOrganizationId).toBe(123456)
  })
})


================================================
FILE: __test__/modify-work-tree.sh
================================================
#!/bin/bash

if [ ! -f "./basic/basic-file.txt" ]; then
    echo "Expected basic file does not exist"
    exit 1
fi

echo hello >> ./basic/basic-file.txt
echo hello >> ./basic/new-file.txt
git -C ./basic status

================================================
FILE: __test__/override-git-version.cmd
================================================

mkdir override-git-version
cd override-git-version
echo @echo override git version 1.2.3 > git.cmd
echo "%CD%" >> $GITHUB_PATH
cd ..


================================================
FILE: __test__/override-git-version.sh
================================================
#!/bin/sh

mkdir override-git-version
cd override-git-version
echo "#!/bin/sh" > git
echo "echo override git version 1.2.3" >> git
chmod +x git
echo "$(pwd)" >> $GITHUB_PATH
cd ..


================================================
FILE: __test__/ref-helper.test.ts
================================================
import * as assert from 'assert'
import * as refHelper from '../lib/ref-helper'
import {IGitCommandManager} from '../lib/git-command-manager'

const commit = '1234567890123456789012345678901234567890'
let git: IGitCommandManager

describe('ref-helper tests', () => {
  beforeEach(() => {
    git = {} as unknown as IGitCommandManager
  })

  it('getCheckoutInfo requires git', async () => {
    const git = null as unknown as IGitCommandManager
    try {
      await refHelper.getCheckoutInfo(git, 'refs/heads/my/branch', commit)
      throw new Error('Should not reach here')
    } catch (err) {
      expect((err as any)?.message).toBe('Arg git cannot be empty')
    }
  })

  it('getCheckoutInfo requires ref or commit', async () => {
    try {
      await refHelper.getCheckoutInfo(git, '', '')
      throw new Error('Should not reach here')
    } catch (err) {
      expect((err as any)?.message).toBe(
        'Args ref and commit cannot both be empty'
      )
    }
  })

  it('getCheckoutInfo sha only', async () => {
    const checkoutInfo = await refHelper.getCheckoutInfo(git, '', commit)
    expect(checkoutInfo.ref).toBe(commit)
    expect(checkoutInfo.startPoint).toBeFalsy()
  })

  it('getCheckoutInfo refs/heads/', async () => {
    const checkoutInfo = await refHelper.getCheckoutInfo(
      git,
      'refs/heads/my/branch',
      commit
    )
    expect(checkoutInfo.ref).toBe('my/branch')
    expect(checkoutInfo.startPoint).toBe('refs/remotes/origin/my/branch')
  })

  it('getCheckoutInfo refs/pull/', async () => {
    const checkoutInfo = await refHelper.getCheckoutInfo(
      git,
      'refs/pull/123/merge',
      commit
    )
    expect(checkoutInfo.ref).toBe('refs/remotes/pull/123/merge')
    expect(checkoutInfo.startPoint).toBeFalsy()
  })

  it('getCheckoutInfo refs/tags/', async () => {
    const checkoutInfo = await refHelper.getCheckoutInfo(
      git,
      'refs/tags/my-tag',
      commit
    )
    expect(checkoutInfo.ref).toBe('refs/tags/my-tag')
    expect(checkoutInfo.startPoint).toBeFalsy()
  })

  it('getCheckoutInfo refs/', async () => {
    const checkoutInfo = await refHelper.getCheckoutInfo(
      git,
      'refs/gh/queue/main/pr-123',
      commit
    )
    expect(checkoutInfo.ref).toBe(commit)
    expect(checkoutInfo.startPoint).toBeFalsy()
  })

  it('getCheckoutInfo refs/ without commit', async () => {
    const checkoutInfo = await refHelper.getCheckoutInfo(
      git,
      'refs/non-standard-ref',
      ''
    )
    expect(checkoutInfo.ref).toBe('refs/non-standard-ref')
    expect(checkoutInfo.startPoint).toBeFalsy()
  })

  it('getCheckoutInfo unqualified branch only', async () => {
    git.branchExists = jest.fn(async (remote: boolean, pattern: string) => {
      return true
    })

    const checkoutInfo = await refHelper.getCheckoutInfo(git, 'my/branch', '')

    expect(checkoutInfo.ref).toBe('my/branch')
    expect(checkoutInfo.startPoint).toBe('refs/remotes/origin/my/branch')
  })

  it('getCheckoutInfo unqualified tag only', async () => {
    git.branchExists = jest.fn(async (remote: boolean, pattern: string) => {
      return false
    })
    git.tagExists = jest.fn(async (pattern: string) => {
      return true
    })

    const checkoutInfo = await refHelper.getCheckoutInfo(git, 'my-tag', '')

    expect(checkoutInfo.ref).toBe('refs/tags/my-tag')
    expect(checkoutInfo.startPoint).toBeFalsy()
  })

  it('getCheckoutInfo unqualified ref only, not a branch or tag', async () => {
    git.branchExists = jest.fn(async (remote: boolean, pattern: string) => {
      return false
    })
    git.tagExists = jest.fn(async (pattern: string) => {
      return false
    })

    try {
      await refHelper.getCheckoutInfo(git, 'my-ref', '')
      throw new Error('Should not reach here')
    } catch (err) {
      expect((err as any)?.message).toBe(
        "A branch or tag with the name 'my-ref' could not be found"
      )
    }
  })

  it('getRefSpec requires ref or commit', async () => {
    assert.throws(
      () => refHelper.getRefSpec('', ''),
      /Args ref and commit cannot both be empty/
    )
  })

  it('getRefSpec sha + refs/heads/', async () => {
    const refSpec = refHelper.getRefSpec('refs/heads/my/branch', commit)
    expect(refSpec.length).toBe(1)
    expect(refSpec[0]).toBe(`+${commit}:refs/remotes/origin/my/branch`)
  })

  it('getRefSpec sha + refs/pull/', async () => {
    const refSpec = refHelper.getRefSpec('refs/pull/123/merge', commit)
    expect(refSpec.length).toBe(1)
    expect(refSpec[0]).toBe(`+${commit}:refs/remotes/pull/123/merge`)
  })

  it('getRefSpec sha + refs/tags/', async () => {
    const refSpec = refHelper.getRefSpec('refs/tags/my-tag', commit)
    expect(refSpec.length).toBe(1)
    expect(refSpec[0]).toBe(`+refs/tags/my-tag:refs/tags/my-tag`)
  })

  it('getRefSpec sha + refs/tags/ with fetchTags', async () => {
    // When fetchTags is true, only include tags wildcard (specific tag is redundant)
    const refSpec = refHelper.getRefSpec('refs/tags/my-tag', commit, true)
    expect(refSpec.length).toBe(1)
    expect(refSpec[0]).toBe('+refs/tags/*:refs/tags/*')
  })

  it('getRefSpec sha + refs/heads/ with fetchTags', async () => {
    // When fetchTags is true, include both the branch refspec and tags wildcard
    const refSpec = refHelper.getRefSpec('refs/heads/my/branch', commit, true)
    expect(refSpec.length).toBe(2)
    expect(refSpec[0]).toBe('+refs/tags/*:refs/tags/*')
    expect(refSpec[1]).toBe(`+${commit}:refs/remotes/origin/my/branch`)
  })

  it('getRefSpec sha only', async () => {
    const refSpec = refHelper.getRefSpec('', commit)
    expect(refSpec.length).toBe(1)
    expect(refSpec[0]).toBe(commit)
  })

  it('getRefSpec unqualified ref only', async () => {
    const refSpec = refHelper.getRefSpec('my-ref', '')
    expect(refSpec.length).toBe(2)
    expect(refSpec[0]).toBe('+refs/heads/my-ref*:refs/remotes/origin/my-ref*')
    expect(refSpec[1]).toBe('+refs/tags/my-ref*:refs/tags/my-ref*')
  })

  it('getRefSpec unqualified ref only with fetchTags', async () => {
    // When fetchTags is true, skip specific tag pattern since wildcard covers all
    const refSpec = refHelper.getRefSpec('my-ref', '', true)
    expect(refSpec.length).toBe(2)
    expect(refSpec[0]).toBe('+refs/tags/*:refs/tags/*')
    expect(refSpec[1]).toBe('+refs/heads/my-ref*:refs/remotes/origin/my-ref*')
  })

  it('getRefSpec refs/heads/ only', async () => {
    const refSpec = refHelper.getRefSpec('refs/heads/my/branch', '')
    expect(refSpec.length).toBe(1)
    expect(refSpec[0]).toBe(
      '+refs/heads/my/branch:refs/remotes/origin/my/branch'
    )
  })

  it('getRefSpec refs/pull/ only', async () => {
    const refSpec = refHelper.getRefSpec('refs/pull/123/merge', '')
    expect(refSpec.length).toBe(1)
    expect(refSpec[0]).toBe('+refs/pull/123/merge:refs/remotes/pull/123/merge')
  })

  it('getRefSpec refs/tags/ only', async () => {
    const refSpec = refHelper.getRefSpec('refs/tags/my-tag', '')
    expect(refSpec.length).toBe(1)
    expect(refSpec[0]).toBe('+refs/tags/my-tag:refs/tags/my-tag')
  })

  it('getRefSpec refs/tags/ only with fetchTags', async () => {
    // When fetchTags is true, only include tags wildcard (specific tag is redundant)
    const refSpec = refHelper.getRefSpec('refs/tags/my-tag', '', true)
    expect(refSpec.length).toBe(1)
    expect(refSpec[0]).toBe('+refs/tags/*:refs/tags/*')
  })

  it('getRefSpec refs/heads/ only with fetchTags', async () => {
    // When fetchTags is true, include both the branch refspec and tags wildcard
    const refSpec = refHelper.getRefSpec('refs/heads/my/branch', '', true)
    expect(refSpec.length).toBe(2)
    expect(refSpec[0]).toBe('+refs/tags/*:refs/tags/*')
    expect(refSpec[1]).toBe(
      '+refs/heads/my/branch:refs/remotes/origin/my/branch'
    )
  })
})


================================================
FILE: __test__/retry-helper.test.ts
================================================
import * as core from '@actions/core'
import {RetryHelper} from '../lib/retry-helper'

let info: string[]
let retryHelper: any

describe('retry-helper tests', () => {
  beforeAll(() => {
    // Mock @actions/core info()
    jest.spyOn(core, 'info').mockImplementation((message: string) => {
      info.push(message)
    })

    retryHelper = new RetryHelper(3, 0, 0)
  })

  beforeEach(() => {
    // Reset info
    info = []
  })

  afterAll(() => {
    // Restore
    jest.restoreAllMocks()
  })

  it('first attempt succeeds', async () => {
    const actual = await retryHelper.execute(async () => {
      return 'some result'
    })
    expect(actual).toBe('some result')
    expect(info).toHaveLength(0)
  })

  it('second attempt succeeds', async () => {
    let attempts = 0
    const actual = await retryHelper.execute(() => {
      if (++attempts == 1) {
        throw new Error('some error')
      }

      return Promise.resolve('some result')
    })
    expect(attempts).toBe(2)
    expect(actual).toBe('some result')
    expect(info).toHaveLength(2)
    expect(info[0]).toBe('some error')
    expect(info[1]).toMatch(/Waiting .+ seconds before trying again/)
  })

  it('third attempt succeeds', async () => {
    let attempts = 0
    const actual = await retryHelper.execute(() => {
      if (++attempts < 3) {
        throw new Error(`some error ${attempts}`)
      }

      return Promise.resolve('some result')
    })
    expect(attempts).toBe(3)
    expect(actual).toBe('some result')
    expect(info).toHaveLength(4)
    expect(info[0]).toBe('some error 1')
    expect(info[1]).toMatch(/Waiting .+ seconds before trying again/)
    expect(info[2]).toBe('some error 2')
    expect(info[3]).toMatch(/Waiting .+ seconds before trying again/)
  })

  it('all attempts fail succeeds', async () => {
    let attempts = 0
    let error: Error = null as unknown as Error
    try {
      await retryHelper.execute(() => {
        throw new Error(`some error ${++attempts}`)
      })
    } catch (err) {
      error = err as Error
    }
    expect(error.message).toBe('some error 3')
    expect(attempts).toBe(3)
    expect(info).toHaveLength(4)
    expect(info[0]).toBe('some error 1')
    expect(info[1]).toMatch(/Waiting .+ seconds before trying again/)
    expect(info[2]).toBe('some error 2')
    expect(info[3]).toMatch(/Waiting .+ seconds before trying again/)
  })
})


================================================
FILE: __test__/url-helper.test.ts
================================================
import * as urlHelper from '../src/url-helper'

describe('getServerUrl tests', () => {
  it('basics', async () => {
    // Note that URL::toString will append a trailing / when passed just a domain name ...
    expect(urlHelper.getServerUrl().toString()).toBe('https://github.com/')
    expect(urlHelper.getServerUrl(' ').toString()).toBe('https://github.com/')
    expect(urlHelper.getServerUrl('   ').toString()).toBe('https://github.com/')
    expect(urlHelper.getServerUrl('http://contoso.com').toString()).toBe(
      'http://contoso.com/'
    )
    expect(urlHelper.getServerUrl('https://contoso.com').toString()).toBe(
      'https://contoso.com/'
    )
    expect(urlHelper.getServerUrl('https://contoso.com/').toString()).toBe(
      'https://contoso.com/'
    )

    // ... but can't make that same assumption when passed an URL that includes some deeper path.
    expect(urlHelper.getServerUrl('https://contoso.com/a/b').toString()).toBe(
      'https://contoso.com/a/b'
    )
  })
})

describe('isGhes tests', () => {
  const pristineEnv = process.env

  beforeEach(() => {
    jest.resetModules()
    process.env = {...pristineEnv}
  })

  afterAll(() => {
    process.env = pristineEnv
  })

  it('basics', async () => {
    delete process.env['GITHUB_SERVER_URL']
    expect(urlHelper.isGhes()).toBeFalsy()
    expect(urlHelper.isGhes('https://github.com')).toBeFalsy()
    expect(urlHelper.isGhes('https://contoso.ghe.com')).toBeFalsy()
    expect(urlHelper.isGhes('https://test.github.localhost')).toBeFalsy()
    expect(urlHelper.isGhes('https://src.onpremise.fabrikam.com')).toBeTruthy()
  })

  it('returns false when the GITHUB_SERVER_URL environment variable is not defined', async () => {
    delete process.env['GITHUB_SERVER_URL']
    expect(urlHelper.isGhes()).toBeFalsy()
  })

  it('returns false when the GITHUB_SERVER_URL environment variable is set to github.com', async () => {
    process.env['GITHUB_SERVER_URL'] = 'https://github.com'
    expect(urlHelper.isGhes()).toBeFalsy()
  })

  it('returns false when the GITHUB_SERVER_URL environment variable is set to a GitHub Enterprise Cloud-style URL', async () => {
    process.env['GITHUB_SERVER_URL'] = 'https://contoso.ghe.com'
    expect(urlHelper.isGhes()).toBeFalsy()
  })

  it('returns false when the GITHUB_SERVER_URL environment variable has a .localhost suffix', async () => {
    process.env['GITHUB_SERVER_URL'] = 'https://mock-github.localhost'
    expect(urlHelper.isGhes()).toBeFalsy()
  })

  it('returns true when the GITHUB_SERVER_URL environment variable is set to some other URL', async () => {
    process.env['GITHUB_SERVER_URL'] = 'https://src.onpremise.fabrikam.com'
    expect(urlHelper.isGhes()).toBeTruthy()
  })
})

describe('getServerApiUrl tests', () => {
  it('basics', async () => {
    expect(urlHelper.getServerApiUrl()).toBe('https://api.github.com')
    expect(urlHelper.getServerApiUrl('https://github.com')).toBe(
      'https://api.github.com'
    )
    expect(urlHelper.getServerApiUrl('https://GitHub.com')).toBe(
      'https://api.github.com'
    )
    expect(urlHelper.getServerApiUrl('https://contoso.ghe.com')).toBe(
      'https://api.contoso.ghe.com'
    )
    expect(urlHelper.getServerApiUrl('https://fabrikam.GHE.COM')).toBe(
      'https://api.fabrikam.ghe.com'
    )
    expect(
      urlHelper.getServerApiUrl('https://src.onpremise.fabrikam.com')
    ).toBe('https://src.onpremise.fabrikam.com/api/v3')
  })
})


================================================
FILE: __test__/verify-basic.sh
================================================
#!/bin/sh

if [ ! -f "./basic/basic-file.txt" ]; then
    echo "Expected basic file does not exist"
    exit 1
fi

if [ "$1" = "--archive" ]; then
  # Verify no .git folder
  if [ -d "./basic/.git" ]; then
    echo "Did not expect ./basic/.git folder to exist"
    exit 1
  fi
else
  # Verify .git folder
  if [ ! -d "./basic/.git" ]; then
    echo "Expected ./basic/.git folder to exist"
    exit 1
  fi

  # Verify that sparse-checkout is disabled.
  SPARSE_CHECKOUT_ENABLED=$(git -C ./basic config --local --get-all core.sparseCheckout)
  if [ "$SPARSE_CHECKOUT_ENABLED" != "" ]; then
    echo "Expected sparse-checkout to be disabled (discovered: $SPARSE_CHECKOUT_ENABLED)"
    exit 1
  fi

  # Verify git configuration shows worktreeConfig is effectively disabled
  WORKTREE_CONFIG_ENABLED=$(git -C ./basic config --local --get-all extensions.worktreeConfig)
  if [[ "$WORKTREE_CONFIG_ENABLED" != "" ]]; then
    echo "Expected extensions.worktreeConfig (boolean) to be disabled in git config.  This could be an artifact of sparse checkout functionality."
    exit 1
  fi

  # Verify auth token
  cd basic
  git fetch --no-tags --depth=1 origin +refs/heads/main:refs/remotes/origin/main
fi


================================================
FILE: __test__/verify-clean.sh
================================================
#!/bin/bash

if [[ "$(git -C ./basic status --porcelain)" != "" ]]; then
    echo ----------------------------------------
    echo git status
    echo ----------------------------------------
    git status
    echo ----------------------------------------
    echo git diff
    echo ----------------------------------------
    git diff
    exit 1
fi


================================================
FILE: __test__/verify-fetch-filter.sh
================================================
#!/bin/bash

# Verify .git folder
if [ ! -d "./fetch-filter/.git" ]; then
  echo "Expected ./fetch-filter/.git folder to exist"
  exit 1
Download .txt
gitextract_klaxvgmx/

├── .eslintignore
├── .eslintrc.json
├── .gitattributes
├── .github/
│   ├── dependabot.yml
│   └── workflows/
│       ├── check-dist.yml
│       ├── codeql-analysis.yml
│       ├── licensed.yml
│       ├── publish-immutable-actions.yml
│       ├── test.yml
│       ├── update-main-version.yml
│       └── update-test-ubuntu-git.yml
├── .gitignore
├── .licensed.yml
├── .licenses/
│   └── npm/
│       ├── @actions/
│       │   ├── core.dep.yml
│       │   ├── exec.dep.yml
│       │   ├── github.dep.yml
│       │   ├── http-client.dep.yml
│       │   ├── io.dep.yml
│       │   └── tool-cache.dep.yml
│       ├── @fastify/
│       │   └── busboy.dep.yml
│       ├── @octokit/
│       │   ├── auth-token.dep.yml
│       │   ├── core.dep.yml
│       │   ├── endpoint.dep.yml
│       │   ├── graphql.dep.yml
│       │   ├── openapi-types-20.0.0.dep.yml
│       │   ├── openapi-types-22.1.0.dep.yml
│       │   ├── plugin-paginate-rest.dep.yml
│       │   ├── plugin-rest-endpoint-methods.dep.yml
│       │   ├── request-error.dep.yml
│       │   ├── request.dep.yml
│       │   ├── types-12.6.0.dep.yml
│       │   └── types-13.4.1.dep.yml
│       ├── before-after-hook.dep.yml
│       ├── deprecation.dep.yml
│       ├── once.dep.yml
│       ├── semver.dep.yml
│       ├── tunnel.dep.yml
│       ├── undici.dep.yml
│       ├── universal-user-agent.dep.yml
│       ├── uuid-3.4.0.dep.yml
│       ├── uuid-8.3.2.dep.yml
│       ├── uuid-9.0.1.dep.yml
│       └── wrappy.dep.yml
├── .prettierignore
├── .prettierrc.json
├── CHANGELOG.md
├── CODEOWNERS
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── __test__/
│   ├── git-auth-helper.test.ts
│   ├── git-command-manager.test.ts
│   ├── git-directory-helper.test.ts
│   ├── git-version.test.ts
│   ├── input-helper.test.ts
│   ├── modify-work-tree.sh
│   ├── override-git-version.cmd
│   ├── override-git-version.sh
│   ├── ref-helper.test.ts
│   ├── retry-helper.test.ts
│   ├── url-helper.test.ts
│   ├── verify-basic.sh
│   ├── verify-clean.sh
│   ├── verify-fetch-filter.sh
│   ├── verify-fetch-tags.sh
│   ├── verify-lfs.sh
│   ├── verify-no-unstaged-changes.sh
│   ├── verify-side-by-side.sh
│   ├── verify-sparse-checkout-non-cone-mode.sh
│   ├── verify-sparse-checkout.sh
│   ├── verify-submodules-false.sh
│   ├── verify-submodules-recursive.sh
│   ├── verify-submodules-true.sh
│   └── verify-worktree.sh
├── action.yml
├── adrs/
│   └── 0153-checkout-v2.md
├── dist/
│   ├── index.js
│   └── problem-matcher.json
├── images/
│   ├── test-ubuntu-git.Dockerfile
│   └── test-ubuntu-git.md
├── jest.config.js
├── package.json
├── src/
│   ├── fs-helper.ts
│   ├── git-auth-helper.ts
│   ├── git-command-manager.ts
│   ├── git-directory-helper.ts
│   ├── git-source-provider.ts
│   ├── git-source-settings.ts
│   ├── git-version.ts
│   ├── github-api-helper.ts
│   ├── input-helper.ts
│   ├── main.ts
│   ├── misc/
│   │   ├── generate-docs.ts
│   │   ├── licensed-check.sh
│   │   ├── licensed-download.sh
│   │   └── licensed-generate.sh
│   ├── ref-helper.ts
│   ├── regexp-helper.ts
│   ├── retry-helper.ts
│   ├── state-helper.ts
│   ├── url-helper.ts
│   └── workflow-context-helper.ts
└── tsconfig.json
Download .txt
SYMBOL INDEX (1472 symbols across 20 files)

FILE: __test__/git-auth-helper.test.ts
  function testAuthHeader (line 71) | async function testAuthHeader(
  function setup (line 979) | async function setup(testName: string): Promise<void> {
  function getActualSshKeyPath (line 1180) | async function getActualSshKeyPath(): Promise<string> {
  function getActualSshKnownHostsPath (line 1194) | async function getActualSshKnownHostsPath(): Promise<string> {

FILE: __test__/git-directory-helper.test.ts
  function setup (line 442) | async function setup(testName: string): Promise<void> {

FILE: dist/index.js
  function directoryExistsSync (line 37) | function directoryExistsSync(path, required) {
  function existsSync (line 63) | function existsSync(path) {
  function fileExistsSync (line 79) | function fileExistsSync(path) {
  function adopt (line 132) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 134) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 135) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 136) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function createAuthHelper (line 155) | function createAuthHelper(git, settings) {
  class GitAuthHelper (line 158) | class GitAuthHelper {
    method constructor (line 159) | constructor(gitCommandManager, gitSourceSettings) {
    method configureAuth (line 182) | configureAuth() {
    method configureTempGlobalConfig (line 191) | configureTempGlobalConfig() {
    method configureGlobalAuth (line 230) | configureGlobalAuth() {
    method configureSubmoduleAuth (line 255) | configureSubmoduleAuth() {
    method removeAuth (line 300) | removeAuth() {
    method removeGlobalConfig (line 306) | removeGlobalConfig() {
    method configureSsh (line 320) | configureSsh() {
    method configureToken (line 381) | configureToken(globalConfig) {
    method getCredentialsConfigPath (line 440) | getCredentialsConfigPath() {
    method removeSsh (line 456) | removeSsh() {
    method removeToken (line 493) | removeToken() {
    method removeGitConfig (line 537) | removeGitConfig(configKey) {
    method removeSubmoduleGitConfig (line 550) | removeSubmoduleGitConfig(configKey) {
    method removeIncludeIfCredentials (line 563) | removeIncludeIfCredentials(configPath) {
    method testCredentialsConfigPath (line 602) | testCredentialsConfigPath(path) {
  function adopt (line 639) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 641) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 642) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 643) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function createCommandManager (line 664) | function createCommandManager(workingDirectory, lfs, doSparseCheckout) {
  class GitCommandManager (line 669) | class GitCommandManager {
    method constructor (line 671) | constructor() {
    method branchDelete (line 682) | branchDelete(remote, branch) {
    method branchExists (line 692) | branchExists(remote, pattern) {
    method branchList (line 703) | branchList(remote) {
    method disableSparseCheckout (line 759) | disableSparseCheckout() {
    method sparseCheckout (line 766) | sparseCheckout(sparseCheckout) {
    method sparseCheckoutNonConeMode (line 771) | sparseCheckoutNonConeMode(sparseCheckout) {
    method checkout (line 783) | checkout(ref, startPoint) {
    method checkoutDetach (line 795) | checkoutDetach() {
    method config (line 801) | config(configKey, configValue, globalConfig, add, configFile) {
    method configExists (line 817) | configExists(configKey, globalConfig) {
    method fetch (line 830) | fetch(refSpec, options) {
    method getDefaultBranch (line 859) | getDefaultBranch(repositoryUrl) {
    method getSubmoduleConfigPaths (line 886) | getSubmoduleConfigPaths(recursive) {
    method getWorkingDirectory (line 896) | getWorkingDirectory() {
    method init (line 899) | init() {
    method isDetached (line 904) | isDetached() {
    method lfsFetch (line 911) | lfsFetch(ref) {
    method lfsInstall (line 920) | lfsInstall() {
    method log1 (line 925) | log1(format) {
    method remoteAdd (line 933) | remoteAdd(remoteName, remoteUrl) {
    method removeEnvironmentVariable (line 938) | removeEnvironmentVariable(name) {
    method revParse (line 947) | revParse(ref) {
    method setEnvironmentVariable (line 953) | setEnvironmentVariable(name, value) {
    method shaExists (line 956) | shaExists(sha) {
    method submoduleForeach (line 963) | submoduleForeach(command, recursive) {
    method submoduleSync (line 974) | submoduleSync(recursive) {
    method submoduleUpdate (line 983) | submoduleUpdate(fetchDepth, recursive) {
    method submoduleStatus (line 996) | submoduleStatus() {
    method tagExists (line 1003) | tagExists(pattern) {
    method tryClean (line 1009) | tryClean() {
    method tryConfigUnset (line 1015) | tryConfigUnset(configKey, globalConfig) {
    method tryConfigUnsetValue (line 1026) | tryConfigUnsetValue(configKey, configValue, globalConfig, configFile) {
    method tryDisableAutomaticGarbageCollection (line 1040) | tryDisableAutomaticGarbageCollection() {
    method tryGetFetchUrl (line 1046) | tryGetFetchUrl() {
    method tryGetConfigValues (line 1059) | tryGetConfigValues(configKey, globalConfig, configFile) {
    method tryGetConfigKeys (line 1079) | tryGetConfigKeys(pattern, globalConfig, configFile) {
    method tryReset (line 1099) | tryReset() {
    method version (line 1105) | version() {
    method createCommandManager (line 1110) | static createCommandManager(workingDirectory, lfs, doSparseCheckout) {
    method execGit (line 1117) | execGit(args_1) {
    method initializeCommandManager (line 1149) | initializeCommandManager(workingDirectory, lfs, doSparseCheckout) {
  class GitOutput (line 1224) | class GitOutput {
    method constructor (line 1225) | constructor() {
  function adopt (line 1263) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 1265) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 1266) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 1267) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function prepareExistingDirectory (line 1279) | function prepareExistingDirectory(git, repositoryPath, repositoryUrl, cl...
  function adopt (line 1409) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 1411) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 1412) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 1413) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function getSource (line 1432) | function getSource(settings) {
  function cleanup (line 1638) | function cleanup(repositoryPath) {
  function getGitCommandManager (line 1673) | function getGitCommandManager(settings) {
  class GitVersion (line 1700) | class GitVersion {
    method constructor (line 1705) | constructor(version) {
    method checkMinimum (line 1724) | checkMinimum(minimum) {
    method isValid (line 1751) | isValid() {
    method toString (line 1757) | toString() {
  function adopt (line 1802) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 1804) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 1805) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 1806) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function downloadRepository (line 1824) | function downloadRepository(authToken, owner, repo, ref, commit, reposit...
  function getDefaultBranch (line 1879) | function getDefaultBranch(authToken, owner, repo, baseUrl) {
  function downloadArchive (line 1914) | function downloadArchive(authToken, owner, repo, ref, commit, baseUrl) {
  function adopt (line 1963) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 1965) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 1966) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 1967) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function getInputs (line 1978) | function getInputs() {
  function adopt (line 2134) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 2136) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 2137) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 2138) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function run (line 2149) | function run() {
  function cleanup (line 2171) | function cleanup() {
  function adopt (line 2223) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 2225) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 2226) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 2227) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function getCheckoutInfo (line 2242) | function getCheckoutInfo(git, ref, commit) {
  function getRefSpecForAllHistory (line 2291) | function getRefSpecForAllHistory(ref, commit) {
  function getRefSpec (line 2299) | function getRefSpec(ref, commit, fetchTags) {
  function testRef (line 2364) | function testRef(git, ref, commit) {
  function checkCommitInfo (line 2406) | function checkCommitInfo(token, commitInfo, repositoryOwner, repositoryN...
  function fromPayload (line 2471) | function fromPayload(path) {
  function select (line 2474) | function select(obj, path) {
  function escape (line 2496) | function escape(value) {
  function adopt (line 2534) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 2536) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 2537) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 2538) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  class RetryHelper (line 2549) | class RetryHelper {
    method constructor (line 2550) | constructor(maxAttempts = defaultMaxAttempts, minSeconds = defaultMinS...
    method execute (line 2558) | execute(action) {
    method getSleepAmount (line 2579) | getSleepAmount() {
    method sleep (line 2583) | sleep(seconds) {
    method constructor (line 6991) | constructor(maxAttempts, minSeconds, maxSeconds) {
    method execute (line 7002) | execute(action, isRetryable) {
    method getSleepAmount (line 7026) | getSleepAmount() {
    method sleep (line 7030) | sleep(seconds) {
  function execute (line 2590) | function execute(action) {
  function setRepositoryPath (line 2658) | function setRepositoryPath(repositoryPath) {
  function setSshKeyPath (line 2664) | function setSshKeyPath(sshKeyPath) {
  function setSshKnownHostsPath (line 2670) | function setSshKnownHostsPath(sshKnownHostsPath) {
  function setSafeDirectory (line 2676) | function setSafeDirectory() {
  function getFetchUrl (line 2723) | function getFetchUrl(settings) {
  function getServerUrl (line 2736) | function getServerUrl(url) {
  function getServerApiUrl (line 2743) | function getServerApiUrl(url) {
  function isGhes (line 2756) | function isGhes(url) {
  function pruneSuffix (line 2764) | function pruneSuffix(text, suffix) {
  function hasContent (line 2775) | function hasContent(text, whitespaceMode) {
  function adopt (line 2815) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 2817) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 2818) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 2819) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function getOrganizationId (line 2830) | function getOrganizationId() {
  function issueCommand (line 2895) | function issueCommand(command, properties, message) {
  function issue (line 2900) | function issue(name, message = '') {
  class Command (line 2905) | class Command {
    method constructor (line 2906) | constructor(command, properties, message) {
    method toString (line 2914) | toString() {
  function escapeData (line 2938) | function escapeData(s) {
  function escapeProperty (line 2944) | function escapeProperty(s) {
  function adopt (line 2981) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 2983) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 2984) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 2985) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function exportVariable (line 3020) | function exportVariable(name, val) {
  function setSecret (line 3034) | function setSecret(secret) {
  function addPath (line 3042) | function addPath(inputPath) {
  function getInput (line 3062) | function getInput(name, options) {
  function getMultilineInput (line 3081) | function getMultilineInput(name, options) {
  function getBooleanInput (line 3101) | function getBooleanInput(name, options) {
  function setOutput (line 3120) | function setOutput(name, value) {
  function setCommandEcho (line 3134) | function setCommandEcho(enabled) {
  function setFailed (line 3146) | function setFailed(message) {
  function isDebug (line 3157) | function isDebug() {
  function debug (line 3165) | function debug(message) {
  function error (line 3174) | function error(message, properties = {}) {
  function warning (line 3183) | function warning(message, properties = {}) {
  function notice (line 3192) | function notice(message, properties = {}) {
  function info (line 3200) | function info(message) {
  function startGroup (line 3211) | function startGroup(name) {
  function endGroup (line 3218) | function endGroup() {
  function group (line 3230) | function group(name, fn) {
  function saveState (line 3254) | function saveState(name, value) {
  function getState (line 3268) | function getState(name) {
  function getIDToken (line 3272) | function getIDToken(aud) {
  function issueFileCommand (line 3332) | function issueFileCommand(command, message) {
  function prepareKeyValueMessage (line 3345) | function prepareKeyValueMessage(key, value) {
  function adopt (line 3370) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 3372) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 3373) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 3374) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  class OidcClient (line 3383) | class OidcClient {
    method createHttpClient (line 3384) | static createHttpClient(allowRetry = true, maxRetry = 10) {
    method getRequestToken (line 3391) | static getRequestToken() {
    method getIDTokenUrl (line 3398) | static getIDTokenUrl() {
    method getCall (line 3405) | static getCall(id_token_url) {
    method getIDToken (line 3423) | static getIDToken(audience) {
  function toPosixPath (line 3482) | function toPosixPath(pth) {
  function toWin32Path (line 3493) | function toWin32Path(pth) {
  function toPlatformPath (line 3505) | function toPlatformPath(pth) {
  function adopt (line 3519) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 3521) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 3522) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 3523) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  class Summary (line 3534) | class Summary {
    method constructor (line 3535) | constructor() {
    method filePath (line 3544) | filePath() {
    method wrap (line 3572) | wrap(tag, content, attrs = {}) {
    method write (line 3588) | write(options) {
    method clear (line 3602) | clear() {
    method stringify (line 3612) | stringify() {
    method isEmptyBuffer (line 3620) | isEmptyBuffer() {
    method emptyBuffer (line 3628) | emptyBuffer() {
    method addRaw (line 3640) | addRaw(text, addEOL = false) {
    method addEOL (line 3649) | addEOL() {
    method addCodeBlock (line 3660) | addCodeBlock(code, lang) {
    method addList (line 3673) | addList(items, ordered = false) {
    method addTable (line 3686) | addTable(rows) {
    method addDetails (line 3714) | addDetails(label, content) {
    method addImage (line 3727) | addImage(src, alt, options) {
    method addHeading (line 3741) | addHeading(text, level) {
    method addSeparator (line 3754) | addSeparator() {
    method addBreak (line 3763) | addBreak() {
    method addQuote (line 3775) | addQuote(text, cite) {
    method addLink (line 3788) | addLink(text, href) {
  function toCommandValue (line 3816) | function toCommandValue(input) {
  function toCommandProperties (line 3832) | function toCommandProperties(annotationProperties) {
  function _interopRequireDefault (line 3932) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function _interopRequireDefault (line 3949) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function md5 (line 3951) | function md5(bytes) {
  function _interopRequireDefault (line 3994) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function parse (line 3996) | function parse(uuid) {
  function _interopRequireDefault (line 4061) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function rng (line 4067) | function rng() {
  function _interopRequireDefault (line 4092) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function sha1 (line 4094) | function sha1(bytes) {
  function _interopRequireDefault (line 4122) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function stringify (line 4134) | function stringify(arr, offset = 0) {
  function _interopRequireDefault (line 4170) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function v1 (line 4184) | function v1(options, buf, offset) {
  function _interopRequireDefault (line 4284) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function _interopRequireDefault (line 4308) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function stringToBytes (line 4310) | function stringToBytes(str) {
  function _default (line 4327) | function _default(name, version, hashfunc) {
  function _interopRequireDefault (line 4392) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function v4 (line 4394) | function v4(options, buf, offset) {
  function _interopRequireDefault (line 4436) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function _interopRequireDefault (line 4457) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function validate (line 4459) | function validate(uuid) {
  function _interopRequireDefault (line 4481) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function version (line 4483) | function version(uuid) {
  function adopt (line 4521) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 4523) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 4524) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 4525) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function exec (line 4543) | function exec(commandLine, args, options) {
  function getExecOutput (line 4567) | function getExecOutput(commandLine, args, options) {
  function adopt (line 4631) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 4633) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 4634) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 4635) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  class ToolRunner (line 4653) | class ToolRunner extends events.EventEmitter {
    method constructor (line 4654) | constructor(toolPath, args, options) {
    method _debug (line 4663) | _debug(message) {
    method _getCommandString (line 4668) | _getCommandString(options, noPrefix) {
    method _processLineBuffer (line 4706) | _processLineBuffer(data, strBuffer, onLine) {
    method _getSpawnFileName (line 4725) | _getSpawnFileName() {
    method _getSpawnArgs (line 4733) | _getSpawnArgs(options) {
    method _endsWith (line 4749) | _endsWith(str, end) {
    method _isCmdFile (line 4752) | _isCmdFile() {
    method _windowsQuoteCmdArg (line 4757) | _windowsQuoteCmdArg(arg) {
    method _uvQuoteCmdArg (line 4877) | _uvQuoteCmdArg(arg) {
    method _cloneExecOptions (line 4956) | _cloneExecOptions(options) {
    method _getSpawnOptions (line 4971) | _getSpawnOptions(options, toolPath) {
    method exec (line 4992) | exec() {
  function argStringToArray (line 5112) | function argStringToArray(argString) {
  class ExecState (line 5159) | class ExecState extends events.EventEmitter {
    method constructor (line 5160) | constructor(options, toolPath) {
    method CheckComplete (line 5179) | CheckComplete() {
    method _debug (line 5190) | _debug(message) {
    method _setResult (line 5193) | _setResult() {
    method HandleTimeout (line 5215) | static HandleTimeout(state) {
  class Context (line 5240) | class Context {
    method constructor (line 5244) | constructor() {
    method issue (line 5270) | get issue() {
    method repo (line 5274) | get repo() {
  function getOctokit (line 5332) | function getOctokit(token, options, ...additionalPlugins) {
  function adopt (line 5370) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 5372) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 5373) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 5374) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function getAuthString (line 5382) | function getAuthString(token, options) {
  function getProxyAgent (line 5392) | function getProxyAgent(destinationUrl) {
  function getProxyAgentDispatcher (line 5397) | function getProxyAgentDispatcher(destinationUrl) {
  function getProxyFetch (line 5402) | function getProxyFetch(destinationUrl) {
  function getApiBaseUrl (line 5410) | function getApiBaseUrl() {
  function getOctokitOptions (line 5470) | function getOctokitOptions(token, options) {
  function adopt (line 5490) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 5492) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 5493) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 5494) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  class BasicCredentialHandler (line 5500) | class BasicCredentialHandler {
    method constructor (line 5501) | constructor(username, password) {
    method prepareRequest (line 5505) | prepareRequest(options) {
    method canHandleAuthentication (line 5512) | canHandleAuthentication() {
    method handleAuthentication (line 5515) | handleAuthentication() {
  class BearerCredentialHandler (line 5522) | class BearerCredentialHandler {
    method constructor (line 5523) | constructor(token) {
    method prepareRequest (line 5528) | prepareRequest(options) {
    method canHandleAuthentication (line 5535) | canHandleAuthentication() {
    method handleAuthentication (line 5538) | handleAuthentication() {
  class PersonalAccessTokenCredentialHandler (line 5545) | class PersonalAccessTokenCredentialHandler {
    method constructor (line 5546) | constructor(token) {
    method prepareRequest (line 5551) | prepareRequest(options) {
    method canHandleAuthentication (line 5558) | canHandleAuthentication() {
    method handleAuthentication (line 5561) | handleAuthentication() {
  function adopt (line 5602) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 5604) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 5605) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 5606) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function getProxyUrl (line 5660) | function getProxyUrl(serverUrl) {
  class HttpClientError (line 5680) | class HttpClientError extends Error {
    method constructor (line 5681) | constructor(message, statusCode) {
  class HttpClientResponse (line 5689) | class HttpClientResponse {
    method constructor (line 5690) | constructor(message) {
    method readBody (line 5693) | readBody() {
    method readBodyBuffer (line 5706) | readBodyBuffer() {
  function isHttps (line 5721) | function isHttps(requestUrl) {
  class HttpClient (line 5726) | class HttpClient {
    method constructor (line 5727) | constructor(userAgent, handlers, requestOptions) {
    method options (line 5764) | options(requestUrl, additionalHeaders) {
    method get (line 5769) | get(requestUrl, additionalHeaders) {
    method del (line 5774) | del(requestUrl, additionalHeaders) {
    method post (line 5779) | post(requestUrl, data, additionalHeaders) {
    method patch (line 5784) | patch(requestUrl, data, additionalHeaders) {
    method put (line 5789) | put(requestUrl, data, additionalHeaders) {
    method head (line 5794) | head(requestUrl, additionalHeaders) {
    method sendStream (line 5799) | sendStream(verb, requestUrl, stream, additionalHeaders) {
    method getJson (line 5808) | getJson(requestUrl, additionalHeaders = {}) {
    method postJson (line 5815) | postJson(requestUrl, obj, additionalHeaders = {}) {
    method putJson (line 5824) | putJson(requestUrl, obj, additionalHeaders = {}) {
    method patchJson (line 5833) | patchJson(requestUrl, obj, additionalHeaders = {}) {
    method request (line 5847) | request(verb, requestUrl, data, headers) {
    method dispose (line 5932) | dispose() {
    method requestRaw (line 5943) | requestRaw(info, data) {
    method requestRawWithCallback (line 5968) | requestRawWithCallback(info, data, onResult) {
    method getAgent (line 6020) | getAgent(serverUrl) {
    method getAgentDispatcher (line 6024) | getAgentDispatcher(serverUrl) {
    method _prepareRequest (line 6033) | _prepareRequest(method, requestUrl, headers) {
    method _mergeHeaders (line 6060) | _mergeHeaders(headers) {
    method _getExistingOrDefaultHeader (line 6066) | _getExistingOrDefaultHeader(additionalHeaders, header, _default) {
    method _getAgent (line 6073) | _getAgent(parsedUrl) {
    method _getProxyAgentDispatcher (line 6128) | _getProxyAgentDispatcher(parsedUrl, proxyUrl) {
    method _performExponentialBackoff (line 6152) | _performExponentialBackoff(retryNumber) {
    method _processResponse (line 6159) | _processResponse(res, options) {
  function getProxyUrl (line 6238) | function getProxyUrl(reqUrl) {
  function checkBypass (line 6265) | function checkBypass(reqUrl) {
  function isLoopbackAddress (line 6309) | function isLoopbackAddress(host) {
  function adopt (line 6345) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 6347) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 6348) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 6349) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function exists (line 6366) | function exists(fsPath) {
  function isDirectory (line 6381) | function isDirectory(fsPath, useStat = false) {
  function isRooted (line 6392) | function isRooted(p) {
  function tryGetExecutablePath (line 6410) | function tryGetExecutablePath(filePath, extensions) {
  function normalizeSeparators (line 6481) | function normalizeSeparators(p) {
  function isUnixExecutable (line 6495) | function isUnixExecutable(stats) {
  function getCmdPath (line 6501) | function getCmdPath() {
  function adopt (line 6535) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 6537) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 6538) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 6539) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function cp (line 6556) | function cp(source, dest, options = {}) {
  function mv (line 6597) | function mv(source, dest, options = {}) {
  function rmRF (line 6625) | function rmRF(inputPath) {
  function mkdirP (line 6656) | function mkdirP(fsPath) {
  function which (line 6671) | function which(tool, check) {
  function findInPath (line 6702) | function findInPath(tool) {
  function readCopyOptions (line 6754) | function readCopyOptions(options) {
  function cpDirRecursive (line 6762) | function cpDirRecursive(sourceDir, destDir, currentDepth, force) {
  function copyFile (line 6787) | function copyFile(srcFile, destFile, force) {
  function adopt (line 6841) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 6843) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 6844) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 6845) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  function _findMatch (line 6858) | function _findMatch(versionSpec, stable, candidates, archFilter) {
  function _getOsVersion (line 6899) | function _getOsVersion() {
  function _readLinuxVersionFile (line 6934) | function _readLinuxVersionFile() {
  function adopt (line 6976) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 6978) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 6979) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 6980) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  class RetryHelper (line 6990) | class RetryHelper {
    method constructor (line 2550) | constructor(maxAttempts = defaultMaxAttempts, minSeconds = defaultMinS...
    method execute (line 2558) | execute(action) {
    method getSleepAmount (line 2579) | getSleepAmount() {
    method sleep (line 2583) | sleep(seconds) {
    method constructor (line 6991) | constructor(maxAttempts, minSeconds, maxSeconds) {
    method execute (line 7002) | execute(action, isRetryable) {
    method getSleepAmount (line 7026) | getSleepAmount() {
    method sleep (line 7030) | sleep(seconds) {
  function adopt (line 7066) | function adopt(value) { return value instanceof P ? value : new P(functi...
  function fulfilled (line 7068) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
  function rejected (line 7069) | function rejected(value) { try { step(generator["throw"](value)); } catc...
  function step (line 7070) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
  class HTTPError (line 7093) | class HTTPError extends Error {
    method constructor (line 7094) | constructor(httpStatusCode) {
  function downloadTool (line 7113) | function downloadTool(url, dest, auth, headers) {
  function downloadToolAttempt (line 7140) | function downloadToolAttempt(url, dest, auth, headers) {
  function extract7z (line 7202) | function extract7z(file, dest, _7zPath) {
  function extractTar (line 7269) | function extractTar(file, dest, flags = 'xz') {
  function extractXar (line 7328) | function extractXar(file, dest, flags = []) {
  function extractZip (line 7357) | function extractZip(file, dest) {
  function extractZipWin (line 7373) | function extractZipWin(file, dest) {
  function extractZipNix (line 7424) | function extractZipNix(file, dest) {
  function cacheDir (line 7443) | function cacheDir(sourceDir, tool, version, arch) {
  function cacheFile (line 7476) | function cacheFile(sourceFile, targetFile, tool, version, arch) {
  function find (line 7505) | function find(toolName, versionSpec, arch) {
  function findAllVersions (line 7542) | function findAllVersions(toolName, arch) {
  function getManifestFromRepo (line 7560) | function getManifestFromRepo(owner, repo, auth, branch = 'master') {
  function findFromManifest (line 7597) | function findFromManifest(versionSpec, stable, manifest, archFilter = os...
  function _createExtractFolder (line 7605) | function _createExtractFolder(dest) {
  function _createToolPath (line 7615) | function _createToolPath(tool, version, arch) {
  function _completeToolPath (line 7626) | function _completeToolPath(tool, version, arch) {
  function isExplicitVersion (line 7637) | function isExplicitVersion(versionSpec) {
  function evaluateVersions (line 7651) | function evaluateVersions(versions, versionSpec) {
  function _getCacheDirectory (line 7680) | function _getCacheDirectory() {
  function _getTempDirectory (line 7688) | function _getTempDirectory() {
  function _getGlobal (line 7696) | function _getGlobal(key, defaultValue) {
  function _unique (line 7706) | function _unique(values) {
  function bytesToUuid (line 7725) | function bytesToUuid(buf, offset) {
  function v4 (line 7767) | function v4(options, buf, offset) {
  function auth (line 7831) | async function auth(token) {
  function withAuthorizationPrefix (line 7844) | function withAuthorizationPrefix(token) {
  function hook (line 7852) | async function hook(token, request, route, parameters) {
  method defaults (line 7930) | static defaults(defaults) {
  method plugin (line 7961) | static plugin(...newPlugins) {
  method constructor (line 7972) | constructor(options = {}) {
  function lowercaseKeys (line 8102) | function lowercaseKeys(object) {
  function isPlainObject (line 8113) | function isPlainObject(value) {
  function mergeDeep (line 8126) | function mergeDeep(defaults, options) {
  function removeUndefinedProperties (line 8142) | function removeUndefinedProperties(obj) {
  function merge (line 8152) | function merge(defaults, route, options) {
  function addQueryParameters (line 8175) | function addQueryParameters(url, parameters) {
  function removeNonChars (line 8191) | function removeNonChars(variableName) {
  function extractUrlVariableNames (line 8194) | function extractUrlVariableNames(url) {
  function omit (line 8203) | function omit(object, keysToOmit) {
  function encodeReserved (line 8214) | function encodeReserved(str) {
  function encodeUnreserved (line 8222) | function encodeUnreserved(str) {
  function encodeValue (line 8227) | function encodeValue(operator, value, key) {
  function isDefined (line 8235) | function isDefined(value) {
  function isKeyOperator (line 8238) | function isKeyOperator(operator) {
  function getValues (line 8241) | function getValues(context, operator, key, modifier) {
  function parseUrl (line 8301) | function parseUrl(template) {
  function expand (line 8306) | function expand(template, context) {
  function parse (line 8346) | function parse(options) {
  function endpointWithDefaults (line 8411) | function endpointWithDefaults(defaults, route, options) {
  function withDefaults (line 8416) | function withDefaults(oldDefaults, newDefaults) {
  function _buildMessageForResponseErrors (line 8479) | function _buildMessageForResponseErrors(data) {
  method constructor (line 8484) | constructor(request2, headers, response) {
  function graphql (line 8510) | function graphql(request2, query, options) {
  function withDefaults (line 8562) | function withDefaults(request2, newDefaults) {
  function withCustomRequest (line 8581) | function withCustomRequest(customRequest) {
  function normalizePaginatedListResponse (line 8630) | function normalizePaginatedListResponse(response) {
  function iterator (line 8660) | function iterator(octokit, route, parameters) {
  function paginate (line 8696) | function paginate(octokit, route, parameters, mapFn) {
  function gather (line 8708) | function gather(octokit, results, iterator2, mapFn) {
  function isPaginatingEndpoint (line 8971) | function isPaginatingEndpoint(arg) {
  function paginateRest (line 8980) | function paginateRest(octokit) {
  method has (line 11044) | has({ scope }, methodName) {
  method getOwnPropertyDescriptor (line 11047) | getOwnPropertyDescriptor(target, methodName) {
  method defineProperty (line 11056) | defineProperty(target, methodName, descriptor) {
  method deleteProperty (line 11060) | deleteProperty(target, methodName) {
  method ownKeys (line 11064) | ownKeys({ scope }) {
  method set (line 11067) | set(target, methodName, value) {
  method get (line 11070) | get({ octokit, scope, cache }, methodName) {
  function endpointsToMethods (line 11093) | function endpointsToMethods(octokit) {
  function decorate (line 11100) | function decorate(octokit, scope, methodName, defaults, decorations) {
  function restEndpointMethods (line 11143) | function restEndpointMethods(octokit) {
  function legacyRestEndpointMethods (line 11150) | function legacyRestEndpointMethods(octokit) {
  method constructor (line 11208) | constructor(message, statusCode, options) {
  function isPlainObject (line 11298) | function isPlainObject(value) {
  function getBufferResponse (line 11314) | function getBufferResponse(response) {
  function fetchWrapper (line 11319) | function fetchWrapper(requestOptions) {
  function getResponseData (line 11427) | async function getResponseData(response) {
  function toErrorMessage (line 11437) | function toErrorMessage(data) {
  function withDefaults (line 11456) | function withDefaults(oldEndpoint, newDefaults) {
  function bindApi (line 11503) | function bindApi(hook, state, name) {
  function HookSingular (line 11516) | function HookSingular() {
  function HookCollection (line 11526) | function HookCollection() {
  function Hook (line 11538) | function Hook() {
  function addHook (line 11565) | function addHook(state, kind, name, hook) {
  function register (line 11618) | function register(state, name, method, options) {
  function removeHook (line 11652) | function removeHook(state, name, method) {
  class Deprecation (line 11681) | class Deprecation extends Error {
    method constructor (line 11682) | constructor(message) {
  function once (line 11724) | function once (fn) {
  function onceStrict (line 11734) | function onceStrict (fn) {
  function tok (line 11790) | function tok (n) {
  function makeSafeRe (line 11808) | function makeSafeRe (value) {
  function parse (line 12046) | function parse (version, options) {
  function valid (line 12079) | function valid (version, options) {
  function clean (line 12085) | function clean (version, options) {
  function SemVer (line 12092) | function SemVer (version, options) {
  function inc (line 12362) | function inc (version, release, loose, identifier) {
  function diff (line 12376) | function diff (version1, version2) {
  function compareIdentifiers (line 12401) | function compareIdentifiers (a, b) {
  function rcompareIdentifiers (line 12418) | function rcompareIdentifiers (a, b) {
  function major (line 12423) | function major (a, loose) {
  function minor (line 12428) | function minor (a, loose) {
  function patch (line 12433) | function patch (a, loose) {
  function compare (line 12438) | function compare (a, b, loose) {
  function compareLoose (line 12443) | function compareLoose (a, b) {
  function compareBuild (line 12448) | function compareBuild (a, b, loose) {
  function rcompare (line 12455) | function rcompare (a, b, loose) {
  function sort (line 12460) | function sort (list, loose) {
  function rsort (line 12467) | function rsort (list, loose) {
  function gt (line 12474) | function gt (a, b, loose) {
  function lt (line 12479) | function lt (a, b, loose) {
  function eq (line 12484) | function eq (a, b, loose) {
  function neq (line 12489) | function neq (a, b, loose) {
  function gte (line 12494) | function gte (a, b, loose) {
  function lte (line 12499) | function lte (a, b, loose) {
  function cmp (line 12504) | function cmp (a, op, b, loose) {
  function Comparator (line 12546) | function Comparator (comp, options) {
  function Range (line 12678) | function Range (range, options) {
  function isSatisfiable (line 12804) | function isSatisfiable (comparators, options) {
  function toComparators (line 12822) | function toComparators (range, options) {
  function parseComparator (line 12833) | function parseComparator (comp, options) {
  function isX (line 12846) | function isX (id) {
  function replaceTildes (line 12856) | function replaceTildes (comp, options) {
  function replaceTilde (line 12862) | function replaceTilde (comp, options) {
  function replaceCarets (line 12896) | function replaceCarets (comp, options) {
  function replaceCaret (line 12902) | function replaceCaret (comp, options) {
  function replaceXRanges (line 12954) | function replaceXRanges (comp, options) {
  function replaceXRange (line 12961) | function replaceXRange (comp, options) {
  function replaceStars (line 13035) | function replaceStars (comp, options) {
  function hyphenReplace (line 13046) | function hyphenReplace ($0,
  function testSet (line 13096) | function testSet (set, version, options) {
  function satisfies (line 13133) | function satisfies (version, range, options) {
  function maxSatisfying (line 13143) | function maxSatisfying (versions, range, options) {
  function minSatisfying (line 13165) | function minSatisfying (versions, range, options) {
  function minVersion (line 13187) | function minVersion (range, loose) {
  function validRange (line 13241) | function validRange (range, options) {
  function ltr (line 13253) | function ltr (version, range, options) {
  function gtr (line 13259) | function gtr (version, range, options) {
  function outside (line 13264) | function outside (version, range, hilo, options) {
  function prerelease (line 13334) | function prerelease (version, options) {
  function intersects (line 13340) | function intersects (r1, r2, options) {
  function coerce (line 13347) | function coerce (version, options) {
  function httpOverHttp (line 13429) | function httpOverHttp(options) {
  function httpsOverHttp (line 13435) | function httpsOverHttp(options) {
  function httpOverHttps (line 13443) | function httpOverHttps(options) {
  function httpsOverHttps (line 13449) | function httpsOverHttps(options) {
  function TunnelingAgent (line 13458) | function TunnelingAgent(options) {
  function onFree (line 13501) | function onFree() {
  function onCloseOrRemove (line 13505) | function onCloseOrRemove(err) {
  function onResponse (line 13545) | function onResponse(res) {
  function onUpgrade (line 13550) | function onUpgrade(res, socket, head) {
  function onConnect (line 13557) | function onConnect(res, socket, head) {
  function onError (line 13586) | function onError(cause) {
  function createSecureSocket (line 13616) | function createSecureSocket(options, cb) {
  function toOptions (line 13633) | function toOptions(host, port, localAddress) {
  function mergeOptions (line 13644) | function mergeOptions(target) {
  function makeDispatcher (line 13732) | function makeDispatcher (fn) {
  function defaultFactory (line 13879) | function defaultFactory (origin, opts) {
  class Agent (line 13885) | class Agent extends DispatcherBase {
    method constructor (line 13886) | constructor ({ factory = defaultFactory, maxRedirections = 0, connect,...
    method [kRunning] (line 13942) | get [kRunning] () {
    method [kDispatch] (line 13954) | [kDispatch] (opts, handler) {
    method [kClose] (line 13979) | async [kClose] () {
    method [kDestroy] (line 13992) | async [kDestroy] (err) {
  function abort (line 14020) | function abort (self) {
  function addSignal (line 14028) | function addSignal (self, signal) {
  function removeSignal (line 14049) | function removeSignal (self) {
  class ConnectHandler (line 14083) | class ConnectHandler extends AsyncResource {
    method constructor (line 14084) | constructor (opts, callback) {
    method onConnect (line 14109) | onConnect (abort, context) {
    method onHeaders (line 14118) | onHeaders () {
    method onUpgrade (line 14122) | onUpgrade (statusCode, rawHeaders, socket) {
    method onError (line 14144) | onError (err) {
  function connect (line 14158) | function connect (opts, callback) {
  class PipelineRequest (line 14207) | class PipelineRequest extends Readable {
    method constructor (line 14208) | constructor () {
    method _read (line 14214) | _read () {
    method _destroy (line 14223) | _destroy (err, callback) {
  class PipelineResponse (line 14230) | class PipelineResponse extends Readable {
    method constructor (line 14231) | constructor (resume) {
    method _read (line 14236) | _read () {
    method _destroy (line 14240) | _destroy (err, callback) {
  class PipelineHandler (line 14249) | class PipelineHandler extends AsyncResource {
    method constructor (line 14250) | constructor (opts, handler) {
    method onConnect (line 14334) | onConnect (abort, context) {
    method onHeaders (line 14347) | onHeaders (statusCode, rawHeaders, resume) {
    method onData (line 14409) | onData (chunk) {
    method onComplete (line 14414) | onComplete (trailers) {
    method onError (line 14419) | onError (err) {
  function pipeline (line 14426) | function pipeline (opts, handler) {
  class RequestHandler (line 14457) | class RequestHandler extends AsyncResource {
    method constructor (line 14458) | constructor (opts, callback) {
    method onConnect (line 14515) | onConnect (abort, context) {
    method onHeaders (line 14524) | onHeaders (statusCode, rawHeaders, resume, statusMessage) {
    method onData (line 14560) | onData (chunk) {
    method onComplete (line 14565) | onComplete (trailers) {
    method onError (line 14575) | onError (err) {
  function request (line 14603) | function request (opts, callback) {
  class StreamHandler (line 14646) | class StreamHandler extends AsyncResource {
    method constructor (line 14647) | constructor (opts, factory, callback) {
    method onConnect (line 14704) | onConnect (abort, context) {
    method onHeaders (line 14713) | onHeaders (statusCode, rawHeaders, resume, statusMessage) {
    method onData (line 14788) | onData (chunk) {
    method onComplete (line 14794) | onComplete (trailers) {
    method onError (line 14808) | onError (err) {
  function stream (line 14832) | function stream (opts, factory, callback) {
  class UpgradeHandler (line 14869) | class UpgradeHandler extends AsyncResource {
    method constructor (line 14870) | constructor (opts, callback) {
    method onConnect (line 14896) | onConnect (abort, context) {
    method onHeaders (line 14905) | onHeaders () {
    method onUpgrade (line 14909) | onUpgrade (statusCode, rawHeaders, socket) {
    method onError (line 14926) | onError (err) {
  function upgrade (line 14940) | function upgrade (opts, callback) {
  method constructor (line 15010) | constructor ({
  method destroy (line 15036) | destroy (err) {
  method emit (line 15053) | emit (ev, ...args) {
  method on (line 15064) | on (ev, ...args) {
  method addListener (line 15071) | addListener (ev, ...args) {
  method off (line 15075) | off (ev, ...args) {
  method removeListener (line 15086) | removeListener (ev, ...args) {
  method push (line 15090) | push (chunk) {
  method text (line 15099) | async text () {
  method json (line 15104) | async json () {
  method blob (line 15109) | async blob () {
  method arrayBuffer (line 15114) | async arrayBuffer () {
  method formData (line 15119) | async formData () {
  method bodyUsed (line 15125) | get bodyUsed () {
  method body (line 15130) | get body () {
  method dump (line 15142) | dump (opts) {
  function isLocked (line 15190) | function isLocked (self) {
  function isUnusable (line 15196) | function isUnusable (self) {
  function consume (line 15200) | async function consume (stream, type) {
  function consumeStart (line 15231) | function consumeStart (consume) {
  function consumeEnd (line 15257) | function consumeEnd (consume) {
  function consumePush (line 15288) | function consumePush (consume, chunk) {
  function consumeFinish (line 15293) | function consumeFinish (consume, err) {
  function getResolveErrorBodyCallback (line 15324) | async function getResolveErrorBodyCallback ({ callback, body, contentTyp...
  function getGreatestCommonDivisor (line 15399) | function getGreatestCommonDivisor (a, b) {
  function defaultFactory (line 15404) | function defaultFactory (origin, opts) {
  class BalancedPool (line 15408) | class BalancedPool extends PoolBase {
    method constructor (line 15409) | constructor (upstreams = [], { factory = defaultFactory, ...opts } = {...
    method addUpstream (line 15438) | addUpstream (upstream) {
    method _updateBalancedPoolStats (line 15478) | _updateBalancedPoolStats () {
    method removeUpstream (line 15482) | removeUpstream (upstream) {
    method upstreams (line 15498) | get upstreams () {
    method [kGetDispatcher] (line 15504) | [kGetDispatcher] () {
  class Cache (line 15599) | class Cache {
    method constructor (line 15606) | constructor () {
    method match (line 15614) | async match (request, options = {}) {
    method matchAll (line 15630) | async matchAll (request = undefined, options = {}) {
    method add (line 15698) | async add (request) {
    method addAll (line 15714) | async addAll (requests) {
    method put (line 15875) | async put (request, response) {
    method delete (line 16004) | async delete (request, options = {}) {
    method keys (line 16068) | async keys (request = undefined, options = {}) {
    method #batchCacheOperations (line 16147) | #batchCacheOperations (operations) {
    method #queryCache (line 16285) | #queryCache (requestQuery, options, targetStorage) {
    method #requestMatchesCachedItem (line 16309) | #requestMatchesCachedItem (requestQuery, request, response = null, opt...
  class CacheStorage (line 16423) | class CacheStorage {
    method constructor (line 16430) | constructor () {
    method match (line 16436) | async match (request, options = {}) {
    method has (line 16473) | async has (cacheName) {
    method open (line 16489) | async open (cacheName) {
    method delete (line 16521) | async delete (cacheName) {
    method keys (line 16534) | async keys () {
  function urlEquals (line 16594) | function urlEquals (A, B, excludeFragment = false) {
  function fieldValues (line 16606) | function fieldValues (header) {
  class Client (line 16766) | class Client extends DispatcherBase {
    method constructor (line 16772) | constructor (url, {
    method pipelining (line 16955) | get pipelining () {
    method pipelining (line 16959) | set pipelining (value) {
    method [kPending] (line 16964) | get [kPending] () {
    method [kRunning] (line 16968) | get [kRunning] () {
    method [kSize] (line 16972) | get [kSize] () {
    method [kConnected] (line 16976) | get [kConnected] () {
    method [kBusy] (line 16980) | get [kBusy] () {
    method [kConnect] (line 16990) | [kConnect] (cb) {
    method [kDispatch] (line 16995) | [kDispatch] (opts, handler) {
    method [kClose] (line 17020) | async [kClose] () {
    method [kDestroy] (line 17032) | async [kDestroy] (err) {
  function onHttp2SessionError (line 17066) | function onHttp2SessionError (err) {
  function onHttp2FrameError (line 17074) | function onHttp2FrameError (type, code, id) {
  function onHttp2SessionEnd (line 17083) | function onHttp2SessionEnd () {
  function onHTTP2GoAway (line 17088) | function onHTTP2GoAway (code) {
  function lazyllhttp (line 17128) | async function lazyllhttp () {
  class Parser (line 17203) | class Parser {
    method constructor (line 17204) | constructor (client, socket, { exports }) {
    method setTimeout (line 17232) | setTimeout (value, type) {
    method resume (line 17254) | resume () {
    method readMore (line 17277) | readMore () {
    method execute (line 17287) | execute (data) {
    method destroy (line 17349) | destroy () {
    method onStatus (line 17364) | onStatus (buf) {
    method onMessageBegin (line 17368) | onMessageBegin () {
    method onHeaderField (line 17382) | onHeaderField (buf) {
    method onHeaderValue (line 17394) | onHeaderValue (buf) {
    method trackHeader (line 17416) | trackHeader (len) {
    method onUpgrade (line 17423) | onUpgrade (head) {
    method onHeadersComplete (line 17470) | onHeadersComplete (statusCode, upgrade, shouldKeepAlive) {
    method onBody (line 17579) | onBody (buf) {
    method onMessageComplete (line 17611) | onMessageComplete () {
  function onParserTimeout (line 17678) | function onParserTimeout (parser) {
  function onSocketReadable (line 17697) | function onSocketReadable () {
  function onSocketError (line 17704) | function onSocketError (err) {
  function onError (line 17724) | function onError (client, err) {
  function onSocketEnd (line 17744) | function onSocketEnd () {
  function onSocketClose (line 17758) | function onSocketClose () {
  function connect (line 17801) | async function connect (client) {
  function emitDrain (line 17966) | function emitDrain (client) {
  function resume (line 17971) | function resume (client, sync) {
  function _resume (line 17988) | function _resume (client, sync) {
  function shouldSendContentLength (line 18113) | function shouldSendContentLength (method) {
  function write (line 18117) | function write (client, request) {
  function writeH2 (line 18282) | function writeH2 (client, session, request) {
  function writeStream (line 18546) | function writeStream ({ h2stream, body, client, request, socket, content...
  function writeBlob (line 18661) | async function writeBlob ({ h2stream, body, client, request, socket, con...
  function writeIterable (line 18696) | async function writeIterable ({ h2stream, body, client, request, socket,...
  class AsyncWriter (line 18776) | class AsyncWriter {
    method constructor (line 18777) | constructor ({ socket, request, contentLength, client, expectsPayload,...
    method write (line 18789) | write (chunk) {
    method end (line 18852) | end () {
    method destroy (line 18899) | destroy (err) {
  function errorRequest (line 18911) | function errorRequest (client, request, err) {
  class CompatWeakRef (line 18935) | class CompatWeakRef {
    method constructor (line 18936) | constructor (value) {
    method deref (line 18940) | deref () {
  class CompatFinalizer (line 18947) | class CompatFinalizer {
    method constructor (line 18948) | constructor (finalizer) {
    method register (line 18952) | register (dispatcher, key) {
  function getCookies (line 19030) | function getCookies (headers) {
  function deleteCookie (line 19057) | function deleteCookie (headers, name, attributes) {
  function getSetCookies (line 19079) | function getSetCookies (headers) {
  function setCookie (line 19098) | function setCookie (headers, cookie) {
  function parseSetCookie (line 19209) | function parseSetCookie (header) {
  function parseUnparsedAttributes (line 19285) | function parseUnparsedAttributes (unparsedAttributes, cookieAttributeLis...
  function isCTLExcludingHtab (line 19527) | function isCTLExcludingHtab (value) {
  function validateCookieName (line 19554) | function validateCookieName (name) {
  function validateCookieValue (line 19591) | function validateCookieValue (value) {
  function validateCookiePath (line 19612) | function validateCookiePath (path) {
  function validateCookieDomain (line 19627) | function validateCookieDomain (domain) {
  function toIMFDate (line 19678) | function toIMFDate (date) {
  function validateCookieMaxAge (line 19711) | function validateCookieMaxAge (maxAge) {
  function stringify (line 19721) | function stringify (cookie) {
  method constructor (line 19822) | constructor (maxCachedSessions) {
  method get (line 19837) | get (sessionKey) {
  method set (line 19842) | set (sessionKey, session) {
  method constructor (line 19853) | constructor (maxCachedSessions) {
  method get (line 19858) | get (sessionKey) {
  method set (line 19862) | set (sessionKey, session) {
  function buildConnector (line 19878) | function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeo...
  function setupTimeout (line 19962) | function setupTimeout (onConnectTimeout, timeout) {
  function onConnectTimeout (line 19987) | function onConnectTimeout (socket) {
  class UndiciError (line 20128) | class UndiciError extends Error {
    method constructor (line 20129) | constructor (message) {
  class ConnectTimeoutError (line 20136) | class ConnectTimeoutError extends UndiciError {
    method constructor (line 20137) | constructor (message) {
  class HeadersTimeoutError (line 20146) | class HeadersTimeoutError extends UndiciError {
    method constructor (line 20147) | constructor (message) {
  class HeadersOverflowError (line 20156) | class HeadersOverflowError extends UndiciError {
    method constructor (line 20157) | constructor (message) {
  class BodyTimeoutError (line 20166) | class BodyTimeoutError extends UndiciError {
    method constructor (line 20167) | constructor (message) {
  class ResponseStatusCodeError (line 20176) | class ResponseStatusCodeError extends UndiciError {
    method constructor (line 20177) | constructor (message, statusCode, headers, body) {
  class InvalidArgumentError (line 20190) | class InvalidArgumentError extends UndiciError {
    method constructor (line 20191) | constructor (message) {
  class InvalidReturnValueError (line 20200) | class InvalidReturnValueError extends UndiciError {
    method constructor (line 20201) | constructor (message) {
  class RequestAbortedError (line 20210) | class RequestAbortedError extends UndiciError {
    method constructor (line 20211) | constructor (message) {
  class InformationalError (line 20220) | class InformationalError extends UndiciError {
    method constructor (line 20221) | constructor (message) {
  class RequestContentLengthMismatchError (line 20230) | class RequestContentLengthMismatchError extends UndiciError {
    method constructor (line 20231) | constructor (message) {
  class ResponseContentLengthMismatchError (line 20240) | class ResponseContentLengthMismatchError extends UndiciError {
    method constructor (line 20241) | constructor (message) {
  class ClientDestroyedError (line 20250) | class ClientDestroyedError extends UndiciError {
    method constructor (line 20251) | constructor (message) {
  class ClientClosedError (line 20260) | class ClientClosedError extends UndiciError {
    method constructor (line 20261) | constructor (message) {
  class SocketError (line 20270) | class SocketError extends UndiciError {
    method constructor (line 20271) | constructor (message, socket) {
  class NotSupportedError (line 20281) | class NotSupportedError extends UndiciError {
    method constructor (line 20282) | constructor (message) {
  class BalancedPoolMissingUpstreamError (line 20291) | class BalancedPoolMissingUpstreamError extends UndiciError {
    method constructor (line 20292) | constructor (message) {
  class HTTPParserError (line 20301) | class HTTPParserError extends Error {
    method constructor (line 20302) | constructor (message, code, data) {
  class ResponseExceededMaxSizeError (line 20311) | class ResponseExceededMaxSizeError extends UndiciError {
    method constructor (line 20312) | constructor (message) {
  class RequestRetryError (line 20321) | class RequestRetryError extends UndiciError {
    method constructor (line 20322) | constructor (message, code, { headers, data }) {
  class Request (line 20416) | class Request {
    method constructor (line 20417) | constructor (origin, {
    method onBodySent (line 20593) | onBodySent (chunk) {
    method onRequestSent (line 20603) | onRequestSent () {
    method onConnect (line 20617) | onConnect (abort) {
    method onHeaders (line 20629) | onHeaders (statusCode, headers, resume, statusText) {
    method onData (line 20644) | onData (chunk) {
    method onUpgrade (line 20656) | onUpgrade (statusCode, headers, socket) {
    method onComplete (line 20663) | onComplete (trailers) {
    method onError (line 20681) | onError (error) {
    method onFinally (line 20696) | onFinally () {
    method addHeader (line 20709) | addHeader (key, value) {
    method [kHTTP1BuildRequest] (line 20714) | static [kHTTP1BuildRequest] (origin, opts, handler) {
    method [kHTTP2BuildRequest] (line 20720) | static [kHTTP2BuildRequest] (origin, opts, handler) {
    method [kHTTP2CopyHeaders] (line 20748) | static [kHTTP2CopyHeaders] (raw) {
    method constructor (line 26587) | constructor (input, init = {}) {
    method method (line 27079) | get method () {
    method url (line 27087) | get url () {
    method headers (line 27097) | get headers () {
    method destination (line 27106) | get destination () {
    method referrer (line 27118) | get referrer () {
    method referrerPolicy (line 27140) | get referrerPolicy () {
    method mode (line 27150) | get mode () {
    method credentials (line 27160) | get credentials () {
    method cache (line 27168) | get cache () {
    method redirect (line 27179) | get redirect () {
    method integrity (line 27189) | get integrity () {
    method keepalive (line 27199) | get keepalive () {
    method isReloadNavigation (line 27208) | get isReloadNavigation () {
    method isHistoryNavigation (line 27218) | get isHistoryNavigation () {
    method signal (line 27229) | get signal () {
    method body (line 27236) | get body () {
    method bodyUsed (line 27242) | get bodyUsed () {
    method duplex (line 27248) | get duplex () {
    method clone (line 27255) | clone () {
  function processHeaderValue (line 20765) | function processHeaderValue (key, val, skipAppend) {
  function processHeader (line 20779) | function processHeader (request, key, val, skipAppend = false) {
  function nop (line 20956) | function nop () {}
  function isStream (line 20958) | function isStream (obj) {
  function isBlobLike (line 20963) | function isBlobLike (object) {
  function buildURL (line 20973) | function buildURL (url, queryParams) {
  function parseURL (line 20987) | function parseURL (url) {
  function parseOrigin (line 21054) | function parseOrigin (url) {
  function getHostname (line 21064) | function getHostname (host) {
  function getServerName (line 21080) | function getServerName (host) {
  function deepClone (line 21095) | function deepClone (obj) {
  function isAsyncIterable (line 21099) | function isAsyncIterable (obj) {
  function isIterable (line 21103) | function isIterable (obj) {
  function bodyLength (line 21107) | function bodyLength (body) {
  function isDestroyed (line 21124) | function isDestroyed (stream) {
  function isReadableAborted (line 21128) | function isReadableAborted (stream) {
  function destroy (line 21133) | function destroy (stream, err) {
  function parseKeepAliveTimeout (line 21157) | function parseKeepAliveTimeout (val) {
  function headerNameToString (line 21167) | function headerNameToString (value) {
  function parseHeaders (line 21171) | function parseHeaders (headers, obj = {}) {
  function parseRawHeaders (line 21202) | function parseRawHeaders (headers) {
  function isBuffer (line 21229) | function isBuffer (buffer) {
  function validateHandler (line 21234) | function validateHandler (handler, method, upgrade) {
  function isDisturbed (line 21272) | function isDisturbed (body) {
  function isErrored (line 21283) | function isErrored (body) {
  function isReadable (line 21291) | function isReadable (body) {
  function getSocketInfo (line 21299) | function getSocketInfo (socket) {
  function ReadableStreamFrom (line 21319) | function ReadableStreamFrom (iterable) {
  function isFormDataLike (line 21356) | function isFormDataLike (object) {
  function throwIfAborted (line 21370) | function throwIfAborted (signal) {
  function addAbortListener (line 21384) | function addAbortListener (signal, listener) {
  function toUSVString (line 21398) | function toUSVString (val) {
  function parseRangeHeader (line 21410) | function parseRangeHeader (range) {
  class DispatcherBase (line 21487) | class DispatcherBase extends Dispatcher {
    method constructor (line 21488) | constructor () {
    method destroyed (line 21497) | get destroyed () {
    method closed (line 21501) | get closed () {
    method interceptors (line 21505) | get interceptors () {
    method interceptors (line 21509) | set interceptors (newInterceptors) {
    method close (line 21522) | close (callback) {
    method destroy (line 21568) | destroy (err, callback) {
    method [kInterceptedDispatch] (line 21617) | [kInterceptedDispatch] (opts, handler) {
    method dispatch (line 21631) | dispatch (opts, handler) {
  class Dispatcher (line 21675) | class Dispatcher extends EventEmitter {
    method dispatch (line 21676) | dispatch () {
    method close (line 21680) | close () {
    method destroy (line 21684) | destroy () {
  function extractBody (line 21738) | function extractBody (object, keepalive = false) {
  function safelyExtractBody (line 21958) | function safelyExtractBody (object, keepalive = false) {
  function cloneBody (line 21980) | function cloneBody (body) {
  function throwIfAborted (line 22026) | function throwIfAborted (state) {
  function bodyMixinMethods (line 22032) | function bodyMixinMethods (instance) {
  function mixinBody (line 22194) | function mixinBody (prototype) {
  function specConsumeBody (line 22204) | async function specConsumeBody (object, convertBytesToJSValue, instance) {
  function bodyUnusable (line 22249) | function bodyUnusable (body) {
  function utf8DecodeBytes (line 22260) | function utf8DecodeBytes (buffer) {
  function parseJSONFromBytes (line 22286) | function parseJSONFromBytes (bytes) {
  function bodyMimeType (line 22294) | function bodyMimeType (object) {
  function dataURLProcessor (line 22495) | function dataURLProcessor (dataURL) {
  function URLSerializer (line 22597) | function URLSerializer (url, excludeFragment = false) {
  function collectASequenceOfCodePoints (line 22614) | function collectASequenceOfCodePoints (condition, input, position) {
  function collectASequenceOfCodePointsFast (line 22638) | function collectASequenceOfCodePointsFast (char, input, position) {
  function stringPercentDecode (line 22653) | function stringPercentDecode (input) {
  function percentDecode (line 22663) | function percentDecode (input) {
  function parseMIMEType (line 22708) | function parseMIMEType (input) {
  function forgivingBase64 (line 22881) | function forgivingBase64 (data) {
  function collectAnHTTPQuotedString (line 22925) | function collectAnHTTPQuotedString (input, position, extractValue) {
  function serializeAMimeType (line 23000) | function serializeAMimeType (mimeType) {
  function isHTTPWhiteSpace (line 23045) | function isHTTPWhiteSpace (char) {
  function removeHTTPWhitespace (line 23053) | function removeHTTPWhitespace (str, leading = true, trailing = true) {
  function isASCIIWhitespace (line 23072) | function isASCIIWhitespace (char) {
  function removeASCIIWhitespace (line 23079) | function removeASCIIWhitespace (str, leading = true, trailing = true) {
  class File (line 23123) | class File extends Blob {
    method constructor (line 23124) | constructor (fileBits, fileName, options = {}) {
    method name (line 23188) | get name () {
    method lastModified (line 23194) | get lastModified () {
    method type (line 23200) | get type () {
  class FileLike (line 23207) | class FileLike {
    method constructor (line 23208) | constructor (blobLike, fileName, options = {}) {
    method stream (line 23255) | stream (...args) {
    method arrayBuffer (line 23261) | arrayBuffer (...args) {
    method slice (line 23267) | slice (...args) {
    method text (line 23273) | text (...args) {
    method size (line 23279) | get size () {
    method type (line 23285) | get type () {
    method name (line 23291) | get name () {
    method lastModified (line 23297) | get lastModified () {
  method [Symbol.toStringTag] (line 23303) | get [Symbol.toStringTag] () {
  method defaultValue (line 23345) | get defaultValue () {
  function processBlobParts (line 23375) | function processBlobParts (parts, options) {
  function convertLineEndingsNative (line 23425) | function convertLineEndingsNative (s) {
  function isFileLike (line 23443) | function isFileLike (object) {
  class FormData (line 23476) | class FormData {
    method constructor (line 23477) | constructor (form) {
    method append (line 23489) | append (name, value, filename = undefined) {
    method delete (line 23518) | delete (name) {
    method get (line 23530) | get (name) {
    method getAll (line 23549) | getAll (name) {
    method has (line 23565) | has (name) {
    method set (line 23577) | set (name, value, filename = undefined) {
    method entries (line 23620) | entries () {
    method keys (line 23630) | keys () {
    method values (line 23640) | values () {
    method forEach (line 23654) | forEach (callbackFn, thisArg = globalThis) {
  function makeEntry (line 23687) | function makeEntry (name, value, filename) {
  function getGlobalOrigin (line 23743) | function getGlobalOrigin () {
  function setGlobalOrigin (line 23747) | function setGlobalOrigin (newOrigin) {
  function isHTTPWhiteSpaceCharCode (line 23807) | function isHTTPWhiteSpaceCharCode (code) {
  function headerValueNormalize (line 23815) | function headerValueNormalize (potentialValue) {
  function fill (line 23827) | function fill (headers, object) {
  function appendHeader (line 23867) | function appendHeader (headers, name, value) {
  class HeadersList (line 23908) | class HeadersList {
    method constructor (line 23912) | constructor (init) {
    method contains (line 23924) | contains (name) {
    method clear (line 23933) | clear () {
    method append (line 23940) | append (name, value) {
    method set (line 23966) | set (name, value) {
    method delete (line 23982) | delete (name) {
    method get (line 23995) | get (name) {
    method entries (line 24012) | get entries () {
  method [Symbol.iterator] (line 24005) | * [Symbol.iterator] () {
  class Headers (line 24026) | class Headers {
    method constructor (line 24027) | constructor (init = undefined) {
    method append (line 24046) | append (name, value) {
    method delete (line 24058) | delete (name) {
    method get (line 24103) | get (name) {
    method has (line 24125) | has (name) {
    method set (line 24147) | set (name, value) {
    method getSetCookie (line 24196) | getSetCookie () {
    method [kHeadersSortedMap] (line 24213) | get [kHeadersSortedMap] () {
    method keys (line 24259) | keys () {
    method values (line 24275) | values () {
    method entries (line 24291) | entries () {
    method forEach (line 24311) | forEach (callbackFn, thisArg = globalThis) {
  method [Symbol.for('nodejs.util.inspect.custom')] (line 24327) | [Symbol.for('nodejs.util.inspect.custom')] () {
  class Fetch (line 24456) | class Fetch extends EE {
    method constructor (line 24457) | constructor (dispatcher) {
    method terminate (line 24472) | terminate (reason) {
    method abort (line 24483) | abort (error) {
  function fetch (line 24510) | function fetch (input, init = {}) {
  function finalizeAndReportTiming (line 24643) | function finalizeAndReportTiming (response, initiatorType = 'other') {
  function markResourceTiming (line 24706) | function markResourceTiming (timingInfo, originalURL, initiatorType, glo...
  function abortFetch (line 24713) | function abortFetch (p, request, responseObject, error) {
  function fetching (line 24758) | function fetching ({
  function mainFetch (line 24913) | async function mainFetch (fetchParams, recursive = false) {
  function schemeFetch (line 25165) | function schemeFetch (fetchParams) {
  function finalizeResponse (line 25282) | function finalizeResponse (fetchParams, response) {
  function fetchFinale (line 25295) | function fetchFinale (fetchParams, response) {
  function httpFetch (line 25386) | async function httpFetch (fetchParams) {
  function httpRedirectFetch (line 25489) | function httpRedirectFetch (fetchParams, response) {
  function httpNetworkOrCacheFetch (line 25633) | async function httpNetworkOrCacheFetch (
  function httpNetworkFetch (line 25963) | async function httpNetworkFetch (
  class Request (line 26585) | class Request {
    method constructor (line 20417) | constructor (origin, {
    method onBodySent (line 20593) | onBodySent (chunk) {
    method onRequestSent (line 20603) | onRequestSent () {
    method onConnect (line 20617) | onConnect (abort) {
    method onHeaders (line 20629) | onHeaders (statusCode, headers, resume, statusText) {
    method onData (line 20644) | onData (chunk) {
    method onUpgrade (line 20656) | onUpgrade (statusCode, headers, socket) {
    method onComplete (line 20663) | onComplete (trailers) {
    method onError (line 20681) | onError (error) {
    method onFinally (line 20696) | onFinally () {
    method addHeader (line 20709) | addHeader (key, value) {
    method [kHTTP1BuildRequest] (line 20714) | static [kHTTP1BuildRequest] (origin, opts, handler) {
    method [kHTTP2BuildRequest] (line 20720) | static [kHTTP2BuildRequest] (origin, opts, handler) {
    method [kHTTP2CopyHeaders] (line 20748) | static [kHTTP2CopyHeaders] (raw) {
    method constructor (line 26587) | constructor (input, init = {}) {
    method method (line 27079) | get method () {
    method url (line 27087) | get url () {
    method headers (line 27097) | get headers () {
    method destination (line 27106) | get destination () {
    method referrer (line 27118) | get referrer () {
    method referrerPolicy (line 27140) | get referrerPolicy () {
    method mode (line 27150) | get mode () {
    method credentials (line 27160) | get credentials () {
    method cache (line 27168) | get cache () {
    method redirect (line 27179) | get redirect () {
    method integrity (line 27189) | get integrity () {
    method keepalive (line 27199) | get keepalive () {
    method isReloadNavigation (line 27208) | get isReloadNavigation () {
    method isHistoryNavigation (line 27218) | get isHistoryNavigation () {
    method signal (line 27229) | get signal () {
    method body (line 27236) | get body () {
    method bodyUsed (line 27242) | get bodyUsed () {
    method duplex (line 27248) | get duplex () {
    method clone (line 27255) | clone () {
  function makeRequest (line 27297) | function makeRequest (init) {
  function cloneRequest (line 27345) | function cloneRequest (request) {
  class Response (line 27529) | class Response {
    method error (line 27531) | static error () {
    method json (line 27548) | static json (data, init = {}) {
    method redirect (line 27579) | static redirect (url, status = 302) {
    method constructor (line 27626) | constructor (body = null, init = {}) {
    method type (line 27661) | get type () {
    method url (line 27669) | get url () {
    method redirected (line 27687) | get redirected () {
    method status (line 27696) | get status () {
    method ok (line 27704) | get ok () {
    method statusText (line 27713) | get statusText () {
    method headers (line 27722) | get headers () {
    method body (line 27729) | get body () {
    method bodyUsed (line 27735) | get bodyUsed () {
    method clone (line 27742) | clone () {
  function cloneResponse (line 27795) | function cloneResponse (response) {
  function makeResponse (line 27821) | function makeResponse (init) {
  function makeNetworkError (line 27840) | function makeNetworkError (reason) {
  function makeFilteredResponse (line 27852) | function makeFilteredResponse (response, state) {
  function filterResponse (line 27871) | function filterResponse (response, type) {
  function makeAppropriateNetworkError (line 27925) | function makeAppropriateNetworkError (fetchParams, err = null) {
  function initializeResponse (line 27937) | function initializeResponse (response, init, body) {
  function responseURL (line 28116) | function responseURL (response) {
  function responseLocationURL (line 28126) | function responseLocationURL (response, requestFragment) {
  function requestCurrentURL (line 28153) | function requestCurrentURL (request) {
  function requestBadPort (line 28157) | function requestBadPort (request) {
  function isErrorLike (line 28171) | function isErrorLike (object) {
  function isValidReasonPhrase (line 28184) | function isValidReasonPhrase (statusText) {
  function isTokenCharCode (line 28206) | function isTokenCharCode (c) {
  function isValidHTTPToken (line 28236) | function isValidHTTPToken (characters) {
  function isValidHeaderName (line 28252) | function isValidHeaderName (potentialValue) {
  function isValidHeaderValue (line 28260) | function isValidHeaderValue (potentialValue) {
  function setRequestReferrerPolicyOnRedirect (line 28284) | function setRequestReferrerPolicyOnRedirect (request, actualResponse) {
  function crossOriginResourcePolicyCheck (line 28324) | function crossOriginResourcePolicyCheck () {
  function corsCheck (line 28330) | function corsCheck () {
  function TAOCheck (line 28336) | function TAOCheck () {
  function appendFetchMetadata (line 28341) | function appendFetchMetadata (httpRequest) {
  function appendRequestOriginHeader (line 28367) | function appendRequestOriginHeader (request) {
  function coarsenedSharedCurrentTime (line 28410) | function coarsenedSharedCurrentTime (crossOriginIsolatedCapability) {
  function createOpaqueTimingInfo (line 28416) | function createOpaqueTimingInfo (timingInfo) {
  function makePolicyContainer (line 28433) | function makePolicyContainer () {
  function clonePolicyContainer (line 28441) | function clonePolicyContainer (policyContainer) {
  function determineRequestsReferrer (line 28448) | function determineRequestsReferrer (request) {
  function stripURLForReferrer (line 28547) | function stripURLForReferrer (url, originOnly) {
  function isURLPotentiallyTrustworthy (line 28578) | function isURLPotentiallyTrustworthy (url) {
  function bytesMatch (line 28624) | function bytesMatch (bytes, metadataList) {
  function parseMetadata (line 28696) | function parseMetadata (metadata) {
  function getStrongestMetadata (line 28746) | function getStrongestMetadata (metadataList) {
  function filterMetadataListByAlgorithm (line 28775) | function filterMetadataListByAlgorithm (metadataList, algorithm) {
  function compareBase64Mixed (line 28800) | function compareBase64Mixed (actualValue, expectedValue) {
  function tryUpgradeRequestToAPotentiallyTrustworthyURL (line 28820) | function tryUpgradeRequestToAPotentiallyTrustworthyURL (request) {
  function sameOrigin (line 28829) | function sameOrigin (A, B) {
  function createDeferredPromise (line 28845) | function createDeferredPromise () {
  function isAborted (line 28856) | function isAborted (fetchParams) {
  function isCancelled (line 28860) | function isCancelled (fetchParams) {
  function normalizeMethod (line 28887) | function normalizeMethod (method) {
  function serializeJavascriptValueToJSONString (line 28892) | function serializeJavascriptValueToJSONString (value) {
  function makeIterator (line 28917) | function makeIterator (iterator, name, kind) {
  function iteratorResult (line 28980) | function iteratorResult (pair, kind) {
  function fullyReadBody (line 29024) | async function fullyReadBody (body, processBody, processBodyError) {
  function isReadableStreamLike (line 29060) | function isReadableStreamLike (stream) {
  function isomorphicDecode (line 29077) | function isomorphicDecode (input) {
  function readableStreamClose (line 29092) | function readableStreamClose (controller) {
  function isomorphicEncode (line 29107) | function isomorphicEncode (input) {
  function readAllBytes (line 29124) | async function readAllBytes (reader) {
  function urlIsLocal (line 29154) | function urlIsLocal (url) {
  function urlHasHttpsScheme (line 29165) | function urlHasHttpsScheme (url) {
  function urlIsHttpHttpsScheme (line 29177) | function urlIsHttpHttpsScheme (url) {
  function getEncoding (line 29905) | function getEncoding (label) {
  class FileReader (line 30214) | class FileReader extends EventTarget {
    method constructor (line 30215) | constructor () {
    method readAsArrayBuffer (line 30235) | readAsArrayBuffer (blob) {
    method readAsBinaryString (line 30251) | readAsBinaryString (blob) {
    method readAsText (line 30268) | readAsText (blob, encoding = undefined) {
    method readAsDataURL (line 30288) | readAsDataURL (blob) {
    method abort (line 30303) | abort () {
    method readyState (line 30340) | get readyState () {
    method result (line 30353) | get result () {
    method error (line 30364) | get error () {
    method onloadend (line 30372) | get onloadend () {
    method onloadend (line 30378) | set onloadend (fn) {
    method onerror (line 30393) | get onerror () {
    method onerror (line 30399) | set onerror (fn) {
    method onloadstart (line 30414) | get onloadstart () {
    method onloadstart (line 30420) | set onloadstart (fn) {
    method onprogress (line 30435) | get onprogress () {
    method onprogress (line 30441) | set onprogress (fn) {
    method onload (line 30456) | get onload () {
    method onload (line 30462) | set onload (fn) {
    method onabort (line 30477) | get onabort () {
    method onabort (line 30483) | set onabort (fn) {
  class ProgressEvent (line 30558) | class ProgressEvent extends Event {
    method constructor (line 30559) | constructor (type, eventInitDict = {}) {
    method lengthComputable (line 30572) | get lengthComputable () {
    method loaded (line 30578) | get loaded () {
    method total (line 30584) | get total () {
  function readOperation (line 30684) | function readOperation (fr, blob, type, encodingName) {
  function fireAProgressEvent (line 30850) | function fireAProgressEvent (e, reader) {
  function packageData (line 30868) | function packageData (bytes, type, mimeType, encodingName) {
  function decode (line 30970) | function decode (ioQueue, encoding) {
  function BOMSniffing (line 31002) | function BOMSniffing (ioQueue) {
  function combineByteSequences (line 31026) | function combineByteSequences (sequences) {
  function setGlobalDispatcher (line 31065) | function setGlobalDispatcher (agent) {
  function getGlobalDispatcher (line 31077) | function getGlobalDispatcher () {
  method constructor (line 31096) | constructor (handler) {
  method onConnect (line 31100) | onConnect (...args) {
  method onError (line 31104) | onError (...args) {
  method onUpgrade (line 31108) | onUpgrade (...args) {
  method onHeaders (line 31112) | onHeaders (...args) {
  method onData (line 31116) | onData (...args) {
  method onComplete (line 31120) | onComplete (...args) {
  method onBodySent (line 31124) | onBodySent (...args) {
  class BodyAsyncIterable (line 31148) | class BodyAsyncIterable {
    method constructor (line 31149) | constructor (body) {
  method [Symbol.asyncIterator] (line 31154) | async * [Symbol.asyncIterator] () {
  class RedirectHandler (line 31161) | class RedirectHandler {
    method constructor (line 31162) | constructor (dispatch, maxRedirections, opts, handler) {
    method onConnect (line 31211) | onConnect (abort) {
    method onUpgrade (line 31216) | onUpgrade (statusCode, headers, socket) {
    method onError (line 31220) | onError (error) {
    method onHeaders (line 31224) | onHeaders (statusCode, headers, resume, statusText) {
    method onData (line 31257) | onData (chunk) {
    method onComplete (line 31281) | onComplete (trailers) {
    method onBodySent (line 31301) | onBodySent (chunk) {
  function parseLocation (line 31308) | function parseLocation (statusCode, headers) {
  function shouldRemoveHeader (line 31321) | function shouldRemoveHeader (header, removeContent, unknownOrigin) {
  function cleanRequestHeaders (line 31336) | function cleanRequestHeaders (headers, removeContent, unknownOrigin) {
  function calculateRetryAfterHeader (line 31370) | function calculateRetryAfterHeader (retryAfter) {
  class RetryHandler (line 31377) | class RetryHandler {
    method constructor (line 31378) | constructor (opts, handlers) {
    method onRequestSent (line 31440) | onRequestSent () {
    method onUpgrade (line 31446) | onUpgrade (statusCode, headers, socket) {
    method onConnect (line 31452) | onConnect (abort) {
    method onBodySent (line 31460) | onBodySent (chunk) {
    method [kRetryHandlerDefaultRetry] (line 31464) | static [kRetryHandlerDefaultRetry] (err, { state, opts }, cb) {
    method onHeaders (line 31532) | onHeaders (statusCode, rawHeaders, resume, statusMessage) {
    method onData (line 31650) | onData (chunk) {
    method onComplete (line 31656) | onComplete (rawTrailers) {
    method onError (line 31661) | onError (err) {
  function createRedirectInterceptor (line 31712) | function createRedirectInterceptor ({ maxRedirections: defaultMaxRedirec...
  function enumToMap (line 32041) | function enumToMap(obj) {
  class FakeWeakRef (line 32083) | class FakeWeakRef {
    method constructor (line 32084) | constructor (value) {
    method deref (line 32088) | deref () {
  class MockAgent (line 32093) | class MockAgent extends Dispatcher {
    method constructor (line 32094) | constructor (opts) {
    method get (line 32111) | get (origin) {
    method dispatch (line 32121) | dispatch (opts, handler) {
    method close (line 32127) | async close () {
    method deactivate (line 32132) | deactivate () {
    method activate (line 32136) | activate () {
    method enableNetConnect (line 32140) | enableNetConnect (matcher) {
    method disableNetConnect (line 32154) | disableNetConnect () {
    method isMockActive (line 32160) | get isMockActive () {
    method [kMockAgentSet] (line 32164) | [kMockAgentSet] (origin, dispatcher) {
    method [kFactory] (line 32168) | [kFactory] (origin) {
    method [kMockAgentGet] (line 32175) | [kMockAgentGet] (origin) {
    method [kGetNetConnect] (line 32201) | [kGetNetConnect] () {
    method pendingInterceptors (line 32205) | pendingInterceptors () {
    method assertNoPendingInterceptors (line 32213) | assertNoPendingInterceptors ({ pendingInterceptorsFormatter = new Pend...
  class MockClient (line 32260) | class MockClient extends Client {
    method constructor (line 32261) | constructor (origin, opts) {
    method intercept (line 32286) | intercept (opts) {
    method [kClose] (line 32290) | async [kClose] () {
  method [Symbols.kConnected] (line 32279) | get [Symbols.kConnected] () {
  class MockNotMatchedError (line 32310) | class MockNotMatchedError extends UndiciError {
    method constructor (line 32311) | constructor (message) {
  class MockScope (line 32348) | class MockScope {
    method constructor (line 32349) | constructor (mockDispatch) {
    method delay (line 32356) | delay (waitInMs) {
    method persist (line 32368) | persist () {
    method times (line 32376) | times (repeatTimes) {
  class MockInterceptor (line 32389) | class MockInterceptor {
    method constructor (line 32390) | constructor (opts, mockDispatches) {
    method createMockScopeDispatchData (line 32423) | createMockScopeDispatchData (statusCode, data, responseOptions = {}) {
    method validateReplyParameters (line 32432) | validateReplyParameters (statusCode, data, responseOptions) {
    method reply (line 32447) | reply (replyData) {
    method replyWithError (line 32493) | replyWithError (error) {
    method defaultReplyHeaders (line 32505) | defaultReplyHeaders (headers) {
    method defaultReplyTrailers (line 32517) | defaultReplyTrailers (trailers) {
    method replyContentLength (line 32529) | replyContentLength () {
  class MockPool (line 32566) | class MockPool extends Pool {
    method constructor (line 32567) | constructor (origin, opts) {
    method intercept (line 32592) | intercept (opts) {
    method [kClose] (line 32596) | async [kClose] () {
  method [Symbols.kConnected] (line 32585) | get [Symbols.kConnected] () {
  function matchValue (line 32661) | function matchValue (match, value) {
  function lowerCaseEntries (line 32674) | function lowerCaseEntries (headers) {
  function getHeaderByName (line 32686) | function getHeaderByName (headers, key) {
  function buildHeadersFromArray (line 32703) | function buildHeadersFromArray (headers) { // fetch HeadersList
  function matchHeaders (line 32712) | function matchHeaders (mockDispatch, headers) {
  function safeUrl (line 32736) | function safeUrl (path) {
  function matchKey (line 32752) | function matchKey (mockDispatch, { path, method, body, headers }) {
  function getResponseData (line 32760) | function getResponseData (data) {
  function getMockDispatch (line 32770) | function getMockDispatch (mockDispatches, key) {
  function addMockDispatch (line 32801) | function addMockDispatch (mockDispatches, key, data) {
  function deleteMockDispatch (line 32809) | function deleteMockDispatch (mockDispatches, key) {
  function buildKey (line 32821) | function buildKey (opts) {
  function generateKeyValues (line 32832) | function generateKeyValues (data) {
  function getStatusText (line 32844) | function getStatusText (statusCode) {
  function getResponse (line 32848) | async function getResponse (body) {
  function mockDispatch (line 32859) | function mockDispatch (opts, handler) {
  function buildMockDispatch (line 32931) | function buildMockDispatch () {
  function checkNetConnect (line 32961) | function checkNetConnect (netConnect, origin) {
  function buildMockOptions (line 32971) | function buildMockOptions (opts) {
  method constructor (line 33011) | constructor ({ disableColors } = {}) {
  method format (line 33026) | format (pendingInterceptors) {
  method constructor (line 33067) | constructor (singular, plural) {
  method pluralize (line 33072) | pluralize (count) {
  class FixedCircularBuffer (line 33145) | class FixedCircularBuffer {
    method constructor (line 33146) | constructor() {
    method isEmpty (line 33153) | isEmpty() {
    method isFull (line 33157) | isFull() {
    method push (line 33161) | push(data) {
    method shift (line 33166) | shift() {
  method constructor (line 33177) | constructor() {
  method isEmpty (line 33181) | isEmpty() {
  method push (line 33185) | push(data) {
  method shift (line 33194) | shift() {
  class PoolBase (line 33232) | class PoolBase extends DispatcherBase {
    method constructor (line 33233) | constructor () {
    method [kBusy] (line 33285) | get [kBusy] () {
    method [kConnected] (line 33289) | get [kConnected] () {
    method [kFree] (line 33293) | get [kFree] () {
    method [kPending] (line 33297) | get [kPending] () {
    method [kRunning] (line 33305) | get [kRunning] () {
    method [kSize] (line 33313) | get [kSize] () {
    method stats (line 33321) | get stats () {
    method [kClose] (line 33325) | async [kClose] () {
    method [kDestroy] (line 33335) | async [kDestroy] (err) {
    method [kDispatch] (line 33347) | [kDispatch] (opts, handler) {
    method [kAddClient] (line 33362) | [kAddClient] (client) {
    method [kRemoveClient] (line 33382) | [kRemoveClient] (client) {
  class PoolStats (line 33416) | class PoolStats {
    method constructor (line 33417) | constructor (pool) {
    method connected (line 33421) | get connected () {
    method free (line 33425) | get free () {
    method pending (line 33429) | get pending () {
    method queued (line 33433) | get queued () {
    method running (line 33437) | get running () {
    method size (line 33441) | get size () {
  function defaultFactory (line 33476) | function defaultFactory (origin, opts) {
  class Pool (line 33480) | class Pool extends PoolBase {
    method constructor (line 33481) | constructor (origin, {
    method [kGetDispatcher] (line 33546) | [kGetDispatcher] () {
  function defaultProtocolPort (line 33588) | function defaultProtocolPort (protocol) {
  function buildProxyOptions (line 33592) | function buildProxyOptions (opts) {
  function defaultFactory (line 33607) | function defaultFactory (origin, opts) {
  class ProxyAgent (line 33611) | class ProxyAgent extends DispatcherBase {
    method constructor (line 33612) | constructor (opts) {
    method dispatch (line 33695) | dispatch (opts, handler) {
    method [kClose] (line 33711) | async [kClose] () {
    method [kDestroy] (line 33716) | async [kDestroy] () {
  function buildHeaders (line 33726) | function buildHeaders (headers) {
  function throwIfProxyAuthIsSent (line 33751) | function throwIfProxyAuthIsSent (headers) {
  function onTimeout (line 33775) | function onTimeout () {
  function refreshTimeout (line 33808) | function refreshTimeout () {
  class Timeout (line 33820) | class Timeout {
    method constructor (line 33821) | constructor (callback, delay, opaque) {
    method refresh (line 33835) | refresh () {
    method clear (line 33846) | clear () {
  method setTimeout (line 33852) | setTimeout (callback, delay, opaque) {
  method clearTimeout (line 33857) | clearTimeout (timeout) {
  function establishWebSocketConnection (line 33912) | function establishWebSocketConnection (url, protocols, ws, onEstablish, ...
  function onSocketData (line 34084) | function onSocketData (chunk) {
  function onSocketClose (line 34094) | function onSocketClose () {
  function onSocketError (line 34149) | function onSocketError (error) {
  class MessageEvent (line 34240) | class MessageEvent extends Event {
    method constructor (line 34243) | constructor (type, eventInitDict = {}) {
    method data (line 34254) | get data () {
    method origin (line 34260) | get origin () {
    method lastEventId (line 34266) | get lastEventId () {
    method source (line 34272) | get source () {
    method ports (line 34278) | get ports () {
    method initMessageEvent (line 34288) | initMessageEvent (
  class CloseEvent (line 34311) | class CloseEvent extends Event {
    method constructor (line 34314) | constructor (type, eventInitDict = {}) {
    method wasClean (line 34325) | get wasClean () {
    method code (line 34331) | get code () {
    method reason (line 34337) | get reason () {
  class ErrorEvent (line 34345) | class ErrorEvent extends Event {
    method constructor (line 34348) | constructor (type, eventInitDict) {
    method message (line 34359) | get message () {
    method filename (line 34365) | get filename () {
    method lineno (line 34371) | get lineno () {
    method colno (line 34377) | get colno () {
    method error (line 34383) | get error () {
  method defaultValue (line 34476) | get defaultValue () {
  class WebsocketFrameSend (line 34554) | class WebsocketFrameSend {
    method constructor (line 34558) | constructor (data) {
    method createFrame (line 34563) | createFrame (opcode) {
  class ByteParser (line 34641) | class ByteParser extends Writable {
    method constructor (line 34650) | constructor (ws) {
    method _write (line 34660) | _write (chunk, _, callback) {
    method run (line 34672) | run (callback) {
    method consume (line 34879) | consume (n) {
    method parseCloseBody (line 34916) | parseCloseBody (onlyCode, data) {
    method closingInfo (line 34959) | get closingInfo () {
  function isEstablished (line 35006) | function isEstablished (ws) {
  function isClosing (line 35016) | function isClosing (ws) {
  function isClosed (line 35026) | function isClosed (ws) {
  function fireEvent (line 35036) | function fireEvent (e, target, eventConstructor = Event, eventInitDict) {
  function websocketMessageReceived (line 35058) | function websocketMessageReceived (ws, type, data) {
  function isValidSubprotocol (line 35105) | function isValidSubprotocol (protocol) {
  function isValidStatusCode (line 35153) | function isValidStatusCode (code) {
  function failWebsocketConnection (line 35169) | function failWebsocketConnection (ws, reason) {
  class WebSocket (line 35230) | class WebSocket extends EventTarget {
    method constructor (line 35246) | constructor (url, protocols = []) {
    method close (line 35352) | close (code = undefined, reason = undefined) {
    method send (line 35455) | send (data) {
    method readyState (line 35570) | get readyState () {
    method bufferedAmount (line 35577) | get bufferedAmount () {
    method url (line 35583) | get url () {
    method extensions (line 35590) | get extensions () {
    method protocol (line 35596) | get protocol () {
    method onopen (line 35602) | get onopen () {
    method onopen (line 35608) | set onopen (fn) {
    method onerror (line 35623) | get onerror () {
    method onerror (line 35629) | set onerror (fn) {
    method onclose (line 35644) | get onclose () {
    method onclose (line 35650) | set onclose (fn) {
    method onmessage (line 35665) | get onmessage () {
    method onmessage (line 35671) | set onmessage (fn) {
    method binaryType (line 35686) | get binaryType () {
    method binaryType (line 35692) | set binaryType (type) {
    method #onConnectionEstablished (line 35705) | #onConnectionEstablished (response) {
  method defaultValue (line 35802) | get defaultValue () {
  method defaultValue (line 35809) | get defaultValue () {
  function getUserAgent (line 35856) | function getUserAgent() {
  function _interopRequireDefault (line 35956) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function _interopRequireDefault (line 35973) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function md5 (line 35975) | function md5(bytes) {
  function _interopRequireDefault (line 36003) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function _interopRequireDefault (line 36040) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function parse (line 36042) | function parse(uuid) {
  function _interopRequireDefault (line 36107) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function rng (line 36113) | function rng() {
  function _interopRequireDefault (line 36138) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function sha1 (line 36140) | function sha1(bytes) {
  function _interopRequireDefault (line 36169) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function unsafeStringify (line 36181) | function unsafeStringify(arr, offset = 0) {
  function stringify (line 36187) | function stringify(arr, offset = 0) {
  function _interopRequireDefault (line 36221) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function v1 (line 36235) | function v1(options, buf, offset) {
  function _interopRequireDefault (line 36335) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function _interopRequireDefault (line 36359) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function stringToBytes (line 36361) | function stringToBytes(str) {
  function v35 (line 36378) | function v35(name, version, hashfunc) {
  function _interopRequireDefault (line 36447) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function v4 (line 36449) | function v4(options, buf, offset) {
  function _interopRequireDefault (line 36495) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function _interopRequireDefault (line 36516) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function validate (line 36518) | function validate(uuid) {
  function _interopRequireDefault (line 36540) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
  function version (line 36542) | function version(uuid) {
  function wrappy (line 36564) | function wrappy (fn, cb) {
  function Dicer (line 36862) | function Dicer (cfg) {
  function HeaderParser (line 37080) | function HeaderParser (cfg) {
  function PartStream (line 37181) | function PartStream (opts) {
  function SBMH (line 37228) | function SBMH (needle) {
  function Busboy (line 37443) | function Busboy (opts) {
  function Multipart (line 37552) | function Multipart (boy, cfg) {
  function skipPart (line 37815) | function skipPart (part) {
  function FileStream (line 37819) | function FileStream (opts) {
  function UrlEncoded (line 37849) | function UrlEncoded (boy, cfg) {
  function Decoder (line 38053) | function Decoder () {
  function getDecoder (line 38131) | function getDecoder (charset) {
  function decodeText (line 38228) | function decodeText (text, sourceEncoding, destEncoding) {
  function encodedReplacer (line 38375) | function encodedReplacer (match) {
  function parseParams (line 38384) | function parseParams (str) {
  function __nccwpck_require__ (line 38474) | function __nccwpck_require__(moduleId) {

FILE: src/fs-helper.ts
  function directoryExistsSync (line 3) | function directoryExistsSync(path: string, required?: boolean): boolean {
  function existsSync (line 36) | function existsSync(path: string): boolean {
  function fileExistsSync (line 58) | function fileExistsSync(path: string): boolean {

FILE: src/git-auth-helper.ts
  constant IS_WINDOWS (line 15) | const IS_WINDOWS = process.platform === 'win32'
  constant SSH_COMMAND_KEY (line 16) | const SSH_COMMAND_KEY = 'core.sshCommand'
  type IGitAuthHelper (line 18) | interface IGitAuthHelper {
  function createAuthHelper (line 27) | function createAuthHelper(
  class GitAuthHelper (line 34) | class GitAuthHelper {
    method constructor (line 48) | constructor(
    method configureAuth (line 76) | async configureAuth(): Promise<void> {
    method configureTempGlobalConfig (line 85) | async configureTempGlobalConfig(): Promise<string> {
    method configureGlobalAuth (line 128) | async configureGlobalAuth(): Promise<void> {
    method configureSubmoduleAuth (line 157) | async configureSubmoduleAuth(): Promise<void> {
    method removeAuth (line 233) | async removeAuth(): Promise<void> {
    method removeGlobalConfig (line 238) | async removeGlobalConfig(): Promise<void> {
    method configureSsh (line 250) | private async configureSsh(): Promise<void> {
    method configureToken (line 326) | private async configureToken(globalConfig?: boolean): Promise<void> {
    method getCredentialsConfigPath (line 416) | private getCredentialsConfigPath(): string {
    method removeSsh (line 436) | private async removeSsh(): Promise<void> {
    method removeToken (line 472) | private async removeToken(): Promise<void> {
    method removeGitConfig (line 521) | private async removeGitConfig(configKey: string): Promise<void> {
    method removeSubmoduleGitConfig (line 535) | private async removeSubmoduleGitConfig(configKey: string): Promise<voi...
    method removeIncludeIfCredentials (line 549) | private async removeIncludeIfCredentials(
    method testCredentialsConfigPath (line 596) | private testCredentialsConfigPath(path: string): boolean {

FILE: src/git-command-manager.ts
  type IGitCommandManager (line 18) | interface IGitCommandManager {
  function createCommandManager (line 85) | async function createCommandManager(
  class GitCommandManager (line 97) | class GitCommandManager {
    method constructor (line 109) | private constructor() {}
    method branchDelete (line 111) | async branchDelete(remote: boolean, branch: string): Promise<void> {
    method branchExists (line 121) | async branchExists(remote: boolean, pattern: string): Promise<boolean> {
    method branchList (line 132) | async branchList(remote: boolean): Promise<string[]> {
    method disableSparseCheckout (line 196) | async disableSparseCheckout(): Promise<void> {
    method sparseCheckout (line 202) | async sparseCheckout(sparseCheckout: string[]): Promise<void> {
    method sparseCheckoutNonConeMode (line 206) | async sparseCheckoutNonConeMode(sparseCheckout: string[]): Promise<voi...
    method checkout (line 223) | async checkout(ref: string, startPoint: string): Promise<void> {
    method checkoutDetach (line 234) | async checkoutDetach(): Promise<void> {
    method config (line 239) | async config(
    method configExists (line 259) | async configExists(
    method fetch (line 277) | async fetch(
    method getDefaultBranch (line 320) | async getDefaultBranch(repositoryUrl: string): Promise<string> {
    method getSubmoduleConfigPaths (line 348) | async getSubmoduleConfigPaths(recursive: boolean): Promise<string[]> {
    method getWorkingDirectory (line 363) | getWorkingDirectory(): string {
    method init (line 367) | async init(): Promise<void> {
    method isDetached (line 371) | async isDetached(): Promise<boolean> {
    method lfsFetch (line 380) | async lfsFetch(ref: string): Promise<void> {
    method lfsInstall (line 389) | async lfsInstall(): Promise<void> {
    method log1 (line 393) | async log1(format?: string): Promise<string> {
    method remoteAdd (line 400) | async remoteAdd(remoteName: string, remoteUrl: string): Promise<void> {
    method removeEnvironmentVariable (line 404) | removeEnvironmentVariable(name: string): void {
    method revParse (line 414) | async revParse(ref: string): Promise<string> {
    method setEnvironmentVariable (line 419) | setEnvironmentVariable(name: string, value: string): void {
    method shaExists (line 423) | async shaExists(sha: string): Promise<boolean> {
    method submoduleForeach (line 429) | async submoduleForeach(command: string, recursive: boolean): Promise<s...
    method submoduleSync (line 440) | async submoduleSync(recursive: boolean): Promise<void> {
    method submoduleUpdate (line 449) | async submoduleUpdate(fetchDepth: number, recursive: boolean): Promise...
    method submoduleStatus (line 463) | async submoduleStatus(): Promise<boolean> {
    method tagExists (line 469) | async tagExists(pattern: string): Promise<boolean> {
    method tryClean (line 474) | async tryClean(): Promise<boolean> {
    method tryConfigUnset (line 479) | async tryConfigUnset(
    method tryConfigUnsetValue (line 495) | async tryConfigUnsetValue(
    method tryDisableAutomaticGarbageCollection (line 513) | async tryDisableAutomaticGarbageCollection(): Promise<boolean> {
    method tryGetFetchUrl (line 521) | async tryGetFetchUrl(): Promise<string> {
    method tryGetConfigValues (line 539) | async tryGetConfigValues(
    method tryGetConfigKeys (line 564) | async tryGetConfigKeys(
    method tryReset (line 589) | async tryReset(): Promise<boolean> {
    method version (line 594) | async version(): Promise<GitVersion> {
    method createCommandManager (line 598) | static async createCommandManager(
    method execGit (line 612) | private async execGit(
    method initializeCommandManager (line 656) | private async initializeCommandManager(
  class GitOutput (line 749) | class GitOutput {

FILE: src/git-directory-helper.ts
  function prepareExistingDirectory (line 9) | async function prepareExistingDirectory(

FILE: src/git-source-provider.ts
  function getSource (line 18) | async function getSource(settings: IGitSourceSettings): Promise<void> {
  function cleanup (line 312) | async function cleanup(repositoryPath: string): Promise<void> {
  function getGitCommandManager (line 356) | async function getGitCommandManager(

FILE: src/git-source-settings.ts
  type IGitSourceSettings (line 1) | interface IGitSourceSettings {

FILE: src/git-version.ts
  class GitVersion (line 1) | class GitVersion {
    method constructor (line 10) | constructor(version?: string) {
    method checkMinimum (line 27) | checkMinimum(minimum: GitVersion): boolean {
    method isValid (line 59) | isValid(): boolean {
    method toString (line 66) | toString(): string {

FILE: src/github-api-helper.ts
  constant IS_WINDOWS (line 12) | const IS_WINDOWS = process.platform === 'win32'
  function downloadRepository (line 14) | async function downloadRepository(
  function getDefaultBranch (line 82) | async function getDefaultBranch(
  function downloadArchive (line 125) | async function downloadArchive(

FILE: src/input-helper.ts
  function getInputs (line 8) | async function getInputs(): Promise<IGitSourceSettings> {

FILE: src/main.ts
  function run (line 8) | async function run(): Promise<void> {
  function cleanup (line 32) | async function cleanup(): Promise<void> {

FILE: src/misc/generate-docs.ts
  function updateUsage (line 11) | function updateUsage(

FILE: src/ref-helper.ts
  type ICheckoutInfo (line 8) | interface ICheckoutInfo {
  function getCheckoutInfo (line 13) | async function getCheckoutInfo(
  function getRefSpecForAllHistory (line 69) | function getRefSpecForAllHistory(ref: string, commit: string): string[] {
  function getRefSpec (line 79) | function getRefSpec(
  function testRef (line 153) | async function testRef(
  function checkCommitInfo (line 206) | async function checkCommitInfo(
  function fromPayload (line 293) | function fromPayload(path: string): any {
  function select (line 297) | function select(obj: any, path: string): any {

FILE: src/regexp-helper.ts
  function escape (line 1) | function escape(value: string): string {

FILE: src/retry-helper.ts
  class RetryHelper (line 7) | class RetryHelper {
    method constructor (line 12) | constructor(
    method execute (line 25) | async execute<T>(action: () => Promise<T>): Promise<T> {
    method getSleepAmount (line 46) | private getSleepAmount(): number {
    method sleep (line 53) | private async sleep(seconds: number): Promise<void> {
  function execute (line 58) | async function execute<T>(action: () => Promise<T>): Promise<T> {

FILE: src/state-helper.ts
  function setRepositoryPath (line 31) | function setRepositoryPath(repositoryPath: string) {
  function setSshKeyPath (line 38) | function setSshKeyPath(sshKeyPath: string) {
  function setSshKnownHostsPath (line 45) | function setSshKnownHostsPath(sshKnownHostsPath: string) {
  function setSafeDirectory (line 52) | function setSafeDirectory() {

FILE: src/url-helper.ts
  function getFetchUrl (line 5) | function getFetchUrl(settings: IGitSourceSettings): string {
  function getServerUrl (line 23) | function getServerUrl(url?: string): URL {
  function getServerApiUrl (line 32) | function getServerApiUrl(url?: string): string {
  function isGhes (line 47) | function isGhes(url?: string): boolean {
  function pruneSuffix (line 60) | function pruneSuffix(text: string, suffix: string) {
  type WhitespaceMode (line 67) | enum WhitespaceMode {
  function hasContent (line 72) | function hasContent(

FILE: src/workflow-context-helper.ts
  function getOrganizationId (line 7) | async function getOrganizationId(): Promise<number | undefined> {
Condensed preview — 103 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,738K chars).
[
  {
    "path": ".eslintignore",
    "chars": 25,
    "preview": "dist/\nlib/\nnode_modules/\n"
  },
  {
    "path": ".eslintrc.json",
    "chars": 2260,
    "preview": "{\n  \"plugins\": [\"jest\", \"@typescript-eslint\"],\n  \"extends\": [\"plugin:github/recommended\"],\n  \"parser\": \"@typescript-esli"
  },
  {
    "path": ".gitattributes",
    "chars": 42,
    "preview": ".licenses/** -diff linguist-generated=true"
  },
  {
    "path": ".github/dependabot.yml",
    "chars": 539,
    "preview": "---\nversion: 2\n\nupdates:\n- package-ecosystem: \"npm\"\n  directory: \"/\"\n  schedule:\n    interval: \"weekly\"\n  groups:\n    mi"
  },
  {
    "path": ".github/workflows/check-dist.yml",
    "chars": 1370,
    "preview": "# `dist/index.js` is a special file in Actions.\n# When you reference an action with `uses:` in a workflow,\n# `index.js` "
  },
  {
    "path": ".github/workflows/codeql-analysis.yml",
    "chars": 1939,
    "preview": "# For most projects, this workflow file will not need changing; you simply need\n# to commit it to your repository.\n#\n# Y"
  },
  {
    "path": ".github/workflows/licensed.yml",
    "chars": 245,
    "preview": "name: Licensed\n\non:\n  push: {branches: main}\n  pull_request: {branches: main}\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n"
  },
  {
    "path": ".github/workflows/publish-immutable-actions.yml",
    "chars": 375,
    "preview": "name: 'Publish Immutable Action Version'\n\non:\n  release:\n    types: [published]\n\njobs:\n  publish:\n    runs-on: ubuntu-la"
  },
  {
    "path": ".github/workflows/test.yml",
    "chars": 9656,
    "preview": "name: Build and Test\n\non:\n  pull_request:\n  push:\n    branches:\n      - main\n      - releases/*\n\n\n# Note that when you s"
  },
  {
    "path": ".github/workflows/update-main-version.yml",
    "chars": 1127,
    "preview": "name: Update Main Version\nrun-name: Move ${{ github.event.inputs.major_version }} to ${{ github.event.inputs.target }}\n\n"
  },
  {
    "path": ".github/workflows/update-test-ubuntu-git.yml",
    "chars": 2259,
    "preview": "name: Publish test-ubuntu-git Container\n\non:\n  # Use an on demand workflow trigger.  \n  # (Forked copies of actions/chec"
  },
  {
    "path": ".gitignore",
    "chars": 49,
    "preview": "__test__/_temp\n_temp/\nlib/\nnode_modules/\n.vscode/"
  },
  {
    "path": ".licensed.yml",
    "chars": 139,
    "preview": "sources:\n  npm: true\n\nallowed:\n  - apache-2.0\n  - bsd-2-clause\n  - bsd-3-clause\n  - isc\n  - mit\n  - cc0-1.0\n  - unlicens"
  },
  {
    "path": ".licenses/npm/@actions/core.dep.yml",
    "chars": 1304,
    "preview": "---\nname: \"@actions/core\"\nversion: 1.10.1\ntype: npm\nsummary: Actions core lib\nhomepage: https://github.com/actions/toolk"
  },
  {
    "path": ".licenses/npm/@actions/exec.dep.yml",
    "chars": 1303,
    "preview": "---\nname: \"@actions/exec\"\nversion: 1.1.1\ntype: npm\nsummary: Actions exec lib\nhomepage: https://github.com/actions/toolki"
  },
  {
    "path": ".licenses/npm/@actions/github.dep.yml",
    "chars": 1309,
    "preview": "---\nname: \"@actions/github\"\nversion: 6.0.0\ntype: npm\nsummary: Actions github lib\nhomepage: https://github.com/actions/to"
  },
  {
    "path": ".licenses/npm/@actions/http-client.dep.yml",
    "chars": 1406,
    "preview": "---\nname: \"@actions/http-client\"\nversion: 2.2.1\ntype: npm\nsummary: Actions Http Client\nhomepage: https://github.com/acti"
  },
  {
    "path": ".licenses/npm/@actions/io.dep.yml",
    "chars": 1297,
    "preview": "---\nname: \"@actions/io\"\nversion: 1.1.3\ntype: npm\nsummary: Actions io lib\nhomepage: https://github.com/actions/toolkit/tr"
  },
  {
    "path": ".licenses/npm/@actions/tool-cache.dep.yml",
    "chars": 1321,
    "preview": "---\nname: \"@actions/tool-cache\"\nversion: 2.0.1\ntype: npm\nsummary: Actions tool-cache lib\nhomepage: https://github.com/ac"
  },
  {
    "path": ".licenses/npm/@fastify/busboy.dep.yml",
    "chars": 1320,
    "preview": "---\nname: \"@fastify/busboy\"\nversion: 2.1.1\ntype: npm\nsummary: A streaming parser for HTML form data for node.js\nhomepage"
  },
  {
    "path": ".licenses/npm/@octokit/auth-token.dep.yml",
    "chars": 1393,
    "preview": "---\nname: \"@octokit/auth-token\"\nversion: 4.0.0\ntype: npm\nsummary: GitHub API token authentication for browsers and Node."
  },
  {
    "path": ".licenses/npm/@octokit/core.dep.yml",
    "chars": 1381,
    "preview": "---\nname: \"@octokit/core\"\nversion: 5.2.0\ntype: npm\nsummary: Extendable client for GitHub's REST & GraphQL APIs\nhomepage:"
  },
  {
    "path": ".licenses/npm/@octokit/endpoint.dep.yml",
    "chars": 1387,
    "preview": "---\nname: \"@octokit/endpoint\"\nversion: 9.0.6\ntype: npm\nsummary: Turns REST API endpoints into generic request options\nho"
  },
  {
    "path": ".licenses/npm/@octokit/graphql.dep.yml",
    "chars": 1381,
    "preview": "---\nname: \"@octokit/graphql\"\nversion: 7.1.0\ntype: npm\nsummary: GitHub GraphQL API client for browsers and Node\nhomepage:"
  },
  {
    "path": ".licenses/npm/@octokit/openapi-types-20.0.0.dep.yml",
    "chars": 1346,
    "preview": "---\nname: \"@octokit/openapi-types\"\nversion: 20.0.0\ntype: npm\nsummary: Generated TypeScript definitions based on GitHub's"
  },
  {
    "path": ".licenses/npm/@octokit/openapi-types-22.1.0.dep.yml",
    "chars": 1346,
    "preview": "---\nname: \"@octokit/openapi-types\"\nversion: 22.1.0\ntype: npm\nsummary: Generated TypeScript definitions based on GitHub's"
  },
  {
    "path": ".licenses/npm/@octokit/plugin-paginate-rest.dep.yml",
    "chars": 1374,
    "preview": "---\nname: \"@octokit/plugin-paginate-rest\"\nversion: 9.2.2\ntype: npm\nsummary: Octokit plugin to paginate REST API endpoint"
  },
  {
    "path": ".licenses/npm/@octokit/plugin-rest-endpoint-methods.dep.yml",
    "chars": 1407,
    "preview": "---\nname: \"@octokit/plugin-rest-endpoint-methods\"\nversion: 10.4.1\ntype: npm\nsummary: Octokit plugin adding one method fo"
  },
  {
    "path": ".licenses/npm/@octokit/request-error.dep.yml",
    "chars": 1377,
    "preview": "---\nname: \"@octokit/request-error\"\nversion: 5.1.1\ntype: npm\nsummary: Error class for Octokit request errors\nhomepage:\nli"
  },
  {
    "path": ".licenses/npm/@octokit/request.dep.yml",
    "chars": 1423,
    "preview": "---\nname: \"@octokit/request\"\nversion: 8.4.1\ntype: npm\nsummary: Send parameterized requests to GitHub's APIs with sensibl"
  },
  {
    "path": ".licenses/npm/@octokit/types-12.6.0.dep.yml",
    "chars": 1357,
    "preview": "---\nname: \"@octokit/types\"\nversion: 12.6.0\ntype: npm\nsummary: Shared TypeScript definitions for Octokit projects\nhomepag"
  },
  {
    "path": ".licenses/npm/@octokit/types-13.4.1.dep.yml",
    "chars": 1357,
    "preview": "---\nname: \"@octokit/types\"\nversion: 13.4.1\ntype: npm\nsummary: Shared TypeScript definitions for Octokit projects\nhomepag"
  },
  {
    "path": ".licenses/npm/before-after-hook.dep.yml",
    "chars": 12308,
    "preview": "---\nname: before-after-hook\nversion: 2.2.3\ntype: npm\nsummary: asynchronous before/error/after hooks for internal functio"
  },
  {
    "path": ".licenses/npm/deprecation.dep.yml",
    "chars": 1066,
    "preview": "---\nname: deprecation\nversion: 2.3.1\ntype: npm\nsummary: Log a deprecation message with stack\nhomepage: https://github.co"
  },
  {
    "path": ".licenses/npm/once.dep.yml",
    "chars": 1006,
    "preview": "---\nname: once\nversion: 1.4.0\ntype: npm\nsummary: Run a function exactly one time\nhomepage: https://github.com/isaacs/onc"
  },
  {
    "path": ".licenses/npm/semver.dep.yml",
    "chars": 980,
    "preview": "---\nname: semver\nversion: 6.3.1\ntype: npm\nsummary: The semantic version parser used by npm.\nhomepage: \nlicense: isc\nlice"
  },
  {
    "path": ".licenses/npm/tunnel.dep.yml",
    "chars": 1488,
    "preview": "---\nname: tunnel\nversion: 0.0.6\ntype: npm\nsummary: Node HTTP/HTTPS Agents for tunneling proxies\nhomepage: https://github"
  },
  {
    "path": ".licenses/npm/undici.dep.yml",
    "chars": 1396,
    "preview": "---\nname: undici\nversion: 5.29.0\ntype: npm\nsummary: An HTTP/1.1 client, written from scratch for Node.js\nhomepage: https"
  },
  {
    "path": ".licenses/npm/universal-user-agent.dep.yml",
    "chars": 1065,
    "preview": "---\nname: universal-user-agent\nversion: 6.0.1\ntype: npm\nsummary: Get a user agent string in both browser and node\nhomepa"
  },
  {
    "path": ".licenses/npm/uuid-3.4.0.dep.yml",
    "chars": 1551,
    "preview": "---\nname: uuid\nversion: 3.4.0\ntype: npm\nsummary: RFC4122 (v1, v4, and v5) UUIDs\nhomepage: \nlicense: mit\nlicenses:\n- sour"
  },
  {
    "path": ".licenses/npm/uuid-8.3.2.dep.yml",
    "chars": 1324,
    "preview": "---\nname: uuid\nversion: 8.3.2\ntype: npm\nsummary: RFC4122 (v1, v4, and v5) UUIDs\nhomepage: https://github.com/uuidjs/uuid"
  },
  {
    "path": ".licenses/npm/uuid-9.0.1.dep.yml",
    "chars": 1287,
    "preview": "---\nname: uuid\nversion: 9.0.1\ntype: npm\nsummary: RFC4122 (v1, v4, and v5) UUIDs\nhomepage: \nlicense: mit\nlicenses:\n- sour"
  },
  {
    "path": ".licenses/npm/wrappy.dep.yml",
    "chars": 994,
    "preview": "---\nname: wrappy\nversion: 1.0.2\ntype: npm\nsummary: Callback wrapping utility\nhomepage: https://github.com/npm/wrappy\nlic"
  },
  {
    "path": ".prettierignore",
    "chars": 24,
    "preview": "dist/\nlib/\nnode_modules/"
  },
  {
    "path": ".prettierrc.json",
    "chars": 205,
    "preview": "{\n  \"printWidth\": 80,\n  \"tabWidth\": 2,\n  \"useTabs\": false,\n  \"semi\": false,\n  \"singleQuote\": true,\n  \"trailingComma\": \"n"
  },
  {
    "path": "CHANGELOG.md",
    "chars": 9633,
    "preview": "# Changelog\n\n## v6.0.2\n* Fix tag handling: preserve annotations and explicit fetch-tags by @ericsciple in https://github"
  },
  {
    "path": "CODEOWNERS",
    "chars": 27,
    "preview": "* @actions/actions-runtime\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 1297,
    "preview": "# Contributing\n\n## Submitting a pull request\n\n1. Fork and clone the repository\n1. Configure and install the dependencies"
  },
  {
    "path": "LICENSE",
    "chars": 1097,
    "preview": "\nThe MIT License (MIT)\n\nCopyright (c) 2018 GitHub, Inc. and contributors\n\nPermission is hereby granted, free of charge, "
  },
  {
    "path": "README.md",
    "chars": 12887,
    "preview": "[![Build and Test](https://github.com/actions/checkout/actions/workflows/test.yml/badge.svg)](https://github.com/actions"
  },
  {
    "path": "__test__/git-auth-helper.test.ts",
    "chars": 41668,
    "preview": "import * as core from '@actions/core'\nimport * as fs from 'fs'\nimport * as gitAuthHelper from '../lib/git-auth-helper'\ni"
  },
  {
    "path": "__test__/git-command-manager.test.ts",
    "chars": 13282,
    "preview": "import * as exec from '@actions/exec'\nimport * as fshelper from '../lib/fs-helper'\nimport * as commandManager from '../l"
  },
  {
    "path": "__test__/git-directory-helper.test.ts",
    "chars": 14997,
    "preview": "import * as core from '@actions/core'\nimport * as fs from 'fs'\nimport * as gitDirectoryHelper from '../lib/git-directory"
  },
  {
    "path": "__test__/git-version.test.ts",
    "chars": 4870,
    "preview": "import {GitVersion} from '../src/git-version'\nimport {MinimumGitSparseCheckoutVersion} from '../src/git-command-manager'"
  },
  {
    "path": "__test__/input-helper.test.ts",
    "chars": 5032,
    "preview": "import * as core from '@actions/core'\nimport * as fsHelper from '../lib/fs-helper'\nimport * as github from '@actions/git"
  },
  {
    "path": "__test__/modify-work-tree.sh",
    "chars": 210,
    "preview": "#!/bin/bash\n\nif [ ! -f \"./basic/basic-file.txt\" ]; then\n    echo \"Expected basic file does not exist\"\n    exit 1\nfi\n\nech"
  },
  {
    "path": "__test__/override-git-version.cmd",
    "chars": 134,
    "preview": "\nmkdir override-git-version\ncd override-git-version\necho @echo override git version 1.2.3 > git.cmd\necho \"%CD%\" >> $GITH"
  },
  {
    "path": "__test__/override-git-version.sh",
    "chars": 180,
    "preview": "#!/bin/sh\n\nmkdir override-git-version\ncd override-git-version\necho \"#!/bin/sh\" > git\necho \"echo override git version 1.2"
  },
  {
    "path": "__test__/ref-helper.test.ts",
    "chars": 7827,
    "preview": "import * as assert from 'assert'\nimport * as refHelper from '../lib/ref-helper'\nimport {IGitCommandManager} from '../lib"
  },
  {
    "path": "__test__/retry-helper.test.ts",
    "chars": 2385,
    "preview": "import * as core from '@actions/core'\nimport {RetryHelper} from '../lib/retry-helper'\n\nlet info: string[]\nlet retryHelpe"
  },
  {
    "path": "__test__/url-helper.test.ts",
    "chars": 3450,
    "preview": "import * as urlHelper from '../src/url-helper'\n\ndescribe('getServerUrl tests', () => {\n  it('basics', async () => {\n    "
  },
  {
    "path": "__test__/verify-basic.sh",
    "chars": 1195,
    "preview": "#!/bin/sh\n\nif [ ! -f \"./basic/basic-file.txt\" ]; then\n    echo \"Expected basic file does not exist\"\n    exit 1\nfi\n\nif [ "
  },
  {
    "path": "__test__/verify-clean.sh",
    "chars": 353,
    "preview": "#!/bin/bash\n\nif [[ \"$(git -C ./basic status --porcelain)\" != \"\" ]]; then\n    echo --------------------------------------"
  },
  {
    "path": "__test__/verify-fetch-filter.sh",
    "chars": 445,
    "preview": "#!/bin/bash\n\n# Verify .git folder\nif [ ! -d \"./fetch-filter/.git\" ]; then\n  echo \"Expected ./fetch-filter/.git folder to"
  },
  {
    "path": "__test__/verify-fetch-tags.sh",
    "chars": 218,
    "preview": "#!/bin/sh\n\n# Verify tags were fetched\nTAG_COUNT=$(git -C ./fetch-tags-test tag | wc -l)\nif [ \"$TAG_COUNT\" -eq 0 ]; then\n"
  },
  {
    "path": "__test__/verify-lfs.sh",
    "chars": 216,
    "preview": "#!/bin/bash\n\nif [ ! -f \"./lfs/regular-file.txt\" ]; then\n    echo \"Expected regular file does not exist\"\n    exit 1\nfi\n\ni"
  },
  {
    "path": "__test__/verify-no-unstaged-changes.sh",
    "chars": 596,
    "preview": "#!/bin/bash\n\nif [[ \"$(git status --porcelain)\" != \"\" ]]; then\n    echo ----------------------------------------\n    echo"
  },
  {
    "path": "__test__/verify-side-by-side.sh",
    "chars": 258,
    "preview": "#!/bin/bash\n\nif [ ! -f \"./side-by-side-1/side-by-side-test-file-1.txt\" ]; then\n    echo \"Expected file 1 does not exist\""
  },
  {
    "path": "__test__/verify-sparse-checkout-non-cone-mode.sh",
    "chars": 1217,
    "preview": "#!/bin/bash\n\n# Verify .git folder\nif [ ! -d \"./sparse-checkout-non-cone-mode/.git\" ]; then\n  echo \"Expected ./sparse-che"
  },
  {
    "path": "__test__/verify-sparse-checkout.sh",
    "chars": 1352,
    "preview": "#!/bin/bash\n\n# Verify .git folder\nif [ ! -d \"./sparse-checkout/.git\" ]; then\n  echo \"Expected ./sparse-checkout/.git fol"
  },
  {
    "path": "__test__/verify-submodules-false.sh",
    "chars": 263,
    "preview": "#!/bin/bash\n\nif [ ! -f \"./submodules-false/regular-file.txt\" ]; then\n    echo \"Expected regular file does not exist\"\n   "
  },
  {
    "path": "__test__/verify-submodules-recursive.sh",
    "chars": 750,
    "preview": "#!/bin/bash\n\nif [ ! -f \"./submodules-recursive/regular-file.txt\" ]; then\n    echo \"Expected regular file does not exist\""
  },
  {
    "path": "__test__/verify-submodules-true.sh",
    "chars": 703,
    "preview": "#!/bin/bash\n\nif [ ! -f \"./submodules-true/regular-file.txt\" ]; then\n    echo \"Expected regular file does not exist\"\n    "
  },
  {
    "path": "__test__/verify-worktree.sh",
    "chars": 1374,
    "preview": "#!/bin/bash\nset -e\n\n# Verify worktree credentials\n# This test verifies that git credentials work in worktrees created af"
  },
  {
    "path": "action.yml",
    "chars": 4593,
    "preview": "name: 'Checkout'\r\ndescription: 'Checkout a Git repository at a particular version'\r\ninputs:\r\n  repository:\r\n    descript"
  },
  {
    "path": "adrs/0153-checkout-v2.md",
    "chars": 12174,
    "preview": "# ADR 0153: Checkout v2\n\n**Date**: 2019-10-21\n\n**Status**: Accepted\n\n## Context\n\nThis ADR details the behavior for `acti"
  },
  {
    "path": "dist/index.js",
    "chars": 1362212,
    "preview": "/******/ (() => { // webpackBootstrap\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ 7219:\n/***/ (function(__unused_webpa"
  },
  {
    "path": "dist/problem-matcher.json",
    "chars": 253,
    "preview": "{\n    \"problemMatcher\": [\n        {\n            \"owner\": \"checkout-git\",\n            \"pattern\": [\n                {\n    "
  },
  {
    "path": "images/test-ubuntu-git.Dockerfile",
    "chars": 556,
    "preview": "# Defines the test-ubuntu-git Container Image.\n# Consumed by actions/checkout CI/CD validation workflows.\n\nFROM ubuntu:l"
  },
  {
    "path": "images/test-ubuntu-git.md",
    "chars": 792,
    "preview": "# `test-ubuntu-git` Container Image\n\n[![Publish test-ubuntu-git Container](https://github.com/actions/checkout/actions/w"
  },
  {
    "path": "jest.config.js",
    "chars": 253,
    "preview": "module.exports = {\n  clearMocks: true,\n  fakeTimers: {},\n  moduleFileExtensions: ['js', 'ts'],\n  testEnvironment: 'node'"
  },
  {
    "path": "package.json",
    "chars": 1498,
    "preview": "{\n  \"name\": \"checkout\",\n  \"version\": \"5.0.0\",\n  \"description\": \"checkout action\",\n  \"main\": \"lib/main.js\",\n  \"scripts\": "
  },
  {
    "path": "src/fs-helper.ts",
    "chars": 1659,
    "preview": "import * as fs from 'fs'\n\nexport function directoryExistsSync(path: string, required?: boolean): boolean {\n  if (!path) "
  },
  {
    "path": "src/git-auth-helper.ts",
    "chars": 21890,
    "preview": "import * as assert from 'assert'\nimport * as core from '@actions/core'\nimport * as exec from '@actions/exec'\nimport * as"
  },
  {
    "path": "src/git-command-manager.ts",
    "chars": 21181,
    "preview": "import * as core from '@actions/core'\nimport * as exec from '@actions/exec'\nimport * as fs from 'fs'\nimport * as fshelpe"
  },
  {
    "path": "src/git-directory-helper.ts",
    "chars": 4217,
    "preview": "import * as assert from 'assert'\nimport * as core from '@actions/core'\nimport * as fs from 'fs'\nimport * as fsHelper fro"
  },
  {
    "path": "src/git-source-provider.ts",
    "chars": 12093,
    "preview": "import * as core from '@actions/core'\nimport * as fsHelper from './fs-helper'\nimport * as gitAuthHelper from './git-auth"
  },
  {
    "path": "src/git-source-settings.ts",
    "chars": 2187,
    "preview": "export interface IGitSourceSettings {\n  /**\n   * The location on disk where the repository will be placed\n   */\n  reposi"
  },
  {
    "path": "src/git-version.ts",
    "chars": 1788,
    "preview": "export class GitVersion {\n  private readonly major: number = NaN\n  private readonly minor: number = NaN\n  private readon"
  },
  {
    "path": "src/github-api-helper.ts",
    "chars": 4303,
    "preview": "import * as assert from 'assert'\nimport * as core from '@actions/core'\nimport * as fs from 'fs'\nimport * as github from "
  },
  {
    "path": "src/input-helper.ts",
    "chars": 5331,
    "preview": "import * as core from '@actions/core'\nimport * as fsHelper from './fs-helper'\nimport * as github from '@actions/github'\n"
  },
  {
    "path": "src/main.ts",
    "chars": 1170,
    "preview": "import * as core from '@actions/core'\nimport * as coreCommand from '@actions/core/lib/command'\nimport * as gitSourceProv"
  },
  {
    "path": "src/misc/generate-docs.ts",
    "chars": 3531,
    "preview": "import * as fs from 'fs'\nimport * as os from 'os'\nimport * as path from 'path'\nimport * as yaml from 'js-yaml'\n\n//\n// SU"
  },
  {
    "path": "src/misc/licensed-check.sh",
    "chars": 120,
    "preview": "#!/bin/bash\n\nset -e\n\nsrc/misc/licensed-download.sh\n\necho 'Running: licensed cached'\n_temp/licensed-3.6.0/licensed status"
  },
  {
    "path": "src/misc/licensed-download.sh",
    "chars": 663,
    "preview": "#!/bin/bash\n\nset -e\n\nif [ ! -f _temp/licensed-3.6.0.done ]; then\n  echo 'Clearing temp'\n  rm -rf _temp/licensed-3.6.0 ||"
  },
  {
    "path": "src/misc/licensed-generate.sh",
    "chars": 119,
    "preview": "#!/bin/bash\n\nset -e\n\nsrc/misc/licensed-download.sh\n\necho 'Running: licensed cached'\n_temp/licensed-3.6.0/licensed cache"
  },
  {
    "path": "src/ref-helper.ts",
    "chars": 7991,
    "preview": "import {IGitCommandManager} from './git-command-manager'\nimport * as core from '@actions/core'\nimport * as github from '"
  },
  {
    "path": "src/regexp-helper.ts",
    "chars": 123,
    "preview": "export function escape(value: string): string {\n  return value.replace(/[^a-zA-Z0-9_]/g, x => {\n    return `\\\\${x}`\n  })"
  },
  {
    "path": "src/retry-helper.ts",
    "chars": 1588,
    "preview": "import * as core from '@actions/core'\n\nconst defaultMaxAttempts = 3\nconst defaultMinSeconds = 10\nconst defaultMaxSeconds"
  },
  {
    "path": "src/state-helper.ts",
    "chars": 1804,
    "preview": "import * as core from '@actions/core'\n\n/**\n * Indicates whether the POST action is running\n */\nexport const IsPost = !!c"
  },
  {
    "path": "src/url-helper.ts",
    "chars": 2426,
    "preview": "import * as assert from 'assert'\nimport {URL} from 'url'\nimport {IGitSourceSettings} from './git-source-settings'\n\nexpor"
  },
  {
    "path": "src/workflow-context-helper.ts",
    "chars": 891,
    "preview": "import * as core from '@actions/core'\nimport * as fs from 'fs'\n\n/**\n * Gets the organization ID of the running workflow "
  },
  {
    "path": "tsconfig.json",
    "chars": 334,
    "preview": "{\n  \"compilerOptions\": {\n    \"target\": \"es6\",\n    \"module\": \"commonjs\",\n    \"lib\": [\n      \"es6\"\n    ],\n    \"outDir\": \"."
  }
]

About this extraction

This page contains the full source code of the actions/checkout GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 103 files (1.6 MB), approximately 475.2k tokens, and a symbol index with 1472 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!