From 96beecb24b090bf62765c3e9251bcaf0e2c9e777 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Aug 2024 19:51:32 +0000 Subject: [PATCH 1/6] Bump h2 from 0.4.3 to 0.4.5 Bumps [h2](https://github.com/hyperium/h2) from 0.4.3 to 0.4.5. - [Release notes](https://github.com/hyperium/h2/releases) - [Changelog](https://github.com/hyperium/h2/blob/master/CHANGELOG.md) - [Commits](https://github.com/hyperium/h2/compare/v0.4.3...v0.4.5) --- updated-dependencies: - dependency-name: h2 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Cargo.lock | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d7b8293..591e789 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -32,6 +32,12 @@ dependencies = [ "libc", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "autocfg" version = "1.1.0" @@ -253,15 +259,15 @@ checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "h2" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ee2dd2e4f378392eeff5d51618cd9a63166a2513846bbc55f21cfacd9199d4" +checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" dependencies = [ + "atomic-waker", "bytes", "fnv", "futures-core", "futures-sink", - "futures-util", "http", "indexmap", "slab", From a29345a8033ad1b79a1316d37dc9c34f46c05eae Mon Sep 17 00:00:00 2001 From: cophilot Date: Wed, 7 Aug 2024 23:23:09 +0200 Subject: [PATCH 2/6] test --- .githooks/prepare-commit-msg | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.githooks/prepare-commit-msg b/.githooks/prepare-commit-msg index d676a75..d16b054 100755 --- a/.githooks/prepare-commit-msg +++ b/.githooks/prepare-commit-msg @@ -20,8 +20,17 @@ PHIL_PROJECT_FILE=$(cat .phil-project) # get the version of the project VERSION=$(echo $PHIL_PROJECT_FILE | grep -oP 'version:\K[0-9]+\.[0-9]+\.[0-9]+') -echo "v$VERSION - $(cat $COMMIT_MSG_FILE)" > $COMMIT_MSG_FILE +# get the branch name and split it by '-' and get the first element +issue_id=$(echo $BRANCH_NAME | cut -d'-' -f1) + +if [ ! -z "$issue_id" ]; then + echo "Found Issue ID: $issue_id" + issue_id="[$issue_id] " +else + issue_id="" +fi -echo "$(cat $COMMIT_MSG_FILE)" +echo "$issue_idv$VERSION - $(cat $COMMIT_MSG_FILE)" > $COMMIT_MSG_FILE -echo "prepare-commit-msg hook finished" \ No newline at end of file +echo "prepare-commit-msg hook finished" +exit 1 \ No newline at end of file From d210c1729d4ca0ac5f7f8efbc16c8a835698d773 Mon Sep 17 00:00:00 2001 From: cophilot Date: Wed, 7 Aug 2024 23:24:46 +0200 Subject: [PATCH 3/6] fixed --- .githooks/pre-commit | 2 +- .githooks/prepare-commit-msg | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.githooks/pre-commit b/.githooks/pre-commit index 35b79b3..533aba4 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -5,4 +5,4 @@ branch=$(git branch --show-current) if [ "$branch" = "main" ] || [ "$branch" = "master" ]; then echo "🚨🚨 You can not commit to the master branch. Please switch to the dev branch." exit 1 -fi \ No newline at end of file +fi diff --git a/.githooks/prepare-commit-msg b/.githooks/prepare-commit-msg index d16b054..e946997 100755 --- a/.githooks/prepare-commit-msg +++ b/.githooks/prepare-commit-msg @@ -32,5 +32,5 @@ fi echo "$issue_idv$VERSION - $(cat $COMMIT_MSG_FILE)" > $COMMIT_MSG_FILE -echo "prepare-commit-msg hook finished" -exit 1 \ No newline at end of file +echo $(cat $COMMIT_MSG_FILE) +echo "prepare-commit-msg hook finished" \ No newline at end of file From 500385a1985aeeb76721bb4e48f483c19262682b Mon Sep 17 00:00:00 2001 From: cophilot Date: Wed, 7 Aug 2024 23:27:15 +0200 Subject: [PATCH 4/6] 1.0.0 - fixed git hook --- .githooks/prepare-commit-msg | 8 +------- test | 1 + 2 files changed, 2 insertions(+), 7 deletions(-) create mode 100644 test diff --git a/.githooks/prepare-commit-msg b/.githooks/prepare-commit-msg index e946997..8c8e1ee 100755 --- a/.githooks/prepare-commit-msg +++ b/.githooks/prepare-commit-msg @@ -9,11 +9,6 @@ echo "Running prepare-commit-msg hook" # get the current branch name BRANCH_NAME=$(git branch --show-current) -# return if not in dev branch -if [ "$BRANCH_NAME" != "dev" ]; then - exit 0 -fi - # read the content of the README.md file PHIL_PROJECT_FILE=$(cat .phil-project) @@ -25,12 +20,11 @@ issue_id=$(echo $BRANCH_NAME | cut -d'-' -f1) if [ ! -z "$issue_id" ]; then echo "Found Issue ID: $issue_id" - issue_id="[$issue_id] " + issue_id="[#$issue_id] " else issue_id="" fi echo "$issue_idv$VERSION - $(cat $COMMIT_MSG_FILE)" > $COMMIT_MSG_FILE -echo $(cat $COMMIT_MSG_FILE) echo "prepare-commit-msg hook finished" \ No newline at end of file diff --git a/test b/test new file mode 100644 index 0000000..562095e --- /dev/null +++ b/test @@ -0,0 +1 @@ +1.0.0 - From 81e5e493c9eac3b1478ae7534d6633efc30b9959 Mon Sep 17 00:00:00 2001 From: cophilot Date: Wed, 7 Aug 2024 23:28:54 +0200 Subject: [PATCH 5/6] [#8] 1.0.0 - fixed git hook --- .githooks/prepare-commit-msg | 8 +++++--- test | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.githooks/prepare-commit-msg b/.githooks/prepare-commit-msg index 8c8e1ee..7abad70 100755 --- a/.githooks/prepare-commit-msg +++ b/.githooks/prepare-commit-msg @@ -20,11 +20,13 @@ issue_id=$(echo $BRANCH_NAME | cut -d'-' -f1) if [ ! -z "$issue_id" ]; then echo "Found Issue ID: $issue_id" - issue_id="[#$issue_id] " + issue_id="[#$issue_id] $VERSION -" else - issue_id="" + issue_id="$VERSION -" fi -echo "$issue_idv$VERSION - $(cat $COMMIT_MSG_FILE)" > $COMMIT_MSG_FILE +echo "$issue_id $(cat $COMMIT_MSG_FILE)" > $COMMIT_MSG_FILE + +echo "Updated commit message: $(cat $COMMIT_MSG_FILE)" echo "prepare-commit-msg hook finished" \ No newline at end of file diff --git a/test b/test index 562095e..b4a6a5f 100644 --- a/test +++ b/test @@ -1 +1 @@ -1.0.0 - +[#8] 1.0.0 - [#8] 1.0.0 - [#8] 1.0.0 - 1.0.0 - 1.0.0 - From c7ee13745a8c358bead3264c2d1a517587b9134d Mon Sep 17 00:00:00 2001 From: cophilot Date: Wed, 7 Aug 2024 23:31:28 +0200 Subject: [PATCH 6/6] [#8] 1.0.0 - fixed pipeline --- .github/workflows/check_rust_quality.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check_rust_quality.yml b/.github/workflows/check_rust_quality.yml index c51d0f0..f5168aa 100644 --- a/.github/workflows/check_rust_quality.yml +++ b/.github/workflows/check_rust_quality.yml @@ -2,8 +2,7 @@ name: Run rust quality checks on: push: - branches: - - dev + branches: ['*'] workflow_call: inputs: branch: @@ -35,7 +34,7 @@ jobs: run: ./scripts/test - name: Merge to master branch - if: ${{ inputs.branch != 'master' }} + if: ${{ inputs.branch == 'dev' }} uses: peter-evans/create-pull-request@v3 with: token: ${{ secrets.GITHUB_TOKEN }}