From beedc6d2c71de491691dc6719e9129f754f7a58d Mon Sep 17 00:00:00 2001 From: Kowlin Date: Thu, 7 Jan 2021 18:09:14 +0100 Subject: [PATCH] [CI/meta] Add automatic labeling of changed files. (#4674) * Theoretically this should work! * Update .github/labeler.yml Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> * Update .github/labeler.yml Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> * Update .github/labeler.yml Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> * Update .github/labeler.yml Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> * Update .github/labeler.yml Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> * Update .github/labeler.yml Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> * *ughhh* Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> --- .github/labeler.yml | 91 +++++++++++++++++++ ...to_labeler.yml => auto_labeler_issues.yml} | 2 +- .github/workflows/auto_labeler_pr.yml | 12 +++ 3 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 .github/labeler.yml rename .github/workflows/{auto_labeler.yml => auto_labeler_issues.yml} (96%) create mode 100644 .github/workflows/auto_labeler_pr.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 000000000..e6e1d6578 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,91 @@ +"Category: Admin": + - redbot/cogs/admin/* +"Category: Alias": + - redbot/cogs/alias/* +"Category: Audio Cog": + - redbot/cogs/audio/**/* + - !redbot/cogs/audio/**/locales/* +"Category: Bank API": + - redbot/core/bank.py +"Category: Bank Cog": + - redbot/cogs/bank/* +"Category: Bot Core": + - redbot/* + - redbot/core/__init__.py + - redbot/core/_sharedlibdeprecation.py + - redbot/core/bot.py + - redbot/core/checks.py + - redbot/core/cli.py + - redbot/core/cog_manager.py + - redbot/core/core_commands.py + - redbot/core/data_manager.py + - redbot/core/errors.py + - redbot/core/events.py + - redbot/core/global_checks.py + - redbot/core/settings_caches.py +"Category: CI": + - .github/workflows/* +"Category: Cleanup Cog": + - redbot/cogs/cleanup/* +"Category: Command Module": + - redbot/core/commands/* + - !redbot/core/commands/help.py +"Category: Config": + - redbot/core/drivers/* + - redbot/core/config.py +"Category: CustomCom": + - redbot/cogs/customcom/* +"Category: Dev Cog": + - redbot/core/dev_commands.py +"Category: Docs": + - docs/**/* +"Category: Downloader": + - redbot/cogs/downloader/* +"Category: Economy Cog": + - redbot/cogs/economy/* +"Category: Filter": + - redbot/cogs/filter/* +"Category: General Cog": + - redbot/cogs/general/* +"Category: Help": + - redbot/core/commands/help.py +"Category: i18n": + - redbot/core/i18n.py + - redbot/**/locales/* +"Category: Image": + - redbot/cogs/image/* +"Category: Meta": + - ./* + - .github/* + - .github/ISSUE_TEMPLATE/* + - .github/PULL_REQUEST_TEMPLATE/* + - schema/* + - tools/* +"Category: Mod Cog": + - redbot/cogs/mod/* +"Category: Modlog API": + - redbot/core/generic_casetypes.py + - redbot/core/modlog.py +"Category: Modlog Cog": + - redbot/cogs/modlog/* +"Category: Mutes Cog": + - redbot/cogs/mutes/* +"Category: Permissions": + - redbot/cogs/permissions/* +"Category: Reports Cog": + - redbot/cogs/reports/* +"Category: RPC/ZMQ API": + - redbot/core/rpc.py +"Category: Streams": + - redbot/cogs/streams/* +"Category: Tests": + - redbot/pytest/* + - tests/**/* +"Category: Trivia Cog": + - redbot/cogs/trivia/* +"Category: Trivia Lists": + - redbot/cogs/trivia/data/lists/* +"Category: Utility Functions": + - redbot/core/utils/* +"Category: Warnings": + - redbot/cogs/warnings/* diff --git a/.github/workflows/auto_labeler.yml b/.github/workflows/auto_labeler_issues.yml similarity index 96% rename from .github/workflows/auto_labeler.yml rename to .github/workflows/auto_labeler_issues.yml index 3d9087446..0d8f7c1f8 100644 --- a/.github/workflows/auto_labeler.yml +++ b/.github/workflows/auto_labeler_issues.yml @@ -1,4 +1,4 @@ -name: Auto Labeler +name: Auto Labeler - Issues on: issues: types: [opened] diff --git a/.github/workflows/auto_labeler_pr.yml b/.github/workflows/auto_labeler_pr.yml new file mode 100644 index 000000000..7f26d9dff --- /dev/null +++ b/.github/workflows/auto_labeler_pr.yml @@ -0,0 +1,12 @@ +name: Auto Labeler - PRs +on: + pull_request_target: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Apply Type Label + uses: actions/labeler@v2 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}"