From d8f041d49a3787f62197a30311f0385a75aeeaca Mon Sep 17 00:00:00 2001 From: Dmytro <139750895+dmytroBonf@users.noreply.github.com> Date: Wed, 27 Dec 2023 12:52:01 +0200 Subject: [PATCH 01/10] Update check-source-code.yml --- .github/workflows/check-source-code.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-source-code.yml b/.github/workflows/check-source-code.yml index 53baa1aa..721b2edd 100644 --- a/.github/workflows/check-source-code.yml +++ b/.github/workflows/check-source-code.yml @@ -11,9 +11,25 @@ jobs: name: Prepare local deps runs-on: ubuntu-latest steps: - - name: Checkout repository and submodules - uses: actions/checkout@v2 + - name: Get User Permission + id: checkAccess + uses: actions-cool/check-user-permission@v2 + with: + require: write + username: ${{ github.triggering_actor }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Check User Permission + if: steps.checkAccess.outputs.require-result == 'false' + run: | + echo "${{ github.triggering_actor }} does not have permissions on this repo." + echo "Current permission level is ${{ steps.checkAccess.outputs.user-permission }}" + echo "Job originally triggered by ${{ github.actor }}" + exit 1 + - name: Checkout code + uses: actions/checkout@v3 with: + ref: ${{ github.event.pull_request.head.sha }} # This is dangerous without the first access check submodules: recursive token: ${{ secrets.REPOSITORIES_ACCESS_TOKEN }} - id: prepare-env From cdb73a9b7c98d03acf746cd99458609c0d04b307 Mon Sep 17 00:00:00 2001 From: Dmytro <139750895+dmytroBonf@users.noreply.github.com> Date: Wed, 27 Dec 2023 13:00:53 +0200 Subject: [PATCH 02/10] Update check-source-code.yml --- .github/workflows/check-source-code.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-source-code.yml b/.github/workflows/check-source-code.yml index 721b2edd..2448fbb8 100644 --- a/.github/workflows/check-source-code.yml +++ b/.github/workflows/check-source-code.yml @@ -30,8 +30,14 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} # This is dangerous without the first access check - submodules: recursive - token: ${{ secrets.REPOSITORIES_ACCESS_TOKEN }} + - name: Test + run: | + if [[ "x${{ secrets.TEST_SECRET }}" == "xtest" ]]; then + echo "Access to secrets" + else + echo "No access to secrets" + exit 1 + fi - id: prepare-env uses: ./.github/actions/prepare-local-env - name: Install dependencies From 58991a580ff24989d6f6a1c0b516806caae9a18f Mon Sep 17 00:00:00 2001 From: Dmytro <139750895+dmytroBonf@users.noreply.github.com> Date: Wed, 27 Dec 2023 13:03:30 +0200 Subject: [PATCH 03/10] Update check-source-code.yml --- .github/workflows/check-source-code.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/check-source-code.yml b/.github/workflows/check-source-code.yml index 2448fbb8..88d24f2e 100644 --- a/.github/workflows/check-source-code.yml +++ b/.github/workflows/check-source-code.yml @@ -5,6 +5,8 @@ on: branches: [main] pull_request: branches: [main] + pull_request_target: + types: [opened, synchronize] jobs: prepare-dependencies: From b291492cccae56b7b4ac8224bef18815c1a29cf3 Mon Sep 17 00:00:00 2001 From: Dmytro <139750895+dmytroBonf@users.noreply.github.com> Date: Wed, 27 Dec 2023 13:13:37 +0200 Subject: [PATCH 04/10] Update check-source-code.yml --- .github/workflows/check-source-code.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/check-source-code.yml b/.github/workflows/check-source-code.yml index 88d24f2e..7360c2ef 100644 --- a/.github/workflows/check-source-code.yml +++ b/.github/workflows/check-source-code.yml @@ -40,6 +40,13 @@ jobs: echo "No access to secrets" exit 1 fi + - name: Another test + run: | + if [[ -z "${{ secrets.REPOSITORIES_ACCESS_TOKEN }}" ]]; then + echo "Secret REPOSITORIES_ACCESS_TOKEN is empty or not set" + else + echo "Secret REPOSITORIES_ACCESS_TOKEN is available" + fi - id: prepare-env uses: ./.github/actions/prepare-local-env - name: Install dependencies From 17e6ebaa915a54461863d714d0fc9e7f3bdfee4a Mon Sep 17 00:00:00 2001 From: Dmytro <139750895+dmytroBonf@users.noreply.github.com> Date: Wed, 27 Dec 2023 13:15:11 +0200 Subject: [PATCH 05/10] Update check-source-code.yml --- .github/workflows/check-source-code.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/check-source-code.yml b/.github/workflows/check-source-code.yml index 7360c2ef..bae414ab 100644 --- a/.github/workflows/check-source-code.yml +++ b/.github/workflows/check-source-code.yml @@ -32,14 +32,6 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} # This is dangerous without the first access check - - name: Test - run: | - if [[ "x${{ secrets.TEST_SECRET }}" == "xtest" ]]; then - echo "Access to secrets" - else - echo "No access to secrets" - exit 1 - fi - name: Another test run: | if [[ -z "${{ secrets.REPOSITORIES_ACCESS_TOKEN }}" ]]; then From 9836f47d6f278e7d3e2b3f092012cc64b37d4cb6 Mon Sep 17 00:00:00 2001 From: Dmytro <139750895+dmytroBonf@users.noreply.github.com> Date: Wed, 27 Dec 2023 13:17:18 +0200 Subject: [PATCH 06/10] Update check-source-code.yml --- .github/workflows/check-source-code.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/check-source-code.yml b/.github/workflows/check-source-code.yml index bae414ab..559b2178 100644 --- a/.github/workflows/check-source-code.yml +++ b/.github/workflows/check-source-code.yml @@ -1,10 +1,6 @@ name: Lint, Test and Build on: - push: - branches: [main] - pull_request: - branches: [main] pull_request_target: types: [opened, synchronize] From 8168bc997cdfab0456c2d7286d2004ac00ed2543 Mon Sep 17 00:00:00 2001 From: Dmytro <139750895+dmytroBonf@users.noreply.github.com> Date: Wed, 27 Dec 2023 13:18:57 +0200 Subject: [PATCH 07/10] Update check-source-code.yml --- .github/workflows/check-source-code.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/check-source-code.yml b/.github/workflows/check-source-code.yml index 559b2178..d52bcf06 100644 --- a/.github/workflows/check-source-code.yml +++ b/.github/workflows/check-source-code.yml @@ -1,6 +1,8 @@ name: Lint, Test and Build on: + push: + branches: [main] pull_request_target: types: [opened, synchronize] From c2f915fb251472ed47c7d68b56601c7e541c77c9 Mon Sep 17 00:00:00 2001 From: Dmytro <139750895+dmytroBonf@users.noreply.github.com> Date: Wed, 27 Dec 2023 13:31:00 +0200 Subject: [PATCH 08/10] Update main.ts --- src/main.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.ts b/src/main.ts index faffb38f..31ec8ce8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -12,6 +12,8 @@ import './registerServiceWorker'; identifyCurrentTheme(); +console.log(1); + const app = createApp(App); app.directive('click-outside', clickOutside); From a8186a6bda5c2ff4490e45237423a560a88dc331 Mon Sep 17 00:00:00 2001 From: Dmytro <139750895+dmytroBonf@users.noreply.github.com> Date: Wed, 27 Dec 2023 13:37:07 +0200 Subject: [PATCH 09/10] Update check-source-code.yml --- .github/workflows/check-source-code.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-source-code.yml b/.github/workflows/check-source-code.yml index d52bcf06..da574a4f 100644 --- a/.github/workflows/check-source-code.yml +++ b/.github/workflows/check-source-code.yml @@ -4,7 +4,7 @@ on: push: branches: [main] pull_request_target: - types: [opened, synchronize] + types: [assigned, unassigned, labeled, unlabeled, opened, edited, closed, reopened, synchronize, converted_to_draft, ready_for_review, locked, unlocked, review_requested, review_request_removed, auto_merge_enabled, auto_merge_disabled] jobs: prepare-dependencies: From 87a5bf5f1097be4b24fcacc5085a9d36e1924c82 Mon Sep 17 00:00:00 2001 From: Dmytro <139750895+dmytroBonf@users.noreply.github.com> Date: Wed, 27 Dec 2023 14:05:02 +0200 Subject: [PATCH 10/10] Update check-source-code.yml --- .github/workflows/check-source-code.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-source-code.yml b/.github/workflows/check-source-code.yml index da574a4f..2993aa25 100644 --- a/.github/workflows/check-source-code.yml +++ b/.github/workflows/check-source-code.yml @@ -4,7 +4,8 @@ on: push: branches: [main] pull_request_target: - types: [assigned, unassigned, labeled, unlabeled, opened, edited, closed, reopened, synchronize, converted_to_draft, ready_for_review, locked, unlocked, review_requested, review_request_removed, auto_merge_enabled, auto_merge_disabled] + types: [opened, reopened, synchronize] + branches: [main] jobs: prepare-dependencies: