Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ed08062
docs(readme): add documentation badge
DurgaPrasad-54 Jan 19, 2026
01c25bd
chore(swagger): automate swagger sync to amrit-docs
DurgaPrasad-54 Feb 3, 2026
6c4bb16
chore(swagger): update swagger workflow
DurgaPrasad-54 Feb 11, 2026
e4a5bce
fix(swagger): fix github workflow running issue
DurgaPrasad-54 Feb 11, 2026
081d216
chore(swagger): add env-driven Dev/UAT/Demo servers, update and uncom…
DurgaPrasad-54 Feb 12, 2026
a2a77be
Merge branch 'main' into main
DurgaPrasad-54 Feb 12, 2026
edb483e
chore(swagger): deduplicate SwaggerConfig and extract constants
DurgaPrasad-54 Feb 12, 2026
293023f
Merge branch 'main' of https://github.com/DurgaPrasad-54/BeneficiaryI…
DurgaPrasad-54 Feb 12, 2026
88cf231
chore(swagger): fix the jwt token issue in properties
DurgaPrasad-54 Feb 12, 2026
01041c5
feat(git-hooks): add commit message validation using commit-msg hook
DurgaPrasad-54 Mar 4, 2026
02c926b
feat(git-hooks): add git-hook for check pre commit
DurgaPrasad-54 Mar 5, 2026
0dd047d
Merge branch 'main' of https://github.com/DurgaPrasad-54/BeneficiaryI…
DurgaPrasad-54 Mar 5, 2026
ad32038
Merge branch 'PSMRI:main' into main
DurgaPrasad-54 Mar 5, 2026
01a6e7c
chore(workflow): enforce scoped commit message format
DurgaPrasad-54 Mar 5, 2026
3ac2102
feat(git-hooks): add commit message validation using commit-msg hook
DurgaPrasad-54 Mar 4, 2026
c1e8801
chore(commit): update workflow and hooks based on coderabbit feedback
DurgaPrasad-54 Mar 5, 2026
86e1f4d
chore(commit): update commit types in workflow and config
DurgaPrasad-54 Mar 5, 2026
34b4b63
fix(ci): ignore merge commits in commit message validation
DurgaPrasad-54 Mar 5, 2026
4c12455
refactor(ci): replace regex commit check with commitlint validation
DurgaPrasad-54 Mar 5, 2026
eb785ba
fix(ci): run commitlint via npx without local dependency
DurgaPrasad-54 Mar 5, 2026
3105959
refactor(ci): use commitlint range validation with pinned version
DurgaPrasad-54 Mar 5, 2026
9350b5d
fix(ci): correct git-log-args quoting in commitlint workflow
DurgaPrasad-54 Mar 5, 2026
c8f1b65
fix(ci): skip merge commits in commitlint workflow
DurgaPrasad-54 Mar 5, 2026
7c81ca0
fix(ci): validate PR commits using commitlint
DurgaPrasad-54 Mar 5, 2026
cc0e6dc
docs(readme): add git hooks enable command in setup
DurgaPrasad-54 Mar 5, 2026
fa7ad69
refactor(commitlint): define commit rules directly without config-con…
DurgaPrasad-54 Mar 5, 2026
0a40616
fix(commitlint): handle exit codes correctly in workflow
DurgaPrasad-54 Mar 5, 2026
ca51995
chore(commitlint): update commit-msg hook to use specific commitlint …
DurgaPrasad-54 Mar 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .git-hooks/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
set -e

npx --yes @commitlint/cli@20.4.3 --edit "$1"
29 changes: 29 additions & 0 deletions .github/workflows/commit-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Commit Message Check

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
commit-check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v4
with:
node-version: '20'

- name: Validate commit messages
run: |
set -eo pipefail
commits=$(git log --no-merges --pretty=format:"%H" "${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}")
for sha in $commits; do
tmp=$(mktemp)
git log -1 --pretty=format:"%B" "$sha" > "$tmp"
npx --yes @commitlint/cli@20.4.3 --edit "$tmp"
rm "$tmp"
done
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ Find the detailed list of software dependencies [here] (https://piramal-swasthya
Please follow these steps:

1. Clone the repository to your local machine.
2. Install the dependencies and build the module:
2. Enable git hooks (run once after cloning):
- Run the command `git config core.hooksPath .git-hooks`.
3. Install the dependencies and build the module:
- Run the command `mvn clean install`.
3. You can copy `bengen_example.properties` to `bengen_local.properties` and edit the file accordingly. The file is under `src/main/environment` folder.
4. Run the development server:
4. You can copy `bengen_example.properties` to `bengen_local.properties` and edit the file accordingly. The file is under `src/main/environment` folder.
5. Run the development server:
- Start the Redis server.
- Run the command `mvn spring-boot:run -DENV_VAR=local`.
5. Open your browser and access `http://localhost:8080/swagger-ui.html#!/` to view the Swagger API documentation.
6. Open your browser and access `http://localhost:8080/swagger-ui.html#!/` to view the Swagger API documentation.


## Usage
Expand Down
35 changes: 35 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
module.exports = {
rules: {
'body-leading-blank': [1, 'always'],
'body-max-line-length': [2, 'always', 100],
'footer-leading-blank': [1, 'always'],
'footer-max-line-length': [2, 'always', 100],
'header-max-length': [2, 'always', 100],
'subject-case': [
2,
'never',
['sentence-case', 'start-case', 'pascal-case', 'upper-case'],
],
'subject-empty': [2, 'never'],
'subject-full-stop': [2, 'never', '.'],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
'type-enum': [
2,
'always',
[
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test',
],
],
},
};
Loading