From 679857bc5a609039386033d3b805be48567994c7 Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Tue, 23 Jun 2020 17:11:01 +0200 Subject: [PATCH 1/6] Create release-drafter.yml --- .github/workflows/release-drafter.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/release-drafter.yml diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 0000000..9d39e16 --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,19 @@ +name: Release Drafter + +on: + push: + # branches to consider in the event; optional, defaults to all + branches: + - master + +jobs: + update_release_draft: + runs-on: ubuntu-latest + steps: + # Drafts your next Release notes as Pull Requests are merged into "master" + - uses: release-drafter/release-drafter@v5 + # with: + # (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml + # config-name: my-config.yml + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 98d8dda71ba1793fa8abaa66310ff41450eb0fdb Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Tue, 23 Jun 2020 17:12:09 +0200 Subject: [PATCH 2/6] Setup PR labeler github actions --- .github/workflows/pr_labeler.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/pr_labeler.yml diff --git a/.github/workflows/pr_labeler.yml b/.github/workflows/pr_labeler.yml new file mode 100644 index 0000000..6747698 --- /dev/null +++ b/.github/workflows/pr_labeler.yml @@ -0,0 +1,27 @@ +# Workflow to associate labels automatically +name: labeler + +# Trigger the workflow on pull request events +on: [pull_request] + +jobs: + label: + runs-on: ubuntu-latest + steps: + # We need to checkout the repository to access the configured file (.github/label-pr.yml) + - uses: actions/checkout@v2 + - name: Labeler + uses: docker://decathlon/pull-request-labeler-action:2.0.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Here we can override the path for the action configuration. If none is provided, default one is `.github/label-pr.yml` + # CONFIG_PATH: ${{ secrets.GITHUB_WORKSPACE }}/.github/label-pr.yml + + pr-labeler: + runs-on: ubuntu-latest + steps: + - uses: TimonVS/pr-labeler-action@v3 + # with: + # configuration-path: .github/pr-labeler.yml # optional, .github/pr-labeler.yml is the default value + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 3068c92d0966f166be6a4347fbe015ec6575a56a Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Tue, 23 Jun 2020 17:12:56 +0200 Subject: [PATCH 3/6] Add Release Drafter configuration file --- .github/release-drafter.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/release-drafter.yml diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..b1f5fa5 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,36 @@ +name-template: 'v$RESOLVED_VERSION 🌈' +tag-template: 'v$RESOLVED_VERSION' +categories: + - title: '🚀 Features' + labels: + - 'feature' + - 'enhancement' + - title: '🐛 Bug Fixes' + labels: + - 'fix' + - 'bugfix' + - 'bug' + - title: '🧰 Maintenance' + label: 'chore' +change-template: '- $TITLE @$AUTHOR (#$NUMBER)' +version-resolver: + major: + labels: + - 'major' + minor: + labels: + - 'minor' + - 'feature' + - 'enhancement' + patch: + labels: + - 'patch' + - 'fix' + - 'bugfix' + - 'bug' + default: patch +exclude-labels: + - 'skip-changelog' +template: | + ## Changes + $CHANGES From fea6212f4aece8330a28f2f51546aad398987506 Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Tue, 23 Jun 2020 17:13:33 +0200 Subject: [PATCH 4/6] Add pr-labeler configuration file --- .github/pr-labeler.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .github/pr-labeler.yml diff --git a/.github/pr-labeler.yml b/.github/pr-labeler.yml new file mode 100644 index 0000000..d44b184 --- /dev/null +++ b/.github/pr-labeler.yml @@ -0,0 +1,3 @@ +feature: ['feature/*', 'feat/*', 'feature-*', 'feat-*'] +bug: ['fix/*', 'fix-*'] +chore: ['chore/*', 'chore-*'] From 76d589c75e18d93ed5f83ebb085124c11d4d8d61 Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Tue, 23 Jun 2020 17:14:24 +0200 Subject: [PATCH 5/6] Add label-pr configuration file --- .github/label-pr.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/label-pr.yml diff --git a/.github/label-pr.yml b/.github/label-pr.yml new file mode 100644 index 0000000..7e71596 --- /dev/null +++ b/.github/label-pr.yml @@ -0,0 +1,18 @@ +- regExp: ".*\\.ts+$" + labels: ["typescript"] +- regExp: ".*\\.sql+$" + labels: ["database", "critical"] +- regExp: "^docs/" + labels: ["documentation"] +- regExp: ".*\\.png+$" + labels: ["images"] +- regExp: "^(pom\\.xml|package\\.json|build\\.gradle)$" + labels: ["dependencies"] +- regExp: ".*/requirements.txt" + labels: ["dependencies"] +- regExp: ".*\\.(zip|jar|war|ear)+$" + labels: ["artifact", "invalid"] +- regExp: ".*/setup.py" + labels: ["build"] +- regExp: "^.github/" + labels: ["github-workflow"] From 2662e0c343e68465a9861c53521ed3a6951fb724 Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Tue, 23 Jun 2020 17:33:35 +0200 Subject: [PATCH 6/6] Update label-pr.yml --- .github/label-pr.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/label-pr.yml b/.github/label-pr.yml index 7e71596..e4585e0 100644 --- a/.github/label-pr.yml +++ b/.github/label-pr.yml @@ -2,7 +2,7 @@ labels: ["typescript"] - regExp: ".*\\.sql+$" labels: ["database", "critical"] -- regExp: "^docs/" +- regExp: ".*/docs/" labels: ["documentation"] - regExp: ".*\\.png+$" labels: ["images"] @@ -16,3 +16,5 @@ labels: ["build"] - regExp: "^.github/" labels: ["github-workflow"] +- regExp: ".*/.env" + labels: ["configuration"]