From 1cb683f59cac4dbf9d4c0e81eecb4c415396b23d Mon Sep 17 00:00:00 2001
From: Michael Schmidt
Date: Thu, 13 Jul 2023 12:54:34 +0200
Subject: [PATCH] changed the docs
---
README.md | 20 ++++++++------------
src/git-auth-helper.ts | 4 ++--
2 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/README.md b/README.md
index 7619c06..0c23410 100644
--- a/README.md
+++ b/README.md
@@ -2,26 +2,22 @@
-# Checkout V3
-
-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://help.github.com/en/articles/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.
+This is a fork of https://github.com/actions/checkout@v3
# What's new
-- Updated to the node16 runtime by default
- - This requires a minimum [Actions Runner](https://github.com/actions/runner/releases/tag/v2.285.0) version of v2.285.0 to run, which is by default available in GHES 3.4 or later.
+With this action it is possible to check out a repository located on a Gitea instance with subdirectories.
+
+Changed
+`https://[:]//`
+to
+`https://[:]///`
# Usage
```yaml
-- uses: actions/checkout@v3
+- uses: https://gitea.com/ScMi1/checkout@v1
with:
# Repository name with owner. For example, actions/checkout
# Default: ${{ github.repository }}
diff --git a/src/git-auth-helper.ts b/src/git-auth-helper.ts
index 1eb0062..1014133 100644
--- a/src/git-auth-helper.ts
+++ b/src/git-auth-helper.ts
@@ -53,7 +53,7 @@ class GitAuthHelper {
// Token auth header
const serverUrl = urlHelper.getServerUrl()
- this.tokenConfigKey = `http.${serverUrl.origin}/${serverUrl.pathname}/.extraheader` // "origin" is SCHEME://HOSTNAME[:PORT]
+ this.tokenConfigKey = `http.${serverUrl.origin}${serverUrl.pathname}/.extraheader` // "origin" is SCHEME://HOSTNAME[:PORT]
const basicCredential = Buffer.from(
`x-access-token:${this.settings.authToken}`,
'utf8'
@@ -63,7 +63,7 @@ class GitAuthHelper {
this.tokenConfigValue = `AUTHORIZATION: basic ${basicCredential}`
// Instead of SSH URL
- this.insteadOfKey = `url.${serverUrl.origin}/${serverUrl.pathname}/.insteadOf` // "origin" is SCHEME://HOSTNAME[:PORT]
+ this.insteadOfKey = `url.${serverUrl.origin}${serverUrl.pathname}/.insteadOf` // "origin" is SCHEME://HOSTNAME[:PORT]
this.insteadOfValues.push(`git@${serverUrl.hostname}:`)
if (this.settings.workflowOrganizationId) {
this.insteadOfValues.push(