diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml deleted file mode 100644 index 5258db8..0000000 --- a/.github/workflows/auto-approve.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: 🤖 Auto approve validation -on: pull_request - -env: - JOBS_NAME: '[ "Build" ]' - -jobs: - setup: - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.matrix.outputs.value }} - steps: - - uses: taiga-family/ci/actions/setup/checkout@v1.76.0 - - uses: taiga-family/ci/actions/setup/variables@v1.76.0 - - id: matrix - if: env.IS_TAIGA_FAMILY_BOT_PR_AUTHOR == 'true' - run: echo "value=$JOBS_NAME" >> $GITHUB_OUTPUT - - wait: - needs: [setup] - runs-on: ubuntu-latest - strategy: - fail-fast: true - matrix: - value: ${{ fromJSON(needs.setup.outputs.matrix) }} - steps: - - uses: taiga-family/ci/actions/run/wait-job@v1.76.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - job: ${{ matrix.value }} - - approve: - needs: [wait] - runs-on: ubuntu-latest - steps: - - uses: taiga-family/ci/actions/auto/approve/double@v1.76.0 - with: - token1: ${{ secrets.GITHUB_TOKEN }} - token2: ${{ secrets.TAIGA_FAMILY_APPROVE_BOT_PAT }} - - uses: taiga-family/ci/actions/run/merge@v1.76.0 - with: - token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }} - -concurrency: - group: auto-approve-${{ github.head_ref }} - cancel-in-progress: true diff --git a/.github/workflows/auto-author-assign.yml b/.github/workflows/auto-author-assign.yml deleted file mode 100644 index dab004b..0000000 --- a/.github/workflows/auto-author-assign.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: 🤖 Auto assign -on: - pull_request: - types: [opened, reopened] - -jobs: - assign-author: - name: PR author as an assignee - runs-on: ubuntu-latest - steps: - - uses: taiga-family/ci/actions/setup/checkout@v1.76.0 - - uses: taiga-family/ci/actions/setup/variables@v1.76.0 - - uses: toshimaru/auto-author-assign@v2.1.1 - if: env.IS_OWNER_MODE == 'true' - with: - repo-token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3634702..e0aa5c4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,8 +6,7 @@ on: branches: [main] jobs: - build: - name: Build + ci: runs-on: ubuntu-latest steps: - uses: taiga-family/ci/actions/setup/checkout@v1.76.0 diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..ca44a93 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,89 @@ +name: 🤖 PR suites +on: + pull_request: + pull_request_review: + types: [submitted] + +env: + JOBS_NAME: '[ "ci" ]' + +jobs: + setup: + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.matrix.outputs.value }} + steps: + - uses: taiga-family/ci/actions/setup/checkout@v1.83.0 + - uses: taiga-family/ci/actions/setup/variables@v1.83.0 + - id: matrix + if: env.IS_TAIGA_FAMILY_BOT_PR_AUTHOR == 'true' + run: echo "value=$JOBS_NAME" >> $GITHUB_OUTPUT + + wait: + needs: [setup] + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + value: ${{ fromJSON(needs.setup.outputs.matrix) }} + steps: + - uses: taiga-family/ci/actions/run/wait-job@v1.83.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + job: ${{ matrix.value }} + + approve: + needs: [wait] + runs-on: ubuntu-latest + steps: + - uses: taiga-family/ci/actions/setup/checkout@v1.83.0 + - uses: taiga-family/ci/actions/setup/variables@v1.83.0 + - uses: taiga-family/ci/actions/auto/approve/double@v1.83.0 + continue-on-error: true + with: + token1: ${{ secrets.GITHUB_TOKEN }} + token2: ${{ secrets.TAIGA_FAMILY_APPROVE_BOT_PAT }} + - uses: taiga-family/ci/actions/run/merge@v1.83.0 + continue-on-error: true + with: + token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }} + + label-when-approved: + if: github.event.review.state == 'approved' + name: Label when approved + runs-on: ubuntu-latest + steps: + - uses: taiga-family/ci/actions/setup/checkout@v1.83.0 + - uses: taiga-family/ci/actions/setup/variables@v1.83.0 + - uses: taiga-family/ci/actions/auto/label-when-approved@v1.83.0 + continue-on-error: true + with: + approvals: 2 + token: ${{ secrets.GITHUB_TOKEN }} + + assign-author: + name: PR author as an assignee + runs-on: ubuntu-latest + steps: + - uses: taiga-family/ci/actions/setup/checkout@v1.83.0 + - uses: taiga-family/ci/actions/setup/variables@v1.83.0 + - uses: toshimaru/auto-author-assign@v2.1.1 + continue-on-error: true + with: + repo-token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }} + + label-version: + runs-on: ubuntu-latest + steps: + - uses: taiga-family/ci/actions/setup/checkout@v1.83.0 + - uses: taiga-family/ci/actions/setup/variables@v1.83.0 + - uses: taiga-family/ci/actions/run/node-info@v1.83.0 + id: nodejs-workspace + - uses: actions-ecosystem/action-add-labels@v1 + continue-on-error: true + with: + labels: v${{ steps.nodejs-workspace.outputs.root-package-major-version }} + +concurrency: + group: auto-approve-${{ github.head_ref }} + cancel-in-progress: true diff --git a/package-lock.json b/package-lock.json index 8696cf8..0850f79 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,8 +36,8 @@ "@taiga-ui/stylelint-config": "0.200.0", "@taiga-ui/styles": "4.7.0", "@taiga-ui/tsconfig": "0.200.0", - "@types/express": "4.17.17", - "@types/node": "22.5.0", + "@types/express": "4.17.21", + "@types/node": "22.6.0", "express": "4.18.2", "libphonenumber-js": "1.11.8", "nx": "19.7.4", @@ -4272,16 +4272,6 @@ "node": ">=18" } }, - "node_modules/@inquirer/core/node_modules/@types/node": { - "version": "22.5.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.5.tgz", - "integrity": "sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~6.19.2" - } - }, "node_modules/@inquirer/editor": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-2.2.0.tgz", @@ -6567,9 +6557,9 @@ "license": "MIT" }, "node_modules/@types/express": { - "version": "4.17.17", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz", - "integrity": "sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", + "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", "dev": true, "license": "MIT", "dependencies": { @@ -6650,9 +6640,9 @@ } }, "node_modules/@types/node": { - "version": "22.5.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.0.tgz", - "integrity": "sha512-DkFrJOe+rfdHTqqMg0bSNlGlQ85hSoh2TPzZyhHsXnMtligRWpxUySiyw8FY14ITt24HVCiQPWxS3KO/QlGmWg==", + "version": "22.6.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.6.0.tgz", + "integrity": "sha512-QyR8d5bmq+eR72TwQDfujwShHMcIrWIYsaQFtXRE58MHPTEKUNxjxvl0yS0qPMds5xbSDWtp7ZpvGFtd7dfMdQ==", "dev": true, "license": "MIT", "dependencies": { @@ -22711,19 +22701,6 @@ } } }, - "node_modules/webpack-dev-server/node_modules/@types/express": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", - "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.33", - "@types/qs": "*", - "@types/serve-static": "*" - } - }, "node_modules/webpack-dev-server/node_modules/glob": { "version": "10.4.5", "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", diff --git a/package.json b/package.json index 528f8d6..7d3b36b 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "@taiga-ui/stylelint-config": "0.200.0", "@taiga-ui/styles": "4.7.0", "@taiga-ui/tsconfig": "0.200.0", - "@types/express": "4.17.17", - "@types/node": "22.5.0", + "@types/express": "4.17.21", + "@types/node": "22.6.0", "express": "4.18.2", "libphonenumber-js": "1.11.8", "nx": "19.7.4",