Skip to content

Commit

Permalink
added fall back to post failure comment
Browse files Browse the repository at this point in the history
  • Loading branch information
DE7924 committed Dec 4, 2024
1 parent cfb5243 commit aa3dceb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
});
}
- name: Post failure comment
if: failure()
if: always()
uses: actions/github-script@v6
with:
script: |
Expand All @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions src/components/fab/fab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`<div class="label">${this.label}</div>` : nothing;
return nothing;
return this.label ? html`<div class="label">${this.label}</div>` : nothing;
}
protected render() {
return html`
Expand Down

0 comments on commit aa3dceb

Please sign in to comment.