From 6cd033e0002a89311d418f02b383001b61f3980e Mon Sep 17 00:00:00 2001 From: Denys Kondratenko Date: Wed, 24 Mar 2021 14:39:35 +0100 Subject: [PATCH 1/6] Adding auto assign review team Add gh action that would assign review team for the PR that are ready. Clean PR template. --- .github/pull_request_template.md | 10 +++++++++- .github/workflows/ready-for-review.yml | 15 +++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ready-for-review.yml diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index d9656a97e..704806f26 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,3 +1,11 @@ +[PMM-XXXX](https://jira.percona.com/browse/PMM-XXXX) (optional, if ticket reported) +- [ ] Links to other linked pull requests (optional). +--- +- [ ] Tests passed. +- [ ] Fix conflicts with target branch. +- [ ] Update jira ticket description if needed. +- [ ] Attach screenshots/console output to confirm new behavior to jira ticket, if applicable. -When all checks have passed and code is ready for the review, please add `pmm-review-exporters` as the reviewer. That would assign people from the review team automatically. \ No newline at end of file + +When all checks have passed and code is ready for the review, bot should add `pmm-review-exporters` team as the reviewer. That would assign people from the review team automatically. Report any issues on our [Forums](https://forums.percona.com) and [Discord](https://discord.gg/mQEyGPkNbR). diff --git a/.github/workflows/ready-for-review.yml b/.github/workflows/ready-for-review.yml new file mode 100644 index 000000000..acaae9df8 --- /dev/null +++ b/.github/workflows/ready-for-review.yml @@ -0,0 +1,15 @@ +name: "Assign Reviewers" +on: + pull_request: + types: [opened, ready_for_review] + +jobs: + assign-reviewers: + runs-on: ubuntu-latest + steps: + - name: "Assign Team for the review" + uses: percona-platform/auto-assign-review-teams@v1.0.1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + teams: "pmm-review-exporters" + skip-with-manual-reviewers: 2 From 73e3e2fd4f90cf60153812f5c0cec5bcbe54c1bf Mon Sep 17 00:00:00 2001 From: Denys Kondratenko Date: Wed, 24 Mar 2021 14:48:16 +0100 Subject: [PATCH 2/6] only for ready PR --- .github/workflows/ready-for-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ready-for-review.yml b/.github/workflows/ready-for-review.yml index acaae9df8..5783381a3 100644 --- a/.github/workflows/ready-for-review.yml +++ b/.github/workflows/ready-for-review.yml @@ -1,7 +1,7 @@ name: "Assign Reviewers" on: pull_request: - types: [opened, ready_for_review] + types: [ready_for_review] jobs: assign-reviewers: From 971854f88fecb9530f36dac9d8bef8c340314cc5 Mon Sep 17 00:00:00 2001 From: Denys Kondratenko Date: Wed, 24 Mar 2021 17:38:56 +0100 Subject: [PATCH 3/6] use our updated version --- .github/workflows/ready-for-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ready-for-review.yml b/.github/workflows/ready-for-review.yml index 5783381a3..40118ca9b 100644 --- a/.github/workflows/ready-for-review.yml +++ b/.github/workflows/ready-for-review.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - name: "Assign Team for the review" - uses: percona-platform/auto-assign-review-teams@v1.0.1 + uses: percona-platform/auto-assign-review-teams@p1.0.1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} teams: "pmm-review-exporters" From 7f588cdee39af41627379c0ae6295624a6224aa9 Mon Sep 17 00:00:00 2001 From: Denys Kondratenko Date: Wed, 24 Mar 2021 18:29:01 +0100 Subject: [PATCH 4/6] adding org to a team name --- .github/workflows/ready-for-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ready-for-review.yml b/.github/workflows/ready-for-review.yml index 40118ca9b..ad830606b 100644 --- a/.github/workflows/ready-for-review.yml +++ b/.github/workflows/ready-for-review.yml @@ -11,5 +11,5 @@ jobs: uses: percona-platform/auto-assign-review-teams@p1.0.1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - teams: "pmm-review-exporters" + teams: "@percona/pmm-review-exporters" skip-with-manual-reviewers: 2 From 6fe7887263026251e361299aa266cc69243caccc Mon Sep 17 00:00:00 2001 From: Denys Kondratenko Date: Wed, 24 Mar 2021 18:34:48 +0100 Subject: [PATCH 5/6] adding org to a team name2 --- .github/workflows/ready-for-review.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ready-for-review.yml b/.github/workflows/ready-for-review.yml index ad830606b..99dfdb636 100644 --- a/.github/workflows/ready-for-review.yml +++ b/.github/workflows/ready-for-review.yml @@ -8,8 +8,8 @@ jobs: runs-on: ubuntu-latest steps: - name: "Assign Team for the review" - uses: percona-platform/auto-assign-review-teams@p1.0.1 + uses: percona-platform/auto-assign-review-teams@v1.0.1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - teams: "@percona/pmm-review-exporters" + teams: "teams:@percona/pmm-review-exporters" skip-with-manual-reviewers: 2 From 40607318d263afe44d21e10e93bb9855b286c47e Mon Sep 17 00:00:00 2001 From: Denys Kondratenko Date: Wed, 24 Mar 2021 18:41:44 +0100 Subject: [PATCH 6/6] adding org to a team name3 --- .github/workflows/ready-for-review.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ready-for-review.yml b/.github/workflows/ready-for-review.yml index 99dfdb636..9d96b89b1 100644 --- a/.github/workflows/ready-for-review.yml +++ b/.github/workflows/ready-for-review.yml @@ -8,8 +8,8 @@ jobs: runs-on: ubuntu-latest steps: - name: "Assign Team for the review" - uses: percona-platform/auto-assign-review-teams@v1.0.1 + uses: percona-platform/auto-assign-review-teams@v.1.0.1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - teams: "teams:@percona/pmm-review-exporters" + teams: "pmm-review-exporters" skip-with-manual-reviewers: 2