From 2dc85abec4583fdc67a2bf444bf7fc4e7b7fb7d9 Mon Sep 17 00:00:00 2001 From: splincode Date: Mon, 30 Sep 2024 22:28:54 +0300 Subject: [PATCH] chore: update --- .github/workflows/build-demo.yml | 2 +- .github/workflows/build.yml | 2 +- .github/workflows/deploy-gh-pages.yml | 2 +- .github/workflows/deploy-preview.yml | 2 +- .github/workflows/e2e.yml | 2 +- .github/workflows/lint.yml | 4 +++- .github/workflows/pr.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/snapshots.yml | 2 +- .github/workflows/test.yml | 2 +- projects/demo/src/app/pages/starter/index.ts | 6 +----- projects/editor/components/toolbar-tools/code/index.ts | 6 +----- 12 files changed, 14 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build-demo.yml b/.github/workflows/build-demo.yml index 71a5a94ba..235e6cb37 100644 --- a/.github/workflows/build-demo.yml +++ b/.github/workflows/build-demo.yml @@ -16,5 +16,5 @@ jobs: - run: npx nx prerender editor-demo concurrency: - group: build-demo-${{ github.workflow }}-${{ github.head_ref || github.ref_name }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c1810e6da..e67f36ef5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,5 +16,5 @@ jobs: - run: npx nx build editor concurrency: - group: build-${{ github.workflow }}-${{ github.head_ref || github.ref_name }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/deploy-gh-pages.yml index 73fb6a2a3..01e1b8f74 100644 --- a/.github/workflows/deploy-gh-pages.yml +++ b/.github/workflows/deploy-gh-pages.yml @@ -17,5 +17,5 @@ jobs: folder: dist/demo/browser concurrency: - group: deploy-${{ github.workflow }}-${{ github.head_ref || github.ref_name }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 06972b6c6..1812012e9 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -21,5 +21,5 @@ jobs: expires: 1d concurrency: - group: firebase-${{ github.workflow }}-${{ github.head_ref || github.ref_name }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index a667b9640..3717f3e99 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -54,5 +54,5 @@ jobs: exit 1 concurrency: - group: e2e-${{ github.workflow }}-${{ github.head_ref || github.ref_name }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ab3e6cf03..038f3a84d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -11,6 +11,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4.2.0 + with: + persist-credentials: false - uses: taiga-family/ci/actions/setup/variables@v1.87.6 - uses: taiga-family/ci/actions/setup/node@v1.87.6 - run: | @@ -28,5 +30,5 @@ jobs: token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }} concurrency: - group: lint-${{ github.workflow }}-${{ github.head_ref || github.ref_name }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index b9f12d204..4f2369270 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -68,5 +68,5 @@ jobs: repo-token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }} concurrency: - group: pr-suites-${{ github.head_ref }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 239a52f96..264dff4ed 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,5 +40,5 @@ jobs: textLink: ${{ steps.info.outputs.name }} concurrency: - group: release-${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true diff --git a/.github/workflows/snapshots.yml b/.github/workflows/snapshots.yml index b9597ced4..3889d716e 100644 --- a/.github/workflows/snapshots.yml +++ b/.github/workflows/snapshots.yml @@ -36,5 +36,5 @@ jobs: GITHUB_TOKEN: ${{ secrets.TAIGA_FAMILY_BOT_PAT }} concurrency: - group: snapshots-${{ github.workflow }}-${{ github.head_ref || github.ref_name }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e5daa25f7..e90b9828b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,5 +21,5 @@ jobs: name: editor concurrency: - group: test-${{ github.workflow }}-${{ github.head_ref || github.ref_name }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true diff --git a/projects/demo/src/app/pages/starter/index.ts b/projects/demo/src/app/pages/starter/index.ts index f99839f27..d3156f325 100644 --- a/projects/demo/src/app/pages/starter/index.ts +++ b/projects/demo/src/app/pages/starter/index.ts @@ -92,10 +92,6 @@ export default class TuiEditorStarter { } protected set disabled(value: boolean) { - if (value) { - this.control.disable(); - } else { - this.control.enable(); - } + this.control?.[value ? 'disable' : 'enable'](); } } diff --git a/projects/editor/components/toolbar-tools/code/index.ts b/projects/editor/components/toolbar-tools/code/index.ts index 05fa54762..52c10948e 100644 --- a/projects/editor/components/toolbar-tools/code/index.ts +++ b/projects/editor/components/toolbar-tools/code/index.ts @@ -38,11 +38,7 @@ export class TuiCode implements OnInit { } public onCode(isCodeBlock: boolean): void { - if (isCodeBlock) { - this.editor?.toggleCodeBlock(); - } else { - this.editor?.toggleCode(); - } + this.editor?.[isCodeBlock ? 'toggleCodeBlock' : 'toggleCode'](); } protected get editor(): AbstractTuiEditor | null {