Skip to content

Commit bc73c59

Browse files
Merge pull request #76 from contentstack/fix/dev
Fix/dev
2 parents 3e67bfd + 18d34d6 commit bc73c59

File tree

12 files changed

+123
-58
lines changed

12 files changed

+123
-58
lines changed

.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/nuget-publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ jobs:
1010
runs-on: windows-latest
1111
steps:
1212
- name: Checkout repository
13-
uses: actions/checkout@v1
13+
uses: actions/checkout@v4.2.2
1414
- name: Setup .NET Core @ Latest
15-
uses: actions/setup-dotnet@v3
15+
uses: actions/setup-dotnet@v4.3.0
1616
env:
1717
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_API_KEY }}
1818
- name: Build solution and generate NuGet package
@@ -28,9 +28,9 @@ jobs:
2828
runs-on: windows-latest
2929
steps:
3030
- name: Checkout repository
31-
uses: actions/checkout@v1
31+
uses: actions/checkout@v4.2.2
3232
- name: Setup .NET Core @ Latest
33-
uses: actions/setup-dotnet@v3
33+
uses: actions/setup-dotnet@v4.3.0
3434
with:
3535
source-url: https://nuget.pkg.github.com/Contentstack/index.json
3636
env:

.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

.github/workflows/unit-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ jobs:
88
runs-on: windows-latest
99
steps:
1010
- name: Checkout repository
11-
uses: actions/checkout@v1
11+
uses: actions/checkout@v4.2.2
1212
- name: Setup .NET Core @ Latest
13-
uses: actions/setup-dotnet@v1
13+
uses: actions/setup-dotnet@v4.3.0
1414
- name: Build solution and run unit test
1515
run: sh ./Scripts/run-unit-test-case.sh
1616
- name: Test Report

.talismanrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
threshold: medium
22
fileignoreconfig:
3+
- filename: .github/workflows/secrets-scan.yml
4+
ignore_detectors:
5+
- filecontent
36
- filename: Contentstack.Management.Core.Tests/Mock/customUpload.html
47
checksum: 854eb83dcacd62d3bf233c82e5cfd0c69dd20478fa0e7c6af9028f6c6386749d
58
- filename: Contentstack.Management.Core/Attributes/CSMJsonConverterAttribute.cs

Contentstack.Management.ASPNETCore/contentstack.management.aspnetcore.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
<None Include="LICENSE.txt" Pack="true" PackagePath="LICENSE.txt" />
2727
</ItemGroup>
2828
<ItemGroup>
29-
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.1" />
30-
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="9.0.1" />
29+
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.2" />
30+
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="9.0.2" />
3131
<PackageReference Include="contentstack.management.csharp" Version="0.1.10" />
32-
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.1" />
32+
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.2" />
3333
</ItemGroup>
3434
</Project>

Contentstack.Management.Core.Tests/Contentstack.Management.Core.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
<ItemGroup>
1414
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
15-
<PackageReference Include="MSTest.TestAdapter" Version="3.8.0" />
16-
<PackageReference Include="MSTest.TestFramework" Version="3.8.0" />
15+
<PackageReference Include="MSTest.TestAdapter" Version="3.8.2" />
16+
<PackageReference Include="MSTest.TestFramework" Version="3.8.2" />
1717
<PackageReference Include="coverlet.collector" Version="6.0.4"><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1818
<PrivateAssets>all</PrivateAssets>
1919
</PackageReference>

Contentstack.Management.Core.Unit.Tests/Contentstack.Management.Core.Unit.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
<ItemGroup>
1313
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
14-
<PackageReference Include="MSTest.TestAdapter" Version="3.8.0" />
15-
<PackageReference Include="MSTest.TestFramework" Version="3.8.0" />
14+
<PackageReference Include="MSTest.TestAdapter" Version="3.8.2" />
15+
<PackageReference Include="MSTest.TestFramework" Version="3.8.2" />
1616
<PackageReference Include="coverlet.collector" Version="6.0.4"><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1717
<PrivateAssets>all</PrivateAssets>
1818
</PackageReference>

Contentstack.Management.Core/contentstack.management.core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
</ItemGroup>
6565
<ItemGroup>
6666
<PackageReference Include="System.Net.Http" Version="4.3.4" />
67-
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.2" />
67+
<PackageReference Include="Microsoft.Extensions.Options" Version="9.0.2" />
6868
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
6969
</ItemGroup>
7070
</Project>

0 commit comments

Comments
 (0)