Compare commits

...

12 Commits

Author SHA1 Message Date
8c9498b66e ci: Push tag v0.5.0 and update CHANGELOG 2025-02-22 02:47:39 +00:00
ba67085a17
fix: A fix
All checks were successful
Pull Request Checks / commit-message-check (pull_request) Successful in 4s
Pull Request Checks / linting (pull_request) Successful in 35s
2025-02-21 21:21:33 -05:00
41c633e2ad
feat: Add new feature
All checks were successful
Pull Request Checks / commit-message-check (pull_request) Successful in 4s
Pull Request Checks / linting (pull_request) Successful in 36s
2025-02-21 21:17:14 -05:00
c382698132
feat(ci): Make main-push workflow manual
All checks were successful
Pull Request Checks / commit-message-check (pull_request) Successful in 5s
Pull Request Checks / linting (pull_request) Successful in 35s
2025-02-21 21:11:01 -05:00
b8ce2d47b9 ci: Push tag v0.4.1 and update CHANGELOG 2025-02-14 18:00:22 +00:00
bee05348cd fix: Remove unneeded files
Some checks failed
Pull Request Checks / commit-message-check (pull_request) Successful in 4s
Pull Request Checks / linting (pull_request) Successful in 48s
Post PR Merge Action / integrate (push) Failing after 6s
2025-02-14 12:58:20 -05:00
a66d25524a ci: Push tag v0.4.0 and update CHANGELOG 2025-02-12 12:49:59 +00:00
b345768781 feat(ci): Add commit message format and squash commit checks
Some checks failed
Pull Request Checks / commit-message-check (pull_request) Successful in 4s
Pull Request Checks / linting (pull_request) Successful in 46s
Post PR Merge Action / integrate (push) Failing after 5s
2025-02-12 07:47:32 -05:00
fc78959bf8 ci: Push tag v0.3.0 and update CHANGELOG 2025-02-11 15:44:59 +00:00
Christian Goeschel Ndjomouo
0a4654f547 fix: Linting issues
All checks were successful
Pull Request Lint / lint (pull_request) Successful in 45s
Post PR Merge Action / integrate (push) Successful in 7s
2025-02-11 10:42:33 -05:00
Christian Goeschel Ndjomouo
247b06aa01 feat: Added new feature
Some checks failed
Pull Request Lint / lint (pull_request) Failing after 8s
2025-02-11 10:36:57 -05:00
fda93f2c3b ci: Push tag v0.2.1 and update CHANGELOG 2025-02-10 22:22:19 +00:00
8 changed files with 112 additions and 12 deletions

View File

@ -0,0 +1,9 @@
name: Commit message check
runs:
using: "composite"
steps:
- name: Verify commit message format
run: |
COMMIT_MSG=$(git log --pretty=%s HEAD ^origin/main)
./scripts/commit-msg-check.sh "${COMMIT_MSG}"

View File

@ -1,13 +1,37 @@
name: Pull Request Lint
run-name: ${{ gitea.actor }} is building on ${{ gitea.repository }} 🚀
name: Pull Request Checks
run-name: ${{ gitea.actor }} is building ${{ gitea.repository }} 🚀
on:
pull_request:
branches: [main]
jobs:
lint:
commit-message-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Verify if commits are squashed
run: |
commit_count=$(wc -l <(git log --pretty=%s HEAD ^origin/main) | awk -F' ' '{print $1}')
echo "[INFO] Number of commits for this PR: ${commit_count}"
if (( ${commit_count} != 1 )); then
echo "[ERROR] The commits are not squashed. Please run 'git rebase -i HEAD~${commit_count}' on your local repository."
echo "Then squash the most recent commits, keep the first one and finally 'git push -f'."
exit 1
else
echo "[INFO] Commits are squashed, good!"
fi
- name: Check commit message format
uses: ./.gitea/actions/commit-msg-check
linting:
runs-on: ubuntu-latest
needs: [commit-message-check]
steps:
- name: Checkout repository
uses: actions/checkout@v4

View File

@ -1,9 +1,7 @@
name: Post PR Merge Action
run-name: ${{ gitea.actor }} is building on ${{ gitea.repository }} 🚀
on:
push:
branches:
- main
workflow_dispatch:
jobs:
integrate:

View File

