From aa3dcebca44a838b82ca0f6990534718a2a45288 Mon Sep 17 00:00:00 2001 From: Daniel Eshkeri Date: Wed, 4 Dec 2024 18:31:02 +0000 Subject: [PATCH] added fall back to post failure comment --- .github/workflows/pull-request.yml | 7 +++++-- src/components/fab/fab.ts | 3 +-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 72feb36..542a52d 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -120,7 +120,7 @@ jobs: }); } - name: Post failure comment - if: failure() + if: always() uses: actions/github-script@v6 with: script: | @@ -136,10 +136,13 @@ jobs: { name: 'Update changes in GitHub repository', conclusion: '${{ steps.update-changes-in-github-repository.outcome }}' } ].filter(step => step.conclusion === 'failure'); const failedStepsDetails = failedSteps.map(step => `- ${step.name}: ${step.conclusion}`).join('\n'); - const commentBody = ` + const commentBody = failedSteps.length > 0 ? ` ## Code Quality Checks Failed The following checks failed: ${failedStepsDetails} + `; : ` + ## Code Quality Checks Failed + No checks failed. `; const { data: comments } = await github.rest.issues.listComments({ issue_number: context.issue.number, diff --git a/src/components/fab/fab.ts b/src/components/fab/fab.ts index 4fb8c04..c9dc83a 100644 --- a/src/components/fab/fab.ts +++ b/src/components/fab/fab.ts @@ -56,8 +56,7 @@ export class ZetaFab extends Flavored(BaseButton) { @property({ type: String, reflect: true }) size: "small" | "large" = "small"; private getLabel() { - // return this.label ? html`
${this.label}
` : nothing; - return nothing; + return this.label ? html`
${this.label}
` : nothing; } protected render() { return html`