From 4386ae2aae937612a5289e87dcd22720e5c414c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Wed, 28 Jun 2023 17:02:46 +0200 Subject: [PATCH 1/4] add write permission for issues --- .github/workflows/release-drafter.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 995535e..d98bcd6 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -20,11 +20,12 @@ permissions: jobs: update-release-draft: permissions: - # write permission is required to create a github release + # write permission is required to create a GitHub release contents: write # write permission is required for autolabeler # otherwise, read permission is required at least pull-requests: write + issues: write runs-on: "ubuntu-latest" From 8c5ea33cc64716b88f18c0a711936e711d6ae356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Wed, 28 Jun 2023 17:25:18 +0200 Subject: [PATCH 2/4] update workflows --- .github/workflows/cleanup-caches.yml | 2 +- .github/workflows/codeql.yml | 6 +++--- .github/workflows/labels.yml | 11 ++++++++++- .github/workflows/lock-closed-issues.yml | 2 +- .github/workflows/reactions.yml | 8 ++++---- .github/workflows/release-drafter.yml | 8 +++++--- 6 files changed, 24 insertions(+), 13 deletions(-) diff --git a/.github/workflows/cleanup-caches.yml b/.github/workflows/cleanup-caches.yml index cebe361..ff7c97f 100644 --- a/.github/workflows/cleanup-caches.yml +++ b/.github/workflows/cleanup-caches.yml @@ -2,7 +2,7 @@ name: cleanup caches by a branch on: pull_request: types: - - closed + - "closed" workflow_dispatch: jobs: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index bf7ff0f..8288794 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -14,13 +14,13 @@ name: "CodeQL" on: push: branches: - - master + - "master" pull_request: # The branches below must be a subset of the branches above branches: - - master + - "master" schedule: - - cron: '28 0 * * 0' + - cron: "28 0 * * 0" jobs: analyze: diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml index 242070b..5ba35c1 100644 --- a/.github/workflows/labels.yml +++ b/.github/workflows/labels.yml @@ -5,12 +5,21 @@ name: "Sync labels in the declarative way" on: push: branches: - - master + - "master" + paths: + - ".github/labels.yml" + - ".github/workflows/labels.yml" + +permissions: + contents: read jobs: build: name: "Sync labels" + permissions: + issues: write + runs-on: ubuntu-latest steps: diff --git a/.github/workflows/lock-closed-issues.yml b/.github/workflows/lock-closed-issues.yml index cc9e58e..017bf7c 100644 --- a/.github/workflows/lock-closed-issues.yml +++ b/.github/workflows/lock-closed-issues.yml @@ -3,7 +3,7 @@ name: Lock closed issue on: issues: types: - - closed + - "closed" jobs: lock: diff --git a/.github/workflows/reactions.yml b/.github/workflows/reactions.yml index 7bff014..f86d186 100644 --- a/.github/workflows/reactions.yml +++ b/.github/workflows/reactions.yml @@ -5,12 +5,12 @@ name: 'Reaction Comments' on: issue_comment: types: - - created - - edited + - "created" + - "edited" pull_request_review_comment: types: - - created - - edited + - "created" + - "edited" permissions: actions: write diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index d98bcd6..7a6a6bf 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -6,11 +6,14 @@ on: push: # branches to consider in the event; optional, defaults to all branches: - - master + - "master" # pull_request event is required only for autolabeler pull_request: # Only following types are handled by the action, but one can default to all as well - types: [opened, reopened, synchronize] + types: + - "opened" + - "reopened" + - "synchronize" # pull_request_target event is required for autolabeler to support PRs from forks pull_request_target: @@ -25,7 +28,6 @@ jobs: # write permission is required for autolabeler # otherwise, read permission is required at least pull-requests: write - issues: write runs-on: "ubuntu-latest" From 0f43c4a29f2070c6af0e1dc58174a7c66cbec1cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Wed, 28 Jun 2023 17:39:40 +0200 Subject: [PATCH 3/4] add new labels --- .github/labels.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/labels.yml b/.github/labels.yml index 48e250a..33806f9 100644 --- a/.github/labels.yml +++ b/.github/labels.yml @@ -53,6 +53,15 @@ - color: 0075ca name: "documentation" description: "Improvements or additions to documentation" +- color: 84175d + name: "major" + description: "Major change" +- color: d86c28 + name: "minor" + description: "Minor change" +- color: 0a9b47 + name: "patch" + description: "Patch" # other Labels to mimmi20/laminas-router-hostname #- color: 5319e7 From d7afe291ba3e8f901f029c242d025e6e7477b8b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Wed, 28 Jun 2023 17:48:32 +0200 Subject: [PATCH 4/4] update workflow --- .github/release-drafter.yml | 6 ++++++ .github/workflows/release-drafter.yml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 1378dbb..7a9c763 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -10,6 +10,9 @@ template: | change-template: "- $TITLE by @$AUTHOR (#$NUMBER)" change-title-escapes: '\<*_&#@`' # You can add # and @ to disable mentions, and add ` to disable code blocks. no-changes-template: "- No changes" +name-template: "$RESOLVED_VERSION" +tag-template: "$RESOLVED_VERSION" +version-template: "$MAJOR.$MINOR.$PATCH" exclude-labels: - "duplicate" @@ -22,10 +25,12 @@ version-resolver: labels: - "bc break" - "removed" + - "major" minor: labels: - "deprecated" - "security" + - "minor" patch: labels: - "bug" @@ -33,6 +38,7 @@ version-resolver: - "enhancement" - "maintenance" - "documentation" + - "patch" default: patch autolabeler: diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 7a6a6bf..18b7988 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -15,7 +15,7 @@ on: - "reopened" - "synchronize" # pull_request_target event is required for autolabeler to support PRs from forks - pull_request_target: + # pull_request_target: permissions: contents: read