diff --git a/.github/workflows/reusable-add-reviewers-to-pr.yml b/.github/workflows/reusable-add-reviewers-to-pr.yml new file mode 100644 index 0000000..2de3160 --- /dev/null +++ b/.github/workflows/reusable-add-reviewers-to-pr.yml @@ -0,0 +1,52 @@ +name: Add reviewers to PRs + +on: + pull_request_target: + branches: ['master', 'next'] + types: ['labeled'] + workflow_call: + inputs: + team-slug: + description: 'The slug of the team from which reviewers get collected' + required: true + type: string + label-name: + description: 'The name of the label that triggers the action' + required: true + type: string + secrets: + token: + description: 'The github token to use for the API calls. You can use the GITHUB_TOKEN secret' + required: true + type: string + +permissions: {} + +jobs: + add-reviewers-to-pr: + # Tests that label is added on the PR + if: ${{ github.event.label.name == inputs.label-name }} + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + steps: + - id: get-members + run: | + DATA=$(gh api \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + /orgs/${{ github.repository_owner }}/teams/${{ inputs.team-slug }}/members?role=maintainer&per_page=100 \ + | jq 'reduce inputs as $i (.; . += $i)') \ + echo "data=$DATA" >> $GITHUB_OUTPUT + + # assign reviewers + - id: assign-reviewers + run: | + curl -L \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.token }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/${{ github.repository_owner }}/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/requested_reviewers \ + -d '{"reviewers":[${{ join(fromJson(steps.get-members.outputs.data).*.login) }}]}' \ diff --git a/.gitignore b/.gitignore index 54ec02a..9486446 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,9 @@ src .env.test.local .env.production.local +# IDE specific files +.idea + npm-debug.log* yarn-debug.log* yarn-error.log* @@ -53,4 +56,4 @@ packages/toolpad-app/public/typings.json packages/toolpad-app/prisma/generated -.toolpad-generated \ No newline at end of file +.toolpad-generated diff --git a/tools-public/devlake/docker-compose.yml b/tools-public/devlake/docker-compose.yml deleted file mode 100644 index 620375b..0000000 --- a/tools-public/devlake/docker-compose.yml +++ /dev/null @@ -1,85 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -version: "3" -services: - mysql: - image: mysql:8 - volumes: - - mysql-storage:/var/lib/mysql - restart: always - ports: - - 3306:3306 - environment: - MYSQL_ROOT_PASSWORD: admin - MYSQL_DATABASE: lake - MYSQL_USER: merico - MYSQL_PASSWORD: merico - TZ: UTC - command: --character-set-server=utf8mb4 - --collation-server=utf8mb4_bin - --skip-log-bin - --sql-mode="" - - grafana: - image: devlake.docker.scarf.sh/apache/devlake-dashboard:v0.18.0 - ports: - - 3002:3000 - volumes: - - grafana-storage:/var/lib/grafana - environment: - GF_SERVER_ROOT_URL: "http://localhost:4000/grafana" - GF_USERS_DEFAULT_THEME: "light" - MYSQL_URL: mysql:3306 - MYSQL_DATABASE: lake - MYSQL_USER: merico - MYSQL_PASSWORD: merico - TZ: UTC - restart: always - depends_on: - - mysql - - devlake: - image: devlake.docker.scarf.sh/apache/devlake:v0.18.0 - ports: - - 8080:8080 - restart: always - volumes: - - devlake-log:/app/logs - env_file: - - ./.env - environment: - LOGGING_DIR: /app/logs - TZ: UTC - depends_on: - - mysql - - config-ui: - image: devlake.docker.scarf.sh/apache/devlake-config-ui:v0.18.0 - ports: - - 4000:4000 - env_file: - - ./.env - environment: - DEVLAKE_ENDPOINT: devlake:8080 - GRAFANA_ENDPOINT: grafana:3000 - TZ: UTC - depends_on: - - devlake - -volumes: - mysql-storage: - grafana-storage: - devlake-log: