update name

This commit is contained in:
Trym Lund Flogard 2021-06-05 14:25:23 +02:00
parent 7ca2f4d4fb
commit 71897dd340
3 changed files with 12 additions and 9 deletions

9
dist/index.js vendored
View File

@ -316,6 +316,7 @@ class NextcloudArtifact {
this.context = NextcloudArtifact.getCheckRunContext();
this.token = inputs.Token;
this.name = inputs.ArtifactName;
this.artifactTitle = `Nextcloud - ${this.name}`;
this.path = inputs.ArtifactPath;
this.errorBehavior = inputs.NoFileBehvaior;
this.name = inputs.ArtifactName;
@ -355,10 +356,10 @@ class NextcloudArtifact {
this.logUpload(files.filesToUpload.length, files.rootDirectory);
const createResp = await this.octokit.rest.checks.create({
head_sha: this.context.sha,
name: 'Nextcloud Artifacts',
name: this.artifactTitle,
status: 'in_progress',
output: {
title: `Nextcloud (${this.name})`,
title: `Nextcloud - ${this.name}`,
summary: 'Uploading...'
},
...github.context.repo
@ -372,7 +373,7 @@ class NextcloudArtifact {
conclusion: 'success',
status: 'completed',
output: {
title: `Nextcloud (${this.name})`,
title: this.artifactTitle,
summary: shareableUrl
},
...github.context.repo
@ -393,7 +394,7 @@ class NextcloudArtifact {
conclusion: 'failure',
status: 'completed',
output: {
title: `Nextcloud (${this.name})`,
title: this.artifactTitle,
summary: 'Check failed.'
},
...github.context.repo

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -12,12 +12,14 @@ export class NextcloudArtifact {
readonly context = NextcloudArtifact.getCheckRunContext()
readonly token: string
readonly name: string
readonly artifactTitle: string
readonly path: string
readonly errorBehavior: NoFileOption
constructor(private inputs: Inputs) {
this.token = inputs.Token
this.name = inputs.ArtifactName
this.artifactTitle = `Nextcloud - ${this.name}`
this.path = inputs.ArtifactPath
this.errorBehavior = inputs.NoFileBehvaior
this.name = inputs.ArtifactName
@ -62,10 +64,10 @@ export class NextcloudArtifact {
this.logUpload(files.filesToUpload.length, files.rootDirectory)
const createResp = await this.octokit.rest.checks.create({
head_sha: this.context.sha,
name: 'Nextcloud Artifacts',
name: this.artifactTitle,
status: 'in_progress',
output: {
title: `Nextcloud (${this.name})`,
title: `Nextcloud - ${this.name}`,
summary: 'Uploading...'
},
...github.context.repo
@ -87,7 +89,7 @@ export class NextcloudArtifact {
conclusion: 'success',
status: 'completed',
output: {
title: `Nextcloud (${this.name})`,
title: this.artifactTitle,
summary: shareableUrl
},
...github.context.repo
@ -108,7 +110,7 @@ export class NextcloudArtifact {
conclusion: 'failure',
status: 'completed',
output: {
title: `Nextcloud (${this.name})`,
title: this.artifactTitle,
summary: 'Check failed.'
},
...github.context.repo