@ -23,15 +23,15 @@ repos:
hooks:
- id: dockerfilelint
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
files: \.(js|ts|jsx|tsx|css|less|html|json|markdown|md|yaml|yml)$
#- repo: https://github.com/pre-commit/mirrors-prettier
# rev: v4.0.0-alpha.8
#hooks:
# - id: prettier
# files: \.(js|ts|jsx|tsx|css|less|html|json|markdown|md|yaml|yml)$
# ruff for Python formatting
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.6
rev: v0.9.7
hooks:
- id: ruff
- id: ruff-format

View File

@ -3,6 +3,45 @@
This changelog documents all notable changes made to the Puppet control repository
which mainly manages OVHcloud's Linux workstations.
### [0.5.0] - 2025-02-22
### 🚀 Features
- *(ci)* Make main-push workflow manual - ([c382698](https://stash.ovh.net/projects/GISWORKSPACE/repos/puppet-playground/commits/c3826981329e3d1c0fb1ec56e5bf00cdfeffa73f))
- Add new feature - ([41c633e](https://stash.ovh.net/projects/GISWORKSPACE/repos/puppet-playground/commits/41c633e2ad4b47dc46ceaee772c17aee5587c6d7))
### 🐛 Bug Fixes
- A fix - ([ba67085](https://stash.ovh.net/projects/GISWORKSPACE/repos/puppet-playground/commits/ba67085a1701137cb28fd1c3436bccb0bcba2388))
### [0.4.1] - 2025-02-14
### 🐛 Bug Fixes
- Remove unneeded files - ([bee0534](https://stash.ovh.net/projects/GISWORKSPACE/repos/puppet-playground/commits/bee05348cd1760500f87b37c7c7a9a377b3b2ba2))
### [0.4.0] - 2025-02-12
### 🚀 Features
- *(ci)* Add commit message format and squash commit checks - ([b345768](https://stash.ovh.net/projects/GISWORKSPACE/repos/puppet-playground/commits/b3457687814f75bdf0ef13e9b3521466f0011234))
### [0.3.0] - 2025-02-11
### 🚀 Features
- Added new feature - ([247b06a](https://stash.ovh.net/projects/GISWORKSPACE/repos/puppet-playground/commits/247b06aa01e9f8d6ed9afe8c9564a8e468cb0619))
### 🐛 Bug Fixes
- Linting issues - ([0a4654f](https://stash.ovh.net/projects/GISWORKSPACE/repos/puppet-playground/commits/0a4654f547318adda35ea816aac8dc49513c3ab4))
### [0.2.1] - 2025-02-10
### 🐛 Bug Fixes
- *(configs)* Fix module file - ([d1eee0c](https://stash.ovh.net/projects/GISWORKSPACE/repos/puppet-playground/commits/d1eee0c3024450fbc48082979eb001a5b0165e58))
### [0.2.0] - 2025-02-10
### 🚀 Features
@ -15,4 +54,7 @@ which mainly manages OVHcloud's Linux workstations.
- Add dev tools and helper scripts - ([c1eb61d](https://stash.ovh.net/projects/GISWORKSPACE/repos/puppet-playground/commits/c1eb61d42581c4c0ab731fd428cc564a4e2d53d4))
OVHcloud GIS-Workspace Linux Team

1
fix Normal file
View File

@ -0,0 +1 @@
A fix

1
new-feat Normal file
View File

@ -0,0 +1 @@
A feature

25
scripts/commit-msg-check.sh Executable file
View File

@ -0,0 +1,25 @@
#!/usr/bin/bash
# This hook helps to enforce a commit message format convention
#
# It can be very frustrating when many commits are squashed for a final PR
# and the latter gets rejected due to incorrect commit message formatting
#
# Another reason for this enforcement is to provide valid input data for the
# automatic changelog generator which relies on the keywords found in the regex below
function log {
# shellcheck disable=2317
printf "[ERROR] %s\n" "${@}"
}
commit_msg="${1}"
regex="^(bugfix|doc|docs|chore|feat|feature|fix|hotfix|perf|refactor|remove|security|style|test)(\([a-zA-Z0-9_-]+\))?!?:[[:space:]]+[[:graph:]]+([[:graph:]]|[[:space:]])*$"
echo "[INFO] Commit message: ${commit_msg}"
if ! [[ "${commit_msg}" =~ ${regex} ]]; then
log "Invalid commit message format please consult CONTRIBUTING for more details on how to write appropriate commit messages."
exit 1
else
echo "[SUCCESS] Valid commit message format!"
fi