From ff4f41509ff97e5dd246220c61d189e8d8179bef Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Wed, 14 Jul 2021 18:42:55 +0200 Subject: [PATCH] chore: automatically label new pull requests (#400) --- .github/labeler.yml | 12 ++++++++ .github/workflows/pr.yml | 61 ++++++++++++++++++++++++---------------- 2 files changed, 48 insertions(+), 25 deletions(-) create mode 100644 .github/labeler.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 000000000..4795a72f6 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,12 @@ +'feature: cli': + - packages/cli/**/* + - packages/config/**/* +'feature: dep-check': + - packages/dep-check/**/* +'feature: metro': + - packages/babel-plugin-import-path-remapper/**/* + - packages/babel-preset-metro-react-native/**/* + - packages/metro-*/**/* + - packages/typescript-service/**/* +'feature: third party notices': + - packages/third-party-notices/**/* diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 157d75599..ceba47a2c 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -1,6 +1,34 @@ name: CI on: pull_request jobs: + review: + name: "Review" + runs-on: ubuntu-latest + steps: + - name: Set up Node 14 + uses: actions/setup-node@v2.2.0 + with: + node-version: 14 + - name: Checkout + uses: actions/checkout@v2.3.4 + - name: Deduplicate packages + run: | + npx yarn-deduplicate --list --fail + - name: Cache /.yarn-offline-mirror + uses: actions/cache@v2.1.6 + with: + path: .yarn-offline-mirror + key: ${{ hashFiles('yarn.lock') }} + - name: Install package dependencies + run: yarn ci + - name: Check for change files + run: yarn run check + - name: Format + run: yarn format + - name: Align dependencies + run: yarn rnx-dep-check --write + - name: Report changes + run: git diff | GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} yarn suggestion-bot build: name: "Build" strategy: @@ -38,31 +66,14 @@ jobs: yarn bundle+esbuild shell: bash working-directory: packages/test-app - review: - name: "Review" + label: + name: "Label" runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write steps: - - name: Set up Node 14 - uses: actions/setup-node@v2.2.0 + - uses: actions/labeler@v2 with: - node-version: 14 - - name: Checkout - uses: actions/checkout@v2.3.4 - - name: Deduplicate packages - run: | - npx yarn-deduplicate --list --fail - - name: Cache /.yarn-offline-mirror - uses: actions/cache@v2.1.6 - with: - path: .yarn-offline-mirror - key: ${{ hashFiles('yarn.lock') }} - - name: Install package dependencies - run: yarn ci - - name: Check for change files - run: yarn run check - - name: Format - run: yarn format - - name: Align dependencies - run: yarn rnx-dep-check --write - - name: Report changes - run: git diff | GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} yarn suggestion-bot + repo-token: "${{ secrets.GITHUB_TOKEN }}" + sync-labels: true