Skip to content
This repository was archived by the owner on Apr 13, 2020. It is now read-only.

Commit 605b8a2

Browse files
authored
Use a config param for private src repo access token (#101)
* Use a config arg for private src repo access toke * Adding comment about when this config param is needed
1 parent 5bb50fa commit 605b8a2

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

spk-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ introspection:
2323
table_name: "storage-account-table-name" # Must be defined to run spk deployment commands
2424
partition_key: "storage-account-table-partition-key" # Must be defined to run spk deployment commands
2525
key: "storage-access-key" # Must be defined to run spk deployment commands. Use ${env:INTROSPECTION_STORAGE_ACCESS_KEY} and set it in .env file
26+
source_repo_access_token: "source_repo_access_token" # Optional. Required only when source repository is private (in order to render the author column in dashboard)
2627

2728
# Following 5 fields are needed only if using spk to onboard to use introspection tool
2829
service_principal_id: "service-principal-id"

src/commands/deployment/dashboard.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,13 @@ const getEnvVars = (): string[] => {
137137
"REACT_APP_PIPELINE_ACCESS_TOKEN=" + config.azure_devops!.access_token
138138
);
139139
}
140+
if (config.introspection!.azure!.source_repo_access_token) {
141+
envVars.push("-e");
142+
envVars.push(
143+
"REACT_APP_SOURCE_REPO_ACCESS_TOKEN=" +
144+
config.introspection!.azure!.source_repo_access_token
145+
);
146+
}
140147

141148
return envVars;
142149
};

src/types.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ export interface IConfigYaml {
149149
table_name?: string;
150150
partition_key?: string;
151151
key?: string;
152+
source_repo_access_token?: string;
152153
service_principal_id?: string;
153154
service_principal_secret?: string;
154155
subscription_id?: string;

0 commit comments

Comments
 (0)