From ec68807f5c84c42fb39e4a827e5e999e51f1a8ae Mon Sep 17 00:00:00 2001 From: Sarvjeet Rajvansh Date: Tue, 28 Feb 2023 23:07:52 +0530 Subject: [PATCH 1/2] enhancement : Automate labelling PRs #559 Signed-off-by: Sarvjeet Rajvansh --- .github/labeler.yml | 22 ++++++++++++++++++++++ .github/workflows/prlabeler.yml | 18 ++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/prlabeler.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 00000000..d1433a20 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,22 @@ +#Add "2023" to any change to 2023 project files + +2023: + - summerofcode/2023.md + - lfx-mentorship/2023/* + - lfx-mentorship/2023/**/* + - TAGCS-Mentoring-WG/2023-meeting-minutes.md + +# Add 'summer of code' label to any files in the Summer of Code project +'summer of code': + - summerofcode/* + - summerofcode/**/* + +# Add 'season of docs' label to any files in the season of docs project +'season of docs': + - seasonofdocs/* + - seasonofdocs/**/* + +# Add 'lfx mentorship' label to any files in the lfx mentorship project +'lfx mentorship': + - lfx-mentorship/* + - lfx-mentorship/**/* \ No newline at end of file diff --git a/.github/workflows/prlabeler.yml b/.github/workflows/prlabeler.yml new file mode 100644 index 00000000..8c04e5c7 --- /dev/null +++ b/.github/workflows/prlabeler.yml @@ -0,0 +1,18 @@ +# This workflow is based on github action official label action v4. +# This workflow action is triggered on pull request event(on both fork & inside repo) +# Labels will be applied based on filepath modification in PR. +# This workflow uses a regex based labeling config file(.github/labeler.yml) to take labeling decision. + +name: "PR Labeler" +on: +- pull_request_target +jobs: + label: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v4 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file From cfdaf2498d5fc23b6916c904031fb894c152938a Mon Sep 17 00:00:00 2001 From: Robert Kielty Date: Wed, 1 Mar 2023 17:02:24 +0000 Subject: [PATCH 2/2] Update .github/labeler.yml makes the comment internally consistent Co-authored-by: Nate W. Signed-off-by: Robert Kielty --- .github/labeler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index d1433a20..40495960 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,4 +1,4 @@ -#Add "2023" to any change to 2023 project files +# Add '2023' to any change to 2023 project files 2023: - summerofcode/2023.md