Skip to content

Commit 4576776

Browse files
author
Karyamsetty Helen Grace
committed
resolved merge conflicts
2 parents fa6ef69 + 35733f9 commit 4576776

19 files changed

Lines changed: 3455 additions & 282 deletions

.factorypath

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<factorypath>
2-
<factorypathentry kind="VARJAR" id="M2_REPO/org/projectlombok/lombok/1.18.30/lombok-1.18.30.jar" enabled="true" runInBatchMode="false"/>
2+
<factorypathentry kind="VARJAR" id="M2_REPO/org/projectlombok/lombok/1.18.36/lombok-1.18.36.jar" enabled="true" runInBatchMode="false"/>
33
<factorypathentry kind="VARJAR" id="M2_REPO/org/mapstruct/mapstruct-processor/1.2.0.Final/mapstruct-processor-1.2.0.Final.jar" enabled="true" runInBatchMode="false"/>
44
</factorypath>

.github/workflows/build-on-pull-request.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build On Pull Request
22
on:
33
pull_request:
44
branches: [ "master","develop" ]
5-
5+
66
jobs:
77
Build:
88
runs-on: ubuntu-latest
@@ -14,10 +14,10 @@ jobs:
1414
repository: ${{ github.event.pull_request.head.repo.full_name }}
1515

1616
- name: Setup JDK 17
17-
uses: actions/setup-java@v2
17+
uses: actions/setup-java@v4
1818
with:
1919
java-version: 17
20-
distribution: 'zulu'
21-
22-
- name: Build with Maven
20+
distribution: 'temurin'
21+
22+
- name: Build with Maven
2323
run: mvn clean install

.github/workflows/commit-lint.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Commit Compliance
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
jobs:
8+
commitlint:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout code with submodule
13+
uses: actions/checkout@v4
14+
with:
15+
ref: ${{ github.event.pull_request.head.ref }}
16+
repository: ${{ github.event.pull_request.head.repo.full_name }}
17+
submodules: true
18+
fetch-depth: 0
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 18
24+
25+
- name: Install dependencies
26+
run: npm ci --legacy-peer-deps
27+
28+
- name: Run commitlint on PR
29+
run: |
30+
npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose

