From 2ef38bef6e5cb6be32f06aec287c9d831c378880 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 13 Mar 2025 16:45:22 -0400 Subject: [PATCH] #388 - Fix issue with importing script files from GitHub repo --- .../df-scripts-github-dialog.component.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/shared/components/df-scripts-github-dialog/df-scripts-github-dialog.component.ts b/src/app/shared/components/df-scripts-github-dialog/df-scripts-github-dialog.component.ts index 2437765c..4e92348b 100644 --- a/src/app/shared/components/df-scripts-github-dialog/df-scripts-github-dialog.component.ts +++ b/src/app/shared/components/df-scripts-github-dialog/df-scripts-github-dialog.component.ts @@ -15,7 +15,6 @@ import { AsyncPipe, NgFor, NgIf } from '@angular/common'; import { TranslocoPipe } from '@ngneat/transloco'; import { GITHUB_REPO_SERVICE_TOKEN } from 'src/app/shared/constants/tokens'; import { DfBaseCrudService } from 'src/app/shared/services/df-base-crud.service'; -import { KeyValuePair } from 'src/app/shared/types/generic-http'; import { UntilDestroy } from '@ngneat/until-destroy'; import { isValidHttpUrl } from '../../utilities/url'; @UntilDestroy({ checkProperties: true }) @@ -68,7 +67,7 @@ export class DfScriptsGithubDialogComponent implements OnInit { this.repoOwner = urlArray[0]; this.repoName = urlArray[1]; - this.fileName = urlArray[4]; + this.fileName = urlArray.slice(4).join('/'); const githubApiEndpoint = `${this.repoOwner}/${this.repoName}`; this.githubService .get(githubApiEndpoint, {