Skip to content

Commit 0d6a257

Browse files
committed
fix: clarify link naming
1 parent 8ee5a22 commit 0d6a257

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

example/.github/workflows/fileset-upload.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ jobs:
4444
-b ${GITHUB_REF#refs/heads/} \
4545
-o upload.json \
4646
build
47-
echo "::set-output name=build-link::$(jq -r .urls.stagingSha upload.json)"
48-
echo "::set-output name=dashboard-link::$(jq -r .urls.ui upload.json)"
49-
echo "::set-output name=staging-link::$(jq -r .urls.stagingBranch upload.json)"
47+
echo "::set-output name=build-link::$(jq -r .links.buildLink upload.json)"
48+
echo "::set-output name=dashboard-link::$(jq -r .links.dashboardLink upload.json)"
49+
echo "::set-output name=staging-link::$(jq -r .links.stagingLink upload.json)"
5050
- name: Comment
5151
uses: peter-evans/commit-comment@v1
5252
with:

src/commands/upload.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ export class UploadCommand {
128128
manifestObj.commit.author.email
129129
}> ${manifestObj.commit.message.split('Change-Id')[0].trim()}`
130130
);
131-
console.log('Dashboard:'.blue + ` ${manifestObj.urls.ui}`);
132-
console.log(' Build:'.blue + ` ${manifestObj.urls.stagingSha}`);
133-
console.log(' Staging:'.green + ` ${manifestObj.urls.stagingBranch}`);
131+
console.log('Dashboard:'.blue + ` ${manifestObj.links.dashboardLink}`);
132+
console.log(' Build:'.blue + ` ${manifestObj.links.buildLink}`);
133+
console.log(' Staging:'.green + ` ${manifestObj.links.stagingLink}`);
134134
}
135135
}

src/manifest.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ export interface Commit {
4444
author: GitAuthor;
4545
}
4646

47-
export interface ManifestUrls {
48-
stagingBranch: string;
49-
stagingSha: string;
50-
ui: string;
47+
export interface ManifestLinks {
48+
stagingLink: string;
49+
buildLink: string;
50+
dashboardLink: string;
5151
}
5252

5353
export interface SerializedManifest {
@@ -156,29 +156,29 @@ export class Manifest {
156156

157157
toOutputJSON() {
158158
return {
159-
urls: this.urls,
159+
links: this.links,
160160
files: this.files,
161161
commit: this.commit,
162162
};
163163
}
164164

165-
get urls(): ManifestUrls {
165+
get links(): ManifestLinks {
166166
// TODO: Allow customizing the staging URL using `fileset.yaml` configuration.
167167
const hostnameSuffix = `fileset-dot-${this.googleCloudProject}.appspot.com`;
168-
const stagingShaUrl =
168+
const buildLink =
169169
this.site === 'default'
170170
? `https://${this.shortSha}-dot-${hostnameSuffix}`
171171
: `https://${this.site}-${this.shortSha}-dot-${hostnameSuffix}`;
172172
const branchToken = branchToHostnameToken(this.branch);
173-
const stagingBranchUrl =
173+
const stagingLink =
174174
this.site === 'default'
175175
? `https://${branchToken}-dot-${hostnameSuffix}`
176176
: `https://${this.site}-${branchToken}-dot-${hostnameSuffix}`;
177-
const uiUrl = `https://${hostnameSuffix}/fileset/sites/${this.site}/${this.shortSha}`;
177+
const dashboardLink = `https://${hostnameSuffix}/fileset/sites/${this.site}/${this.shortSha}`;
178178
return {
179-
stagingBranch: stagingBranchUrl,
180-
stagingSha: stagingShaUrl,
181-
ui: uiUrl,
179+
stagingLink: stagingLink,
180+
buildLink: buildLink,
181+
dashboardLink: dashboardLink,
182182
};
183183
}
184184
}

0 commit comments

Comments
 (0)