From 6be2a5b52dad43fb3bf8acebe5643835bdecd3e9 Mon Sep 17 00:00:00 2001 From: mohitrajain <20745774+mohitrajain@users.noreply.github.com> Date: Mon, 3 Mar 2025 16:03:29 +0100 Subject: [PATCH 01/16] feat(changelog): WPB-16103 add changelog directory structure and scripts --- changelog.d/0-release-notes/.title | 1 + changelog.d/1-debian-builds/.title | 1 + changelog.d/2-wire-builds/.title | 1 + changelog.d/3-deploy-builds/.title | 1 + changelog.d/4-docs/.title | 1 + changelog.d/5-bug-fixes/.title | 1 + changelog.d/mk-changelog.sh | 54 ++++++++++++++++++++++++++++++ changelog.d/mk-cleanup.sh | 9 +++++ 8 files changed, 69 insertions(+) create mode 100644 changelog.d/0-release-notes/.title create mode 100644 changelog.d/1-debian-builds/.title create mode 100644 changelog.d/2-wire-builds/.title create mode 100644 changelog.d/3-deploy-builds/.title create mode 100644 changelog.d/4-docs/.title create mode 100644 changelog.d/5-bug-fixes/.title create mode 100755 changelog.d/mk-changelog.sh create mode 100755 changelog.d/mk-cleanup.sh diff --git a/changelog.d/0-release-notes/.title b/changelog.d/0-release-notes/.title new file mode 100644 index 000000000..d754b17ca --- /dev/null +++ b/changelog.d/0-release-notes/.title @@ -0,0 +1 @@ +Release notes \ No newline at end of file diff --git a/changelog.d/1-debian-builds/.title b/changelog.d/1-debian-builds/.title new file mode 100644 index 000000000..d1563daab --- /dev/null +++ b/changelog.d/1-debian-builds/.title @@ -0,0 +1 @@ +Base OS dependencies \ No newline at end of file diff --git a/changelog.d/2-wire-builds/.title b/changelog.d/2-wire-builds/.title new file mode 100644 index 000000000..7fa4b7bd0 --- /dev/null +++ b/changelog.d/2-wire-builds/.title @@ -0,0 +1 @@ +Internal Dependencies \ No newline at end of file diff --git a/changelog.d/3-deploy-builds/.title b/changelog.d/3-deploy-builds/.title new file mode 100644 index 000000000..fe92586cd --- /dev/null +++ b/changelog.d/3-deploy-builds/.title @@ -0,0 +1 @@ +External dependencies \ No newline at end of file diff --git a/changelog.d/4-docs/.title b/changelog.d/4-docs/.title new file mode 100644 index 000000000..7d1420123 --- /dev/null +++ b/changelog.d/4-docs/.title @@ -0,0 +1 @@ +Offline Documentation \ No newline at end of file diff --git a/changelog.d/5-bug-fixes/.title b/changelog.d/5-bug-fixes/.title new file mode 100644 index 000000000..23bcb1b64 --- /dev/null +++ b/changelog.d/5-bug-fixes/.title @@ -0,0 +1 @@ +Bug fixes and other updates \ No newline at end of file diff --git a/changelog.d/mk-changelog.sh b/changelog.d/mk-changelog.sh new file mode 100755 index 000000000..c9616788d --- /dev/null +++ b/changelog.d/mk-changelog.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +set -euo pipefail +shopt -s nullglob + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +getPRNumber() { + git log --reverse --format=%s -- "$1" | sed -rn '1 { /\((#.*)\)$/ s|^.*\((#.*)\)$|\1|p; }' | grep "" || + echo "#PR_NOT_FOUND" +} + +for d in "$DIR"/*; do + if [[ ! -d "$d" ]]; then continue; fi + + entries=("$d"/*[^~]) + + if [[ ${#entries[@]} -eq 0 ]]; then continue; fi + + echo -n "## " + # shellcheck disable=SC1003 + sed '$ a\' "$d/.title" + echo "" + # shellcheck disable=SC2094 + for f in "${entries[@]}"; do + pr=$(getPRNumber "$f") + # shellcheck disable=SC1003 + < "$f" sed -r ' + # create a bullet point on the first line + 1 { s/^/\* /; } + + # indent subsequent lines + 1 !{ s/^/ /; } + + # replace ## with PR number throughout + s/##/'"$pr"'/g' | + ( + if grep -q -r '\(#[^)]\)' "$f"; then + cat + else + sed -r ' + # add PR number at the end (unless already present) + $ { /^.*\((#.*)\)$/ ! { s/$/ ('"$pr"')/; } } + ' + fi + ) | sed -r ' + # remove trailing whitespace + s/\s+$// + + # make sure there is a trailing newline + $ a\' + done + echo "" +done diff --git a/changelog.d/mk-cleanup.sh b/changelog.d/mk-cleanup.sh new file mode 100755 index 000000000..b483a6e60 --- /dev/null +++ b/changelog.d/mk-cleanup.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -euo pipefail +shopt -s nullglob + +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +rm -f "$DIR"/*/* +git add "$DIR" From 3da4ddf0887dd187c9ad1e293c95add7c5c23823 Mon Sep 17 00:00:00 2001 From: mohitrajain <20745774+mohitrajain@users.noreply.github.com> Date: Mon, 17 Mar 2025 14:30:35 +0100 Subject: [PATCH 02/16] feat(changelog): WPB-16103 update readme about changelog and pull_request_template --- .github/pull_request_template.md | 1 + README.md | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 2f3a9a769..1f86c3d89 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -23,6 +23,7 @@ Fixes ${ISSUE_URL} ### Tracking +* [ ] I added a new entry in an appropriate subdirectory of `changelog.d` * [ ] I mentioned this PR in Jira, OR I mentioned the Jira ticket in this PR. * [ ] I mentioned this PR in one of the issues attached to one of our repositories. diff --git a/README.md b/README.md index 54f2fd9b5..e719d712f 100644 --- a/README.md +++ b/README.md @@ -24,3 +24,15 @@ All the documentation on how to make use of this repository is hosted on https:/ * `charts/` contains helm charts that can be installed on kubernetes. The charts are mirroed to S3 and can be used with `helm repo add wire https://s3-eu-west-1.amazonaws.com/public.wire.com/charts`. See the [Administrator's Guide](https://docs.wire.com) for more info. * `terraform/` contains some examples for provisioning servers. See the [Administrator's Guide](https://docs.wire.com) for more info. * `bin/` contains some helper bash scripts. Some are used in the [Administrator's Guide](https://docs.wire.com) when installing wire-server, and some are used for developers/maintainers of this repository. + +## PR Guidelines + +In most cases, the only required action when creating a PR is creating a changelog entry (see below). + +### Changelog entries + +Every PR should add a new file in the appropriate subdirectory of `changelog.d`, containing just the text of the corresponding changelog entry. There is no need to explicitly write a PR number, because the `mk-changelog.sh` script (used on release) will add it automatically at the end. The name of the file does not matter, but it should be unique to avoid unnecessary conflicts (e.g. use the branch name). Read more [here](https://docs.wire.com/developer/developer/changelog.html) + +Example: create the file ./changelog.d/2-wire-builds/wire-chart-bump-5.13 with one-line content like: +``` +Wire backend upgrade to 5.13, see [docs](link-to-docs)``` From f604330b158807d4995868f3d422aa4c9acbb58b Mon Sep 17 00:00:00 2001 From: Mohit Rajain <20745774+mohitrajain@users.noreply.github.com> Date: Fri, 20 Jun 2025 17:25:40 +0200 Subject: [PATCH 03/16] feat(docs): adding a runner to verify the commit logs and changelog entries --- .github/workflows/changelog-verify.yml | 83 ++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 .github/workflows/changelog-verify.yml diff --git a/.github/workflows/changelog-verify.yml b/.github/workflows/changelog-verify.yml new file mode 100644 index 000000000..a4357acee --- /dev/null +++ b/.github/workflows/changelog-verify.yml @@ -0,0 +1,83 @@ +name: Changelog verification +on: + pull_request: + branches: [master] + push: + branches: [master] + +permissions: + contents: read + +jobs: + commitlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: lts/* + cache: npm + - name: Install commitlint + run: npm install -D @commitlint/cli @commitlint/config-conventional + - name: Print versions + run: | + git --version + node --version + npm --version + npx commitlint --version + + - name: Validate current commit (last commit) with commitlint + if: github.event_name == 'push' + run: npx commitlint --last --verbose + + - name: Validate PR commits with commitlint + if: github.event_name == 'pull_request' + run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose + + - name: Check changelog.d changes in PR + run: | + BASE_SHA=${{ github.event.pull_request.base.sha }} + HEAD_SHA=${{ github.event.pull_request.head.sha }} + + if ! git ls-tree -d -r $HEAD_SHA | grep -q "changelog.d/"; then + echo "Directory changelog.d/ does not exist in the PR" + exit 1 + fi + + CHANGED_FILES=$(git diff --name-only $BASE_SHA $HEAD_SHA -- changelog.d/ | grep -vE "^$") + + if [ -z "$CHANGED_FILES" ]; then + echo "No files changed in changelog.d/" + exit 1 + fi + + LINE_COUNT=$(git diff --unified=0 $BASE_SHA $HEAD_SHA -- changelog.d/ 2>/dev/null | grep -E "^\+|^\-" | grep -vE "^(\+\+\+|\-\-\-)" | wc -l) + + if [ "$LINE_COUNT" -le 1 ]; then + echo "Changelog.d has one or zero lines changed: $LINE_COUNT lines" + exit 1 + fi + + # Validate each changed file's content with commitlint + for file in $CHANGED_FILES; do + echo "Checking file: $file" + + FILE_CONTENT=$(git show $HEAD_SHA:$file 2>/dev/null) + + if [ -z "$FILE_CONTENT" ]; then + echo "File $file is empty" + exit 1 + continue + fi + + echo "$FILE_CONTENT" > temp_commit_msg.txt + if ! npx commitlint --edit temp_commit_msg.txt; then + echo "Commitlint failed for file: $file" + echo "Content:" + cat temp_commit_msg.txt + exit 1 + fi + done From 551ae2730f4b6114c3b5f89413c745cbc74812e6 Mon Sep 17 00:00:00 2001 From: Mohit Rajain <20745774+mohitrajain@users.noreply.github.com> Date: Fri, 20 Jun 2025 17:30:41 +0200 Subject: [PATCH 04/16] feat(docs): adding a runner to verify the commit logs and changelog entries --- .github/workflows/changelog-verify.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/changelog-verify.yml b/.github/workflows/changelog-verify.yml index a4357acee..e01035ce7 100644 --- a/.github/workflows/changelog-verify.yml +++ b/.github/workflows/changelog-verify.yml @@ -19,7 +19,6 @@ jobs: uses: actions/setup-node@v4 with: node-version: lts/* - cache: npm - name: Install commitlint run: npm install -D @commitlint/cli @commitlint/config-conventional - name: Print versions From a28432415c2659fe256f44efd93c00bb99a961d8 Mon Sep 17 00:00:00 2001 From: Mohit Rajain <20745774+mohitrajain@users.noreply.github.com> Date: Fri, 20 Jun 2025 18:16:33 +0200 Subject: [PATCH 05/16] feat(docs): adding a runner to verify the commit logs and changelog entries --- .github/workflows/changelog-verify.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/changelog-verify.yml b/.github/workflows/changelog-verify.yml index e01035ce7..63930d085 100644 --- a/.github/workflows/changelog-verify.yml +++ b/.github/workflows/changelog-verify.yml @@ -32,10 +32,6 @@ jobs: if: github.event_name == 'push' run: npx commitlint --last --verbose - - name: Validate PR commits with commitlint - if: github.event_name == 'pull_request' - run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose - - name: Check changelog.d changes in PR run: | BASE_SHA=${{ github.event.pull_request.base.sha }} From 2470a276080911800b5f4770041e2dd73bb0b348 Mon Sep 17 00:00:00 2001 From: Mohit Rajain <20745774+mohitrajain@users.noreply.github.com> Date: Fri, 20 Jun 2025 18:21:01 +0200 Subject: [PATCH 06/16] feat(docs): debugging the runner --- .github/workflows/changelog-verify.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/changelog-verify.yml b/.github/workflows/changelog-verify.yml index 63930d085..8965cf837 100644 --- a/.github/workflows/changelog-verify.yml +++ b/.github/workflows/changelog-verify.yml @@ -29,11 +29,13 @@ jobs: npx commitlint --version - name: Validate current commit (last commit) with commitlint - if: github.event_name == 'push' run: npx commitlint --last --verbose - name: Check changelog.d changes in PR run: | + set -x + echo $PWD + ls BASE_SHA=${{ github.event.pull_request.base.sha }} HEAD_SHA=${{ github.event.pull_request.head.sha }} From 8a562c06a0444ad6c7404b60f37edb14cc83349d Mon Sep 17 00:00:00 2001 From: Mohit Rajain <20745774+mohitrajain@users.noreply.github.com> Date: Fri, 20 Jun 2025 18:25:05 +0200 Subject: [PATCH 07/16] feat(docs): debugging the runner --- .github/workflows/changelog-verify.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/changelog-verify.yml b/.github/workflows/changelog-verify.yml index 8965cf837..765991bef 100644 --- a/.github/workflows/changelog-verify.yml +++ b/.github/workflows/changelog-verify.yml @@ -29,7 +29,9 @@ jobs: npx commitlint --version - name: Validate current commit (last commit) with commitlint - run: npx commitlint --last --verbose + run: | + echo "export default { extends: ['@commitlint/config-conventional'] };" > /tmp/commitlint.config.js + npx commitlint -g /tmp/commitlint.config.js --last --verbose - name: Check changelog.d changes in PR run: | From 9741822f6ed93ecb63a230ac9ebeebe4da01856f Mon Sep 17 00:00:00 2001 From: Mohit Rajain <20745774+mohitrajain@users.noreply.github.com> Date: Fri, 20 Jun 2025 18:25:50 +0200 Subject: [PATCH 08/16] feat(docs): debugging the runner --- .github/workflows/changelog-verify.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/changelog-verify.yml b/.github/workflows/changelog-verify.yml index 765991bef..e20042c83 100644 --- a/.github/workflows/changelog-verify.yml +++ b/.github/workflows/changelog-verify.yml @@ -38,6 +38,7 @@ jobs: set -x echo $PWD ls + echo "export default { extends: ['@commitlint/config-conventional'] };" > /tmp/commitlint.config.js BASE_SHA=${{ github.event.pull_request.base.sha }} HEAD_SHA=${{ github.event.pull_request.head.sha }} @@ -73,7 +74,7 @@ jobs: fi echo "$FILE_CONTENT" > temp_commit_msg.txt - if ! npx commitlint --edit temp_commit_msg.txt; then + if ! npx commitlint -g /tmp/commitlint.config.js --edit temp_commit_msg.txt; then echo "Commitlint failed for file: $file" echo "Content:" cat temp_commit_msg.txt From 47ea5cfdd53bfe523cdbbe2b4eac25c0de4f7767 Mon Sep 17 00:00:00 2001 From: Mohit Rajain <20745774+mohitrajain@users.noreply.github.com> Date: Fri, 20 Jun 2025 18:28:33 +0200 Subject: [PATCH 09/16] feat(docs): debugging the runner --- .github/workflows/changelog-verify.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/changelog-verify.yml b/.github/workflows/changelog-verify.yml index e20042c83..1fedad290 100644 --- a/.github/workflows/changelog-verify.yml +++ b/.github/workflows/changelog-verify.yml @@ -30,7 +30,7 @@ jobs: - name: Validate current commit (last commit) with commitlint run: | - echo "export default { extends: ['@commitlint/config-conventional'] };" > /tmp/commitlint.config.js + echo "export default { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js npx commitlint -g /tmp/commitlint.config.js --last --verbose - name: Check changelog.d changes in PR @@ -38,7 +38,6 @@ jobs: set -x echo $PWD ls - echo "export default { extends: ['@commitlint/config-conventional'] };" > /tmp/commitlint.config.js BASE_SHA=${{ github.event.pull_request.base.sha }} HEAD_SHA=${{ github.event.pull_request.head.sha }} @@ -74,7 +73,7 @@ jobs: fi echo "$FILE_CONTENT" > temp_commit_msg.txt - if ! npx commitlint -g /tmp/commitlint.config.js --edit temp_commit_msg.txt; then + if ! npx commitlint -g commitlint.config.js --edit temp_commit_msg.txt; then echo "Commitlint failed for file: $file" echo "Content:" cat temp_commit_msg.txt From c5f4902173ef5445228a8ad47169eb8272ac20c6 Mon Sep 17 00:00:00 2001 From: Mohit Rajain <20745774+mohitrajain@users.noreply.github.com> Date: Fri, 20 Jun 2025 18:29:39 +0200 Subject: [PATCH 10/16] feat(docs): debugging the runner --- .github/workflows/changelog-verify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/changelog-verify.yml b/.github/workflows/changelog-verify.yml index 1fedad290..01d3288d9 100644 --- a/.github/workflows/changelog-verify.yml +++ b/.github/workflows/changelog-verify.yml @@ -31,7 +31,7 @@ jobs: - name: Validate current commit (last commit) with commitlint run: | echo "export default { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js - npx commitlint -g /tmp/commitlint.config.js --last --verbose + npx commitlint -g commitlint.config.js --last --verbose - name: Check changelog.d changes in PR run: | From 85860f9a28224b5c56ad53a9afaba3b9035e3c12 Mon Sep 17 00:00:00 2001 From: Mohit Rajain <20745774+mohitrajain@users.noreply.github.com> Date: Fri, 20 Jun 2025 18:35:03 +0200 Subject: [PATCH 11/16] feat(docs): fix the github action to verify the commits with a changelog message --- .github/workflows/changelog-verify.yml | 24 ++---------------------- changelog.d/4-docs/enable-changelog | 1 + 2 files changed, 3 insertions(+), 22 deletions(-) create mode 100644 changelog.d/4-docs/enable-changelog diff --git a/.github/workflows/changelog-verify.yml b/.github/workflows/changelog-verify.yml index 01d3288d9..7b5a2c4f4 100644 --- a/.github/workflows/changelog-verify.yml +++ b/.github/workflows/changelog-verify.yml @@ -31,7 +31,7 @@ jobs: - name: Validate current commit (last commit) with commitlint run: | echo "export default { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js - npx commitlint -g commitlint.config.js --last --verbose + npx commitlint -g commitlint.config.js --last --verbose 2>/dev/null - name: Check changelog.d changes in PR run: | @@ -42,7 +42,7 @@ jobs: HEAD_SHA=${{ github.event.pull_request.head.sha }} if ! git ls-tree -d -r $HEAD_SHA | grep -q "changelog.d/"; then - echo "Directory changelog.d/ does not exist in the PR" + echo "Changes in changelog.d/ does not exist in the PR" exit 1 fi @@ -59,24 +59,4 @@ jobs: echo "Changelog.d has one or zero lines changed: $LINE_COUNT lines" exit 1 fi - - # Validate each changed file's content with commitlint - for file in $CHANGED_FILES; do - echo "Checking file: $file" - - FILE_CONTENT=$(git show $HEAD_SHA:$file 2>/dev/null) - - if [ -z "$FILE_CONTENT" ]; then - echo "File $file is empty" - exit 1 - continue - fi - - echo "$FILE_CONTENT" > temp_commit_msg.txt - if ! npx commitlint -g commitlint.config.js --edit temp_commit_msg.txt; then - echo "Commitlint failed for file: $file" - echo "Content:" - cat temp_commit_msg.txt - exit 1 - fi done diff --git a/changelog.d/4-docs/enable-changelog b/changelog.d/4-docs/enable-changelog new file mode 100644 index 000000000..1270e9330 --- /dev/null +++ b/changelog.d/4-docs/enable-changelog @@ -0,0 +1 @@ +Enable changelog management in wire-server-deploy \ No newline at end of file From ce2da1c4a0593991bb0009d3ca6a3dc576fee408 Mon Sep 17 00:00:00 2001 From: Mohit Rajain <20745774+mohitrajain@users.noreply.github.com> Date: Fri, 20 Jun 2025 18:37:44 +0200 Subject: [PATCH 12/16] feat(docs): fix the github action to verify the commits with a changelog message --- .github/workflows/changelog-verify.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/changelog-verify.yml b/.github/workflows/changelog-verify.yml index 7b5a2c4f4..4eb357668 100644 --- a/.github/workflows/changelog-verify.yml +++ b/.github/workflows/changelog-verify.yml @@ -35,17 +35,9 @@ jobs: - name: Check changelog.d changes in PR run: | - set -x - echo $PWD - ls BASE_SHA=${{ github.event.pull_request.base.sha }} HEAD_SHA=${{ github.event.pull_request.head.sha }} - if ! git ls-tree -d -r $HEAD_SHA | grep -q "changelog.d/"; then - echo "Changes in changelog.d/ does not exist in the PR" - exit 1 - fi - CHANGED_FILES=$(git diff --name-only $BASE_SHA $HEAD_SHA -- changelog.d/ | grep -vE "^$") if [ -z "$CHANGED_FILES" ]; then From 75c2e47f8c4a8f5b4237d6ae02fffdc4269fd973 Mon Sep 17 00:00:00 2001 From: Mohit Rajain <20745774+mohitrajain@users.noreply.github.com> Date: Fri, 20 Jun 2025 18:41:43 +0200 Subject: [PATCH 13/16] feat(docs): debugging the runner --- .github/workflows/changelog-verify.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/changelog-verify.yml b/.github/workflows/changelog-verify.yml index 4eb357668..c8fbe29a1 100644 --- a/.github/workflows/changelog-verify.yml +++ b/.github/workflows/changelog-verify.yml @@ -35,6 +35,7 @@ jobs: - name: Check changelog.d changes in PR run: | + set -x BASE_SHA=${{ github.event.pull_request.base.sha }} HEAD_SHA=${{ github.event.pull_request.head.sha }} @@ -44,11 +45,4 @@ jobs: echo "No files changed in changelog.d/" exit 1 fi - - LINE_COUNT=$(git diff --unified=0 $BASE_SHA $HEAD_SHA -- changelog.d/ 2>/dev/null | grep -E "^\+|^\-" | grep -vE "^(\+\+\+|\-\-\-)" | wc -l) - - if [ "$LINE_COUNT" -le 1 ]; then - echo "Changelog.d has one or zero lines changed: $LINE_COUNT lines" - exit 1 - fi done From 612631f378f575bc6051804536b02e2fe0be6050 Mon Sep 17 00:00:00 2001 From: Mohit Rajain <20745774+mohitrajain@users.noreply.github.com> Date: Fri, 20 Jun 2025 18:45:35 +0200 Subject: [PATCH 14/16] feat(docs): debugging the runner --- .github/workflows/changelog-verify.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/changelog-verify.yml b/.github/workflows/changelog-verify.yml index c8fbe29a1..dbe1139cf 100644 --- a/.github/workflows/changelog-verify.yml +++ b/.github/workflows/changelog-verify.yml @@ -15,6 +15,7 @@ jobs: - uses: actions/checkout@v4 with: submodules: true + fetch-depth: 0 - name: Setup node uses: actions/setup-node@v4 with: From eedcb4c224cc0eb3d6ddbf5a2e3ea5429acf5361 Mon Sep 17 00:00:00 2001 From: Mohit Rajain <20745774+mohitrajain@users.noreply.github.com> Date: Fri, 20 Jun 2025 18:47:02 +0200 Subject: [PATCH 15/16] feat(docs): debugging the runner --- .github/workflows/changelog-verify.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/changelog-verify.yml b/.github/workflows/changelog-verify.yml index dbe1139cf..916f4f81c 100644 --- a/.github/workflows/changelog-verify.yml +++ b/.github/workflows/changelog-verify.yml @@ -34,9 +34,8 @@ jobs: echo "export default { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js npx commitlint -g commitlint.config.js --last --verbose 2>/dev/null - - name: Check changelog.d changes in PR + - name: Check for entry in changelog.d changes in the PR run: | - set -x BASE_SHA=${{ github.event.pull_request.base.sha }} HEAD_SHA=${{ github.event.pull_request.head.sha }} @@ -46,4 +45,3 @@ jobs: echo "No files changed in changelog.d/" exit 1 fi - done From d8a2c035922c4f8577a46a3d71c7683af5ed7472 Mon Sep 17 00:00:00 2001 From: Mohit Rajain <20745774+mohitrajain@users.noreply.github.com> Date: Fri, 20 Jun 2025 19:12:57 +0200 Subject: [PATCH 16/16] docs(changelog): add documetation on changelog and git commit messages verification --- README.md | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e719d712f..5b4e99f36 100644 --- a/README.md +++ b/README.md @@ -35,4 +35,41 @@ Every PR should add a new file in the appropriate subdirectory of `changelog.d`, Example: create the file ./changelog.d/2-wire-builds/wire-chart-bump-5.13 with one-line content like: ``` -Wire backend upgrade to 5.13, see [docs](link-to-docs)``` +Wire backend upgrade to 5.13, see [docs](link-to-docs) +``` + +All changelog entries in the `changelog.d/` directory must follow commit message standards based on the [Conventional Commits specification](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/config-conventional/src/index.ts). Below are examples of properly formatted commit messages for each subdirectory in our changelog structure, along with descriptions of what content belongs in each subdirectory. + +**NOTE**: The commit messages and changelog.d entries will be verified using the github workflow [Changelog verification](.github/workflows/changelog-verify.yml). + +#### Directory Structure + +##### 0-release-notes +This directory contains extra notes about the release. It is intended for high-level release notes that provide an overview of what's new, what's changed, and any important information about the release. This is typically used for communicating with stakeholders and end-users. + +*commit message example:* `release: v0.0.0 Major Release` + +##### 1-debian-builds +Contains notes about changes related to Debian package builds. This includes modifications to build scripts (e.g., `build_linux_pkgs.sh`), changes in dependencies, and any other updates related to the creation of Debian packages. + +*commit message example:* `fix(debian_build): resolve dependency issue for gngpg package` + +##### 2-wire-builds +Documents changes related to the `wire-builds` repository. This includes updates to the values directory, modifications to Helm charts for Wire components, and any other changes specific to the Wire builds process. + +*commit message example:* `feat(wire_build): add support for postgresql to support wire release 5.17.0` + +##### 3-deploy-builds +Used to document changes in deployment processes and upgrades. Examples include Kubernetes upgrades via Ansible, changes in the `/offline/tasks` directory, and other deployment-related modifications. + +*commit message example:* `feat(deploy): add support for Kubernetes 1.29.10` + +##### 4-docs +Contains documentation related to deployment or bundling processes. This includes updates to installation guides, configuration instructions, and any other relevant documentation. + +*commit message example:* `docs(deploy): add guide for wiab-demo solution` + +##### 5-bug-fixes +Documents bug fixes for any existing solutions. This includes fixes for issues in the deployment process, build scripts, or any other component of the project. + +*commit message example:* `fix(build): fix the postgresql dependency on old non-existing images`