From 35c976d39b557cfdba50ce076ac9a576eb6ecaf6 Mon Sep 17 00:00:00 2001 From: Benny Neugebauer Date: Sun, 7 Nov 2021 18:15:53 +0100 Subject: [PATCH] feat(ci): Automatically add GitHub labels to PRs (#349) --- .github/labeler.yml | 14 ++++++++++++++ .github/workflows/generate-labels.yml | 14 ++++++++++++++ .github/workflows/{nodejs.yml => run-tests.yml} | 2 +- 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/generate-labels.yml rename .github/workflows/{nodejs.yml => run-tests.yml} (96%) diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 000000000..b7bf2b247 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,14 @@ +'type: bug(fix) ๐Ÿž': + title: '^fix(\(.+\))?:.*' +'type: chore ๐Ÿงน': + title: '^chore(\(.+\))?:.*' +'type: docs ๐Ÿ“‹': + title: '^docs(\(.+\))?:.*' +'type: feature โœจ': + title: '^feat(\(.+\))?:.*' +'type: refactor ๐Ÿ”ง': + title: '^refactor(\(.+\))?:.*' +'type: style ๐ŸŽจ': + title: '^style(\(.+\))?:.*' +'type: test ๐Ÿงช': + title: '^test(\(.+\))?:.*' diff --git a/.github/workflows/generate-labels.yml b/.github/workflows/generate-labels.yml new file mode 100644 index 000000000..7aa5d70f4 --- /dev/null +++ b/.github/workflows/generate-labels.yml @@ -0,0 +1,14 @@ +name: 'Generate Labels' + +on: + pull_request: + types: [opened, edited, synchronize] + +jobs: + label: + name: 'Label PR based on title' + runs-on: ubuntu-latest + steps: + - uses: srvaroa/labeler@v0.8 + env: + GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/nodejs.yml b/.github/workflows/run-tests.yml similarity index 96% rename from .github/workflows/nodejs.yml rename to .github/workflows/run-tests.yml index 26f1fe4a7..a3b7c9dac 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/run-tests.yml @@ -1,4 +1,4 @@ -name: Continuous Integration +name: 'Run Tests' on: [push, pull_request]