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
diff options
context:
space:
mode:
authoreric sciple <ericsciple@users.noreply.github.com>2020-03-12 01:02:27 -0400
committereric sciple <ericsciple@users.noreply.github.com>2020-03-12 11:29:02 -0400
commit8878c014a4b6b313542d86e747bf746249e1e330 (patch)
tree21ab78013bc7cc88344c3cb9feaaa42213b20407
parent706ad1e0e3f826823967b7165d7a2bc84e698cf5 (diff)
fail when submodules or ssh-key and fallback to REST APIusers/ericsciple/m167sub
-rw-r--r--dist/index.js6
-rw-r--r--src/git-source-provider.ts10
2 files changed, 16 insertions, 0 deletions
diff --git a/dist/index.js b/dist/index.js
index c7f2bca..3992650 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -5825,6 +5825,12 @@ function getSource(settings) {
// Downloading using REST API
core.info(`The repository will be downloaded using the GitHub REST API`);
core.info(`To create a local Git repository instead, add Git ${gitCommandManager.MinimumGitVersion} or higher to the PATH`);
+ if (settings.submodules) {
+ throw new Error(`Input 'submodules' not supported when falling back to download using the GitHub REST API. To create a local Git repository instead, add Git ${gitCommandManager.MinimumGitVersion} or higher to the PATH.`);
+ }
+ else if (settings.sshKey) {
+ throw new Error(`Input 'ssh-key' not supported when falling back to download using the GitHub REST API. To create a local Git repository instead, add Git ${gitCommandManager.MinimumGitVersion} or higher to the PATH.`);
+ }
yield githubApiHelper.downloadRepository(settings.authToken, settings.repositoryOwner, settings.repositoryName, settings.ref, settings.commit, settings.repositoryPath);
return;
}
diff --git a/src/git-source-provider.ts b/src/git-source-provider.ts
index 7ce9fb7..4bce702 100644
--- a/src/git-source-provider.ts
+++ b/src/git-source-provider.ts
@@ -57,6 +57,16 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
core.info(
`To create a local Git repository instead, add Git ${gitCommandManager.MinimumGitVersion} or higher to the PATH`
)
+ if (settings.submodules) {
+ throw new Error(
+ `Input 'submodules' not supported when falling back to download using the GitHub REST API. To create a local Git repository instead, add Git ${gitCommandManager.MinimumGitVersion} or higher to the PATH.`
+ )
+ } else if (settings.sshKey) {
+ throw new Error(
+ `Input 'ssh-key' not supported when falling back to download using the GitHub REST API. To create a local Git repository instead, add Git ${gitCommandManager.MinimumGitVersion} or higher to the PATH.`
+ )
+ }
+
await githubApiHelper.downloadRepository(
settings.authToken,
settings.repositoryOwner,