Skip to content

Commit 9586fad

Browse files
Merge pull request #22 from contentstack/development
Development
2 parents 249821f + 4def95c commit 9586fad

22 files changed

+217
-69
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/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/publish-release.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ jobs:
1010
steps:
1111
- name: Checkout project sources
1212
uses: actions/checkout@v3
13+
- name: Set up JDK 17
14+
uses: actions/setup-java@v4
15+
with:
16+
distribution: 'temurin'
17+
java-version: '17'
1318
- name: Setup Gradle
1419
uses: gradle/gradle-build-action@v2
1520
- name: Setup local.properties
@@ -24,8 +29,8 @@ jobs:
2429
run: |
2530
./gradlew publishAndReleaseToMavenCentral --no-configuration-cache
2631
env:
27-
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.mavenCentralUsername }}
28-
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.mavenCentralPassword }}
32+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_USERNAME }}
33+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_PASSWORD }}
2934
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.signingInMemoryKey }}
3035
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.signingInMemoryKeyId }}
3136
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.signingInMemoryKeyPassword }}

.github/workflows/publish-snapshot.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,14 @@ jobs:
1111
steps:
1212
- name: Checkout project sources
1313
uses: actions/checkout@v3
14+
- name: Set up JDK 17
15+
uses: actions/setup-java@v4
16+
with:
17+
distribution: 'temurin'
18+
java-version: '17'
1419
- name: Check whether the version is a snapshot
1520
run: |
16-
if grep -q "\-SNAPSHOT" ./contentstack/build.gradle
21+
if grep -q "\-SNAPSHOT" ./gradle.properties
1722
then
1823
:
1924
else
@@ -33,8 +38,8 @@ jobs:
3338
run: |
3439
./gradlew publishAllPublicationsToMavenCentralRepository
3540
env:
36-
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.mavenCentralUsername }}
37-
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.mavenCentralPassword }}
41+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_USERNAME }}
42+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_PASSWORD }}
3843
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.signingInMemoryKey }}
3944
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.signingInMemoryKeyId }}
4045
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.signingInMemoryKeyPassword }}

.github/workflows/sast-scan.yml

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

.github/workflows/sca-scan.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,18 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@master
10+
- name: Set up JDK 17
11+
uses: actions/setup-java@v4
12+
with:
13+
distribution: 'temurin'
14+
java-version: '17'
15+
- name: Setup local.properties
16+
run: |
17+
cat << EOF >> local.properties
18+
sdk.dir=$ANDROID_HOME
19+
EOF
1020
- name: Run Snyk to check for vulnerabilities
11-
uses: snyk/actions/gradle@master
21+
uses: snyk/actions/setup@master
1222
env:
1323
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
1424
with:

.idea/AndroidProjectSystem.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/compiler.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/deploymentTargetSelector.xml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)