From e162b74cc69820fc0c0e1807f6f10c4c43078a7c Mon Sep 17 00:00:00 2001 From: Robert Pajak Date: Thu, 29 Apr 2021 16:21:12 +0200 Subject: [PATCH 1/3] Improve maintainers and approvers rules --- docs/repository.md | 15 ++++++++++++--- docs/templates/.github/CODEOWNERS | 5 +++++ .../.github/workflows/request-reviews.yml | 19 +++++++++++++++++++ 3 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 docs/templates/.github/CODEOWNERS create mode 100644 docs/templates/.github/workflows/request-reviews.yml diff --git a/docs/repository.md b/docs/repository.md index 1688019ccac..11c9a40a6b7 100644 --- a/docs/repository.md +++ b/docs/repository.md @@ -7,6 +7,15 @@ approval is granted, GDI projects MUST NOT cut a GA release. ## Required Configuration +### Teams + +- MUST have a maintainers team + - MUST have `-maintainers` suffix + - MUST include at least two currently full-time Splunkers + - MUST NOT include any non-full-time Splunkers +- SHOULD have an approvers team + - MUST have `-approvers` suffix + ### Permissions - MUST grant `Admin` [permission level](https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/repository-permission-levels-for-an-organization) to maintainers @@ -59,9 +68,9 @@ Note: the **upstream** project signal you depend on (if any) MUST be stable interested in all the details of every change in the project can use the git log for that. - MUST add the [CODE_OF_CONDUCT.md](templates/CODE_OF_CONDUCT.md) - MUST add the [CONTRIBUTING.md](templates/CONTRIBUTING.md) -- MUST have a `.github/CODEOWNERS` file with approvers - - MUST include at least two currently full-time Splunkers - - MUST NOT include any non-full-time Splunkers +- MUST have a [.github/CODEOWNERS](templates/.github/CODEOWNERS) file with maintainers +- SHOULD have a [.github/workflows/request-reviews.yml](templates/.github/workflows/request-reviews.yml) to automate + requesting reviews from approvers - MUST have an Apache 2.0 `LICENSE` file - SHOULD have a `MIGRATING.md` if applicable - MUST have a `README.md` diff --git a/docs/templates/.github/CODEOWNERS b/docs/templates/.github/CODEOWNERS new file mode 100644 index 00000000000..feafa685804 --- /dev/null +++ b/docs/templates/.github/CODEOWNERS @@ -0,0 +1,5 @@ +# Learn about CODEOWNERS file format: +# https://help.github.com/en/articles/about-code-owners +# +# Global Owners +* @signalfx/TEAM-maintainers diff --git a/docs/templates/.github/workflows/request-reviews.yml b/docs/templates/.github/workflows/request-reviews.yml new file mode 100644 index 00000000000..6417bea7020 --- /dev/null +++ b/docs/templates/.github/workflows/request-reviews.yml @@ -0,0 +1,19 @@ +name: Request review on PRs + +on: + pull_request: + types: + - opened + +jobs: + request: + name: Request reviews on opened PRs + runs-on: ubuntu-20.04 + + steps: + - name: Create PR review request + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh pr edit ${{ github.event.pull_request.html_url }} \ + --add-reviewer signalfx/TEAM-approvers From 4f03a7b37d753af9c80c092232e7017e403747fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Thu, 29 Apr 2021 16:28:16 +0200 Subject: [PATCH 2/3] Update request-reviews.yml --- docs/templates/.github/workflows/request-reviews.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/templates/.github/workflows/request-reviews.yml b/docs/templates/.github/workflows/request-reviews.yml index 6417bea7020..e4bd3e1f21a 100644 --- a/docs/templates/.github/workflows/request-reviews.yml +++ b/docs/templates/.github/workflows/request-reviews.yml @@ -2,14 +2,12 @@ name: Request review on PRs on: pull_request: - types: - - opened + types: [ opened ] jobs: request: name: Request reviews on opened PRs runs-on: ubuntu-20.04 - steps: - name: Create PR review request env: From d1837db63359f8d313a0b0006bf4ada281f9e90f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Thu, 29 Apr 2021 17:25:52 +0200 Subject: [PATCH 3/3] Update docs/repository.md Co-authored-by: Nikita Salnikov-Tarnovski --- docs/repository.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/repository.md b/docs/repository.md index 11c9a40a6b7..c856b725c25 100644 --- a/docs/repository.md +++ b/docs/repository.md @@ -68,7 +68,7 @@ Note: the **upstream** project signal you depend on (if any) MUST be stable interested in all the details of every change in the project can use the git log for that. - MUST add the [CODE_OF_CONDUCT.md](templates/CODE_OF_CONDUCT.md) - MUST add the [CONTRIBUTING.md](templates/CONTRIBUTING.md) -- MUST have a [.github/CODEOWNERS](templates/.github/CODEOWNERS) file with maintainers +- MUST have a [.github/CODEOWNERS](templates/.github/CODEOWNERS) file with a maintainers team - SHOULD have a [.github/workflows/request-reviews.yml](templates/.github/workflows/request-reviews.yml) to automate requesting reviews from approvers - MUST have an Apache 2.0 `LICENSE` file