From 558a06bcfc8c3644876792f51148d5fec1f126c5 Mon Sep 17 00:00:00 2001 From: Randolph Sapp Date: Fri, 1 Nov 2024 22:14:49 -0500 Subject: [PATCH] ci(component-owners): try using component-owners Try using component-owners intead of CODEOWNERS since the latter requires write permission to the repo. Signed-off-by: Randolph Sapp --- .github/component-owners.yml | 32 ++++++++++++++++++++++++++ .github/workflows/component-owners.yml | 31 +++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 .github/component-owners.yml create mode 100644 .github/workflows/component-owners.yml diff --git a/.github/component-owners.yml b/.github/component-owners.yml new file mode 100644 index 000000000..b3fbb0d9c --- /dev/null +++ b/.github/component-owners.yml @@ -0,0 +1,32 @@ +--- +# Each component identified by its path prefix has a list of owners +components: + + # Ownership applies recursively to any file in a directory + + ./: + - cshilwant + - StaticRocket + - praneethbajjuri + - uditkumarti + + source/buildroot/: + - TexasInstruments/sitara-mpu-linux-sdk + + source/debian/: + - TexasInstruments/sitara-mpu-linux-sdk + + source/system/: + - TexasInstruments/sitara-mpu-linux-sdk + + source/linux/Overview/: + - TexasInstruments/sitara-mpu-linux-sdk + + source/linux/Foundational_Components/: + - praneethbajjuri + - uditkumarti + - r-vignesh + + source/linux/Foundational_Components/Power_Management/: + - praneethbajjuri + - DhruvaG2000 diff --git a/.github/workflows/component-owners.yml b/.github/workflows/component-owners.yml new file mode 100644 index 000000000..d97515939 --- /dev/null +++ b/.github/workflows/component-owners.yml @@ -0,0 +1,31 @@ +--- +name: "component-owners" + +on: + # It's insecure to use pull_request_target if you intend to check out code + # from that PR. This just reads the config file in the pull request base, and + # is not an issue currently. We will need to use this to comment on PRs coming + # from forked repositories. + pull_request_target: + branches: [master] + +permissions: + # Clamp permissions since pull_request_target workflows granted full + # read/write repository permission by default + contents: read + issues: write + pull-requests: write + +jobs: + component-owners: + name: Assign component owners + runs-on: ubuntu-latest + + steps: + - name: Assign component owners + uses: dyladan/component-owners@main + with: + config-file: .github/component-owners.yml + repo-token: ${{ github.token }} + assign-owners: true + request-owner-reviews: true