Unverified Commit 069c6959 authored by eric sciple's avatar eric sciple Committed by GitHub
Browse files

Persist creds to a separate file (#2286)

parent ff7abcd0
Loading
Loading
Loading
Loading
+4 −5
Changes for .github/workflows/test.yml: 4 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -302,12 +302,15 @@ jobs:
      # Clone this repo
      - name: Checkout
        uses: actions/[email protected]
        with:
          path: actions-checkout

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

      # Verify output
@@ -325,7 +328,3 @@ jobs:
            echo "Expected commit to be 82f71901cf8c021332310dcc8cdba84c4193ff5d"
            exit 1
          fi

      # needed to make checkout post cleanup succeed
      - name: Fix Checkout
        uses: actions/[email protected]
+379 −28

File changed.

Preview size limit exceeded, changes collapsed.

+4
Changes for __test__/git-directory-helper.test.ts: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -471,6 +471,7 @@ async function setup(testName: string): Promise<void> {
    configExists: jest.fn(),
    fetch: jest.fn(),
    getDefaultBranch: jest.fn(),
    getSubmoduleConfigPaths: jest.fn(async () => []),
    getWorkingDirectory: jest.fn(() => repositoryPath),
    init: jest.fn(),
    isDetached: jest.fn(),
@@ -493,12 +494,15 @@ async function setup(testName: string): Promise<void> {
      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
    }),
+1 −1
Changes for __test__/verify-submodules-recursive.sh: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ fi

echo "Testing persisted credential"
pushd ./submodules-recursive/submodule-level-1/submodule-level-2
git config --local --name-only --get-regexp http.+extraheader && git fetch
git config --local --includes --name-only --get-regexp http.+extraheader && git fetch
if [ "$?" != "0" ]; then
    echo "Failed to validate persisted credential"
    popd
+1 −1
Changes for __test__/verify-submodules-true.sh: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ fi

echo "Testing persisted credential"
pushd ./submodules-true/submodule-level-1
git config --local --name-only --get-regexp http.+extraheader && git fetch
git config --local --includes --name-only --get-regexp http.+extraheader && git fetch
if [ "$?" != "0" ]; then
    echo "Failed to validate persisted credential"
    popd
Loading