.github/workflows/package.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,35 @@ on:
55
branches: [ "develop"]
66
paths-ignore:
77
- target/**
8-
8+
99
pull_request:
1010
branches: [ "develop" ]
1111
paths-ignore:
1212
- target/**
13-
13+
1414
env:
1515
ENV_VAR: test
1616

1717
jobs:
1818
Package-test:
1919
runs-on: ubuntu-latest
2020
steps:
21-
22-
- name: Checkout code
23-
uses: actions/checkout@v2
24-
21+
22+
- name: Checkout code
23+
uses: actions/checkout@v3
24+
2525
- name: Setup JDK 17
26-
uses: actions/setup-java@v2
26+
uses: actions/setup-java@v4
2727
with:
2828
java-version: 17
29-
distribution: 'zulu'
30-
29+
distribution: 'temurin'
30+
3131
- name: Build with Maven
3232
run: mvn clean install -DENV_VAR=${{ env.ENV_VAR }}
33-
33+
3434
- name: Build WAR file
3535
run: mvn -B package --file pom.xml
36-
36+
3737
- name: Upload WAR file as artifact
3838
uses: actions/upload-artifact@v4
3939
with:

.github/workflows/sast.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches: [ "develop" ]
66
paths-ignore:
77
- target/**
8-
8+
99
pull_request:
1010
branches: [ "develop" ]
1111
paths-ignore:
@@ -25,7 +25,7 @@ jobs:
2525
fail-fast: false
2626
matrix:
2727
language: [ 'java' ]
28-
28+
2929
steps:
3030
- name: Checkout code
3131
uses: actions/checkout@v3
@@ -35,18 +35,19 @@ jobs:
3535

3636
# Initializes the CodeQL tools for scanning.
3737
- name: Initialize CodeQL
38-
uses: github/codeql-action/init@v2
38+
uses: github/codeql-action/init@v3
3939

4040
- name: Setup JDK 17
41-
uses: actions/setup-java@v2
41+
uses: actions/setup-java@v4
4242
with:
4343
java-version: 17
44-
distribution: 'zulu'
45-
44+
distribution: 'temurin'
45+
4646
- name: Build with Maven
4747
run: mvn clean install
4848

4949
- name: Perform CodeQL Analysis
50-
uses: github/codeql-action/analyze@v2
50+
uses: github/codeql-action/analyze@v3
5151
with:
5252
category: "/language:${{matrix.language}}"
53+

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx --no -- commitlint --edit $1

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx lint-staged

README.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,59 @@ Detailed information on API endpoints can be found in the [API Guide](https://pi
2222

2323
## Usage
2424
All features have been exposed as REST endpoints. Refer to the SWAGGER API specification for details.
25+
26+
## Setting Up Commit Hooks
27+
28+
This project uses Git hooks to enforce consistent code quality and commit message standards. Even though this is a Java project, the hooks are powered by Node.js. Follow these steps to set up the hooks locally:
29+
30+
### Prerequisites
31+
- Node.js (v14 or later)
32+
- npm (comes with Node.js)
33+
34+
### Setup Steps
35+
36+
1. **Install Node.js and npm**
37+
- Download and install from [nodejs.org](https://nodejs.org/)
38+
- Verify installation with:
39+
```
40+
node --version
41+
npm --version
42+
```
43+
44+
2. **Install dependencies**
45+
- From the project root directory, run:
46+
```
47+
npm ci
48+
```
49+
- This will install all required dependencies including Husky and commitlint
50+
51+
3. **Verify hooks installation**
52+
- The hooks should be automatically installed by Husky
53+
- You can verify by checking if the `.husky` directory contains executable hooks
54+
55+
### Commit Message Convention
56+
57+
This project follows a specific commit message format:
58+
- Format: `type(scope): subject`
59+
- Example: `feat(login): add remember me functionality`
60+
61+
Types include:
62+
- `feat`: A new feature
63+
- `fix`: A bug fix
64+
- `docs`: Documentation changes
65+
- `style`: Code style changes (formatting, etc.)
66+
- `refactor`: Code changes that neither fix bugs nor add features
67+
- `perf`: Performance improvements
68+
- `test`: Adding or fixing tests
69+
- `build`: Changes to build process or tools
70+
- `ci`: Changes to CI configuration
71+
- `chore`: Other changes (e.g., maintenance tasks, dependencies)
72+
73+
Your commit messages will be automatically validated when you commit, ensuring project consistency.
2574
2675
## Filing Issues
2776
28-
If you encounter any issues, bugs, or have feature requests, please file them in the [main AMRIT repository](https://github.com/PSMRI/AMRIT/issues). Centralizing all feedback helps us streamline improvements and address concerns efficiently.
77+
If you encounter any issues, bugs, or have feature requests, please file them in the [main AMRIT repository](https://github.com/PSMRI/AMRIT/issues). Centralizing all feedback helps us streamline improvements and address concerns efficiently.
2978
3079
## Join Our Community
3180

commitlint.config.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional'],
3+
rules: {
4+
'body-leading-blank': [1, 'always'],
5+
'body-max-line-length': [2, 'always', 100],
6+
'footer-leading-blank': [1, 'always'],
7+
'footer-max-line-length': [2, 'always', 100],
8+
'header-max-length': [2, 'always', 100],
9+
'subject-case': [
10+
2,
11+
'never',
12+
['sentence-case', 'start-case', 'pascal-case', 'upper-case'],
13+
],
14+
'subject-empty': [2, 'never'],
15+
'subject-full-stop': [2, 'never', '.'],
16+
'type-case': [2, 'always', 'lower-case'],
17+
'type-empty': [2, 'never'],
18+
'type-enum': [
19+
2,
20+
'always',
21+
[
22+
'build',
23+
'chore',
24+
'ci',
25+
'docs',
26+
'feat',
27+
'fix',
28+
'perf',
29+
'refactor',
30+
'revert',
31+
'style',
32+
'test'
33+
],
34+
],
35+
},
36+
};

0 commit comments

Comments
 (0)