Skip to content

Commit c5e664c

Browse files
committed
Merge branch 'stage' of github.com:contentstack/migration-v2-node-server into dev
2 parents 6665874 + 421f3cf commit c5e664c

File tree

11 files changed

+143
-54
lines changed

11 files changed

+143
-54
lines changed

.github/CODEOWNERS

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
* @contentstack/tso-migration-pr-reviewers
22
.github/workflows/sca-scan.yml @contentstack/security-admin
3-
.github/workflows/sast-scan.yml @contentstack/security-admin
4-
.github/workflows/jira.yml @contentstack/security-admin
5-
**/.snyk @contentstack/security-admin
3+
**/.snyk @contentstack/security-admin
4+
.github/workflows/policy-scan.yml @contentstack/security-admin
5+
6+
.github/workflows/issues-jira.yml @contentstack/security-admin
7+
8+
.github/workflows/secrets-scan.yml @contentstack/security-admin

.github/workflows/issues-jira.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Create Jira Ticket for Github Issue
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
jobs:
8+
issue-jira:
9+
runs-on: ubuntu-latest
10+
steps:
11+
12+
- name: Login to Jira
13+
uses: atlassian/gajira-login@master
14+
env:
15+
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
16+
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
17+
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
18+
19+
- name: Create Jira Issue
20+
id: create_jira
21+
uses: atlassian/gajira-create@master
22+
with:
23+
project: ${{ secrets.JIRA_PROJECT }}
24+
issuetype: ${{ secrets.JIRA_ISSUE_TYPE }}
25+
summary: Github | Issue | ${{ github.event.repository.name }} | ${{ github.event.issue.title }}
26+
description: |
27+
*GitHub Issue:* ${{ github.event.issue.html_url }}
28+
29+
*Description:*
30+
${{ github.event.issue.body }}
31+
fields: "${{ secrets.ISSUES_JIRA_FIELDS }}"

.github/workflows/jira.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/policy-scan.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Checks the security policy and configurations
2+
on:
3+
pull_request:
4+
types: [opened, synchronize, reopened]
5+
jobs:
6+
security-policy:
7+
if: github.event.repository.visibility == 'public'
8+
runs-on: ubuntu-latest
9+
defaults:
10+
run:
11+
shell: bash
12+
steps:
13+
- uses: actions/checkout@master
14+
- name: Checks for SECURITY.md policy file
15+
run: |
16+
if ! [[ -f "SECURITY.md" || -f ".github/SECURITY.md" ]]; then exit 1; fi
17+
security-license:
18+
if: github.event.repository.visibility == 'public'
19+
runs-on: ubuntu-latest
20+
defaults:
21+
run:
22+
shell: bash
23+
steps:
24+
- uses: actions/checkout@master
25+
- name: Checks for License file
26+
run: |
27+
expected_license_files=("LICENSE" "LICENSE.txt" "LICENSE.md" "License.txt")
28+
license_file_found=false
29+
current_year=$(date +"%Y")
30+
31+
for license_file in "${expected_license_files[@]}"; do
32+
if [ -f "$license_file" ]; then
33+
license_file_found=true
34+
# check the license file for the current year, if not exists, exit with error
35+
if ! grep -q "$current_year" "$license_file"; then
36+
echo "License file $license_file does not contain the current year."
37+
exit 2
38+
fi
39+
break
40+
fi
41+
done
42+
43+
if [ "$license_file_found" = false ]; then
44+
echo "No license file found. Please add a license file to the repository."
45+
exit 1
46+
fi

.github/workflows/sast-scan.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/workflows/secrets-scan.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Secrets Scan
2+
on:
3+
pull_request:
4+
types: [opened, synchronize, reopened]
5+
jobs:
6+
security-secrets:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
with:
11+
fetch-depth: '2'
12+
ref: '${{ github.event.pull_request.head.ref }}'
13+
- run: |
14+
git reset --soft HEAD~1
15+
- name: Install Talisman
16+
run: |
17+
# Download Talisman
18+
wget https://github.com/thoughtworks/talisman/releases/download/v1.37.0/talisman_linux_amd64 -O talisman
19+
20+
# Checksum verification
21+
checksum=$(sha256sum ./talisman | awk '{print $1}')
22+
if [ "$checksum" != "8e0ae8bb7b160bf10c4fa1448beb04a32a35e63505b3dddff74a092bccaaa7e4" ]; then exit 1; fi
23+
24+
# Make it executable
25+
chmod +x talisman
26+
- name: Run talisman
27+
run: |
28+
# Run Talisman with the pre-commit hook
29+
./talisman --githook pre-commit

.talismanrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
fileignoreconfig:
2+
- filename: .github/workflows/secrets-scan.yml
3+
ignore_detectors:
4+
- filecontent
5+
- filename: remove-broken-imports.js
6+
checksum: d9d3ca95b2f4df855c8811c73b5714e80b31e5e84b46affa0cb514dcfcc145bf
7+
version: "1.0"

api/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
},
2626
"homepage": "https://github.com/contentstack-expert-services/migration-v2-node-server#readme",
2727
"dependencies": {
28-
"@contentstack/cli": "1.36.0",
28+
"@contentstack/cli": "1.40.4",
2929
"@contentstack/json-rte-serializer": "^2.0.7",
3030
"@contentstack/marketplace-sdk": "^1.2.4",
3131
"axios": "^1.8.2",
@@ -77,4 +77,4 @@
7777
"typescript": "^5.4.3"
7878
},
7979
"keywords": []
80-
}
80+
}

upload-api/Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Use an official Node.js runtime as a base image
2+
FROM --platform=linux/amd64 node:24.0.1-slim
3+
4+
# Set the working directory in the container
5+
WORKDIR /app
6+
7+
# Copy package.json and package-lock.json to the working directory
8+
COPY package*.json ./
9+
10+
# Install application dependencies
11+
RUN npm install
12+
13+
# Copy the application code to the container
14+
COPY . .
15+
16+
# Expose the port your app will run on
17+
EXPOSE 3000
18+
19+
# Define the command to run your application
20+
CMD ["node", "index.js"]

upload-api/migration-sitecore/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"homepage": "https://github.com/contentstack-expert-services/migration-wordpress-xml#readme",
2121
"dependencies": {
2222
"@contentstack/json-rte-serializer": "^2.0.2",
23-
"@sitecore-jss/sitecore-jss-cli": "^22.4.0",
2423
"ansi-colors": "^4.1.3",
2524
"axios": "^1.8.3",
2625
"chalk": "^4.1.0",
@@ -32,12 +31,11 @@
3231
"lodash": "^4.17.21",
3332
"mkdirp": "^1.0.4",
3433
"moment": "^2.30.1",
35-
"pdf-stream": "^1.3.2",
3634
"request": "^2.88.2",
3735
"rimraf": "^4.1.2",
3836
"uid": "^2.0.2",
3937
"when": "^3.7.8",
4038
"winston": "^3.7.2",
41-
"xml2js": "^0.4.23"
39+
"xml2js": "^0.5.0"
4240
}
4341
}

0 commit comments

Comments
 (0)