From e76ee845695a3491112f3d7efda472606bbc2afe Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Tue, 23 Jun 2020 10:55:38 +0200 Subject: [PATCH 01/14] Add Release Drafter github action --- .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 fce9de3adadad26b8f73cf7d53429c4d0a8ca6e3 Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Tue, 23 Jun 2020 11:44:33 +0200 Subject: [PATCH 02/14] Add Release Drafter configuration file --- .github/release-drafter.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 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..4d339b4 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,30 @@ +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' + patch: + labels: + - 'patch' + default: patch +template: | + ## Changes + + $CHANGES From be2851ab3f0f20189695974e39cdd1c3314f8b58 Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Tue, 23 Jun 2020 12:21:21 +0200 Subject: [PATCH 03/14] Setup PR Labeler github action --- .github/workflows/pr_labeler.yml | 18 ++++++++++++++++++ 1 file changed, 18 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..40d90bb --- /dev/null +++ b/.github/workflows/pr_labeler.yml @@ -0,0 +1,18 @@ +# 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.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 9bd431b0cff229870c0fd9110890cb047b3b26f7 Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Tue, 23 Jun 2020 12:37:58 +0200 Subject: [PATCH 04/14] 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..a9c89b9 --- /dev/null +++ b/.github/pr-labeler.yml @@ -0,0 +1,3 @@ +feature: ['feature/*', 'feat/*', 'feature-*', 'feat-*'] +fix: ['fix/*', 'fix-*'] +chore: ['chore/*', 'chore-*'] From eab1fde3626ce734a8b1f675950c87611bf79896 Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Tue, 23 Jun 2020 12:44:32 +0200 Subject: [PATCH 05/14] Add PR Labeler github action --- .github/workflows/pr_labeler.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_labeler.yml b/.github/workflows/pr_labeler.yml index 40d90bb..4ac983e 100644 --- a/.github/workflows/pr_labeler.yml +++ b/.github/workflows/pr_labeler.yml @@ -8,11 +8,20 @@ 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.1 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 3700dc0872d610aa46e3b15846acaf0023bd4a35 Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Tue, 23 Jun 2020 12:51:18 +0200 Subject: [PATCH 06/14] Add basic configuration for Pull Request Labeler --- .github/label-pr.yml | 10 ++++++++++ 1 file changed, 10 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..5bf9f18 --- /dev/null +++ b/.github/label-pr.yml @@ -0,0 +1,10 @@ +- regExp: ".*\\.ts+$" + labels: ["typescript"] +- regExp: ".*\\.sql+$" + labels: ["database", "critical"] +- regExp: ".*\\.md+$" + labels: ["documentation"] +- regExp: "^(pom\\.xml|package\\.json|build\\.gradle)$" + labels: ["dependencies"] +- regExp: ".*\\.(zip|jar|war|ear)+$" + labels: ["artifact", "invalid"] From 084f85d5619c96f62cf5d9364c06ab1466c7546a Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Tue, 23 Jun 2020 13:14:00 +0200 Subject: [PATCH 07/14] Fix wrong version number --- .github/workflows/pr_labeler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_labeler.yml b/.github/workflows/pr_labeler.yml index 4ac983e..6747698 100644 --- a/.github/workflows/pr_labeler.yml +++ b/.github/workflows/pr_labeler.yml @@ -11,7 +11,7 @@ jobs: # 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.1 + 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` From 501a79093c37f22d9a5564c7e67fa82fa4e4c38f Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Tue, 23 Jun 2020 16:28:00 +0200 Subject: [PATCH 08/14] Update label-pr.yml --- .github/label-pr.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/label-pr.yml b/.github/label-pr.yml index 5bf9f18..c77aaec 100644 --- a/.github/label-pr.yml +++ b/.github/label-pr.yml @@ -2,9 +2,23 @@ labels: ["typescript"] - regExp: ".*\\.sql+$" labels: ["database", "critical"] -- regExp: ".*\\.md+$" +- 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: "^db_update/" + labels: ["database utilities"] +- regExp: "^control_plane/node-manager/" + labels: ["node manager"] +- regExp: "^control_plane/controller/" + labels: ["controller"] +- regExp: "^control_plane/examples/" + labels: ["examples"] +- regExp: "^control_plane/protos/" + labels: ["protos"] From bab7e5902c34099a2807c31a3aed30c3247a6825 Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Tue, 23 Jun 2020 16:30:36 +0200 Subject: [PATCH 09/14] Update label-pr.yml --- .github/label-pr.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/label-pr.yml b/.github/label-pr.yml index c77aaec..c9fa1e5 100644 --- a/.github/label-pr.yml +++ b/.github/label-pr.yml @@ -22,3 +22,5 @@ labels: ["examples"] - regExp: "^control_plane/protos/" labels: ["protos"] +- regExp: ".*/setup.py" + labels: ["build"] From 59d1a6d18d727f582e4b41fc4432a3069ecb3885 Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Tue, 23 Jun 2020 16:35:35 +0200 Subject: [PATCH 10/14] Update pr-labeler.yml --- .github/pr-labeler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/pr-labeler.yml b/.github/pr-labeler.yml index a9c89b9..d44b184 100644 --- a/.github/pr-labeler.yml +++ b/.github/pr-labeler.yml @@ -1,3 +1,3 @@ feature: ['feature/*', 'feat/*', 'feature-*', 'feat-*'] -fix: ['fix/*', 'fix-*'] +bug: ['fix/*', 'fix-*'] chore: ['chore/*', 'chore-*'] From 47d899f51967de951a7938b5cec9fd90e478e179 Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Tue, 23 Jun 2020 16:46:49 +0200 Subject: [PATCH 11/14] Update release-drafter.yml --- .github/release-drafter.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 4d339b4..a3064d7 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -24,6 +24,8 @@ version-resolver: labels: - 'patch' default: patch +exclude-labels: + - 'skip-changelog' template: | ## Changes From b9779c85b71562ef80553b46df4ba5db38c4c7c9 Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Tue, 23 Jun 2020 16:52:51 +0200 Subject: [PATCH 12/14] Update release-drafter.yml --- .github/release-drafter.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index a3064d7..161d2de 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -20,9 +20,14 @@ version-resolver: minor: labels: - 'minor' + - 'feature' + - 'enhancement' patch: labels: - 'patch' + - 'fix' + - 'bugfix' + - 'bug' default: patch exclude-labels: - 'skip-changelog' From 2bb5c76e97c0efa8dab348ca75d59d753ccd56d6 Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Tue, 23 Jun 2020 16:54:38 +0200 Subject: [PATCH 13/14] Add skip-changelog label to autopep8 PRs This commit adds skip-changelog label to autopep8 PRs in order to exclude them from the changelog messages --- .github/workflows/autopep8.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/autopep8.yml b/.github/workflows/autopep8.yml index 26be6f2..1982903 100644 --- a/.github/workflows/autopep8.yml +++ b/.github/workflows/autopep8.yml @@ -30,7 +30,7 @@ jobs: committer: Carmine Scarpitta title: Fixes by autopep8 action body: This is an auto-generated PR with fixes by autopep8. - labels: autopep8, automated pr + labels: autopep8, automated pr, skip-changelog reviewers: cscarpitta branch: ${{ steps.vars.outputs.branch-name }} - name: Fail if autopep8 made changes From 6cdbfe912f72f342afad363142f251446b847d11 Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Tue, 23 Jun 2020 16:58:37 +0200 Subject: [PATCH 14/14] Update label-pr.yml --- .github/label-pr.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/label-pr.yml b/.github/label-pr.yml index c9fa1e5..734ef3a 100644 --- a/.github/label-pr.yml +++ b/.github/label-pr.yml @@ -24,3 +24,5 @@ labels: ["protos"] - regExp: ".*/setup.py" labels: ["build"] +- regExp: "^.github/" + labels: ["github-workflow"]