Read-only mirror — the public repositories of the Forgejo instance, refreshed every 10 minutes. The live instance (fg.dieschoenewolke.de) is reachable only over the VPN; clone here with https://git.dieschoenewolke.de/git/<owner>/<repo>.git.
summaryrefslogtreecommitdiff
path: root/src/git-source-provider.ts
diff options
context:
space:
mode:
authoreric sciple <ericsciple@users.noreply.github.com>2019-12-10 18:38:53 -0500
committereric sciple <ericsciple@users.noreply.github.com>2019-12-10 18:38:53 -0500
commit9e5e773b07b1b2e57e578384132362f710c80e48 (patch)
treefcddb81fa10a7cb1f8a10844ea79a16cd0b1f2ae /src/git-source-provider.ts
parent09a881150911e44069569fd834f641fcfbd1a623 (diff)
.
Diffstat (limited to 'src/git-source-provider.ts')
-rw-r--r--src/git-source-provider.ts13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/git-source-provider.ts b/src/git-source-provider.ts
index 5e3945a..bf086ff 100644
--- a/src/git-source-provider.ts
+++ b/src/git-source-provider.ts
@@ -3,10 +3,11 @@ import * as coreCommand from '@actions/core/lib/command'
import * as fs from 'fs'
import * as fsHelper from './fs-helper'
import * as gitCommandManager from './git-command-manager'
+import * as githubApiHelper from './github-api-helper'
import * as io from '@actions/io'
import * as path from 'path'
import * as refHelper from './ref-helper'
-import * as githubApiHelper from './github-api-helper'
+import * as stateHelper from './state-helper'
import {IGitCommandManager} from './git-command-manager'
const authConfigKey = `http.https://github.com/.extraheader`
@@ -32,13 +33,6 @@ export async function getSource(settings: ISourceSettings): Promise<void> {
settings.repositoryOwner
)}/${encodeURIComponent(settings.repositoryName)}`
- // Set intra-task state for cleanup
- coreCommand.issueCommand(
- 'save-state',
- {name: 'repositoryPath'},
- settings.repositoryPath
- )
-
// Remove conflicting file path
if (fsHelper.fileExistsSync(settings.repositoryPath)) {
await io.rmRF(settings.repositoryPath)
@@ -79,6 +73,9 @@ export async function getSource(settings: ISourceSettings): Promise<void> {
settings.repositoryPath
)
} else {
+ // Save state for POST action
+ stateHelper.setRepositoryPath(settings.repositoryPath)
+
// Initialize the repository
if (
!fsHelper.directoryExistsSync(path.join(settings.repositoryPath, '.git'))