gatsby-plugin-rudderstack 3.0.0-beta.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/README.md +81 -58
- package/gatsby-ssr.js +55 -0
- package/package.json +25 -23
- package/.eslintcache +0 -1
- package/.eslintignore +0 -8
- package/.eslintrc.json +0 -41
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -39
- package/.github/ISSUE_TEMPLATE/feature-request.md +0 -20
- package/.github/pull_request_template.md +0 -13
- package/.github/workflows/build-and-quality-checks.yml +0 -36
- package/.github/workflows/check_pr_title.yml +0 -17
- package/.github/workflows/codeql-analysis.yml +0 -70
- package/.github/workflows/create-hotfix-branch.yml +0 -21
- package/.github/workflows/deploy-npm.yml +0 -82
- package/.github/workflows/draft-new-release.yml +0 -86
- package/.github/workflows/housekeeping.yaml +0 -40
- package/.github/workflows/notion-pr-sync.yml +0 -55
- package/.github/workflows/publish-new-release.yml +0 -111
- package/.github/workflows/test.yml +0 -44
- package/.husky/commit-msg +0 -4
- package/.husky/pre-commit +0 -4
- package/.idea/gatsby-plugin-rudderstack.iml +0 -10
- package/.idea/misc.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/vcs.xml +0 -6
- package/.nvmrc +0 -1
- package/.prettierignore +0 -6
- package/.prettierrc +0 -7
- package/CODEOWNERS +0 -2
- package/CODE_OF_CONDUCT.md +0 -80
- package/CONTRIBUTING.md +0 -47
- package/commitlint.config.js +0 -3
- package/dist/LICENSE.md +0 -21
- package/dist/README.md +0 -331
- package/dist/gatsby-node.js +0 -1
- package/dist/gatsby-ssr.js +0 -60
- package/dist/package.json +0 -98
- package/sonar-project.properties +0 -35
- /package/{dist/gatsby-browser.js → gatsby-browser.js} +0 -0
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
# For most projects, this workflow file will not need changing; you simply need
|
|
2
|
-
# to commit it to your repository.
|
|
3
|
-
#
|
|
4
|
-
# You may wish to alter this file to override the set of languages analyzed,
|
|
5
|
-
# or to provide custom queries or build logic.
|
|
6
|
-
#
|
|
7
|
-
# ******** NOTE ********
|
|
8
|
-
# We have attempted to detect the languages in your repository. Please check
|
|
9
|
-
# the `language` matrix defined below to confirm you have the correct set of
|
|
10
|
-
# supported CodeQL languages.
|
|
11
|
-
#
|
|
12
|
-
name: 'CodeQL'
|
|
13
|
-
|
|
14
|
-
on:
|
|
15
|
-
push:
|
|
16
|
-
branches: [main, develop]
|
|
17
|
-
pull_request:
|
|
18
|
-
# The branches below must be a subset of the branches above
|
|
19
|
-
branches: [main, develop]
|
|
20
|
-
schedule:
|
|
21
|
-
- cron: '0 0 * * *'
|
|
22
|
-
|
|
23
|
-
jobs:
|
|
24
|
-
analyze:
|
|
25
|
-
name: Analyze
|
|
26
|
-
runs-on: ubuntu-latest
|
|
27
|
-
permissions:
|
|
28
|
-
actions: read
|
|
29
|
-
contents: read
|
|
30
|
-
security-events: write
|
|
31
|
-
|
|
32
|
-
strategy:
|
|
33
|
-
fail-fast: false
|
|
34
|
-
matrix:
|
|
35
|
-
language: ['javascript']
|
|
36
|
-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
|
37
|
-
# Learn more about CodeQL language support at https://git.io/codeql-language-support
|
|
38
|
-
|
|
39
|
-
steps:
|
|
40
|
-
- name: Checkout repository
|
|
41
|
-
uses: actions/checkout@v3
|
|
42
|
-
|
|
43
|
-
# Initializes the CodeQL tools for scanning.
|
|
44
|
-
- name: Initialize CodeQL
|
|
45
|
-
uses: github/codeql-action/init@v2
|
|
46
|
-
with:
|
|
47
|
-
languages: ${{ matrix.language }}
|
|
48
|
-
# If you wish to specify custom queries, you can do so here or in a config file.
|
|
49
|
-
# By default, queries listed here will override any specified in a config file.
|
|
50
|
-
# Prefix the list here with "+" to use these queries and those in the config file.
|
|
51
|
-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
|
52
|
-
|
|
53
|
-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
|
54
|
-
# If this step fails, then you should remove it and run the build manually (see below)
|
|
55
|
-
- name: Autobuild
|
|
56
|
-
uses: github/codeql-action/autobuild@v2
|
|
57
|
-
|
|
58
|
-
# ℹ️ Command-line programs to run using the OS shell.
|
|
59
|
-
# 📚 https://git.io/JvXDl
|
|
60
|
-
|
|
61
|
-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
|
62
|
-
# and modify them (or add more) to build your code if your project
|
|
63
|
-
# uses a compiled language
|
|
64
|
-
|
|
65
|
-
#- run: |
|
|
66
|
-
# make bootstrap
|
|
67
|
-
# make release
|
|
68
|
-
|
|
69
|
-
- name: Perform CodeQL Analysis
|
|
70
|
-
uses: github/codeql-action/analyze@v2
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
name: Create new hotfix branch
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
inputs:
|
|
6
|
-
hotfix_name:
|
|
7
|
-
description: Hotfix branch name
|
|
8
|
-
required: true
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
create-branch:
|
|
12
|
-
name: Create new branch
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
if: github.ref == 'refs/heads/main'
|
|
15
|
-
steps:
|
|
16
|
-
- name: Create branch
|
|
17
|
-
uses: peterjgrainger/action-create-branch@v2.4.0
|
|
18
|
-
env:
|
|
19
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
20
|
-
with:
|
|
21
|
-
branch: 'hotfix/${{ github.event.inputs.hotfix_name }}'
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
name: Deploy to NPM
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
pull_request:
|
|
6
|
-
branches:
|
|
7
|
-
- main
|
|
8
|
-
types:
|
|
9
|
-
- closed
|
|
10
|
-
|
|
11
|
-
permissions:
|
|
12
|
-
id-token: write # allows the JWT to be requested from GitHub's OIDC provider
|
|
13
|
-
contents: read # This is required for actions/checkout
|
|
14
|
-
|
|
15
|
-
jobs:
|
|
16
|
-
deploy-tag:
|
|
17
|
-
name: Deploy to NPM
|
|
18
|
-
runs-on: ubuntu-latest
|
|
19
|
-
if: (startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/main')) || ((startsWith(github.event.pull_request.head.ref, 'release/') || startsWith(github.event.pull_request.head.ref, 'hotfix-release/')) && github.event.pull_request.merged == true) # only merged pull requests must trigger this job
|
|
20
|
-
steps:
|
|
21
|
-
- name: Checkout source branch
|
|
22
|
-
uses: actions/checkout@v3
|
|
23
|
-
|
|
24
|
-
- name: Setup Node
|
|
25
|
-
uses: actions/setup-node@v3
|
|
26
|
-
with:
|
|
27
|
-
node-version-file: '.nvmrc'
|
|
28
|
-
cache: 'npm'
|
|
29
|
-
|
|
30
|
-
- name: Build files
|
|
31
|
-
env:
|
|
32
|
-
HUSKY: 0
|
|
33
|
-
run: |
|
|
34
|
-
npm ci
|
|
35
|
-
npm run build
|
|
36
|
-
|
|
37
|
-
- name: Publish package to NPM
|
|
38
|
-
env:
|
|
39
|
-
HUSKY: 0
|
|
40
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
41
|
-
run: |
|
|
42
|
-
npm set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
|
|
43
|
-
cd dist
|
|
44
|
-
npm publish
|
|
45
|
-
|
|
46
|
-
- name: Get new version number
|
|
47
|
-
run: |
|
|
48
|
-
current_version=$(jq -r .version package.json)
|
|
49
|
-
echo "CURRENT_VERSION_VALUE=$current_version" >> $GITHUB_ENV
|
|
50
|
-
echo "DATE=$(date)" >> $GITHUB_ENV
|
|
51
|
-
|
|
52
|
-
- name: Send message to Slack channel
|
|
53
|
-
id: slack
|
|
54
|
-
uses: slackapi/slack-github-action@v1.23.0
|
|
55
|
-
env:
|
|
56
|
-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
|
|
57
|
-
PROJECT_NAME: 'Gatsby Plugin Rudderstack'
|
|
58
|
-
NPM_PACKAGE_URL: 'https://www.npmjs.com/package/rudder-sdk-js'
|
|
59
|
-
with:
|
|
60
|
-
channel-id: ${{ secrets.SLACK_RELEASE_CHANNEL_ID }}
|
|
61
|
-
payload: |
|
|
62
|
-
{
|
|
63
|
-
"blocks": [
|
|
64
|
-
{
|
|
65
|
-
"type": "header",
|
|
66
|
-
"text": {
|
|
67
|
-
"type": "plain_text",
|
|
68
|
-
"text": "New release: ${{ env.PROJECT_NAME }}"
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"type": "divider"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
"type": "section",
|
|
76
|
-
"text": {
|
|
77
|
-
"type": "mrkdwn",
|
|
78
|
-
"text": "*Release: <${{ env.NPM_PACKAGE_URL }}|${{ env.CURRENT_VERSION_VALUE }}>*\n${{ env.DATE }}"
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
]
|
|
82
|
-
}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
name: Draft new release
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
|
|
6
|
-
jobs:
|
|
7
|
-
draft-new-release:
|
|
8
|
-
name: Draft a new release
|
|
9
|
-
runs-on: ubuntu-latest
|
|
10
|
-
if: startsWith(github.ref, 'refs/heads/develop') || startsWith(github.ref, 'refs/heads/hotfix/')
|
|
11
|
-
steps:
|
|
12
|
-
- name: Checkout source branch
|
|
13
|
-
uses: actions/checkout@v3
|
|
14
|
-
with:
|
|
15
|
-
fetch-depth: 0
|
|
16
|
-
|
|
17
|
-
- name: Setup Node
|
|
18
|
-
uses: actions/setup-node@v3
|
|
19
|
-
with:
|
|
20
|
-
node-version-file: '.nvmrc'
|
|
21
|
-
cache: 'npm'
|
|
22
|
-
|
|
23
|
-
# In order to make a commit, we need to initialize a user.
|
|
24
|
-
# You may choose to write something less generic here if you want, it doesn't matter functionality wise.
|
|
25
|
-
- name: Initialize mandatory git config
|
|
26
|
-
run: |
|
|
27
|
-
git config user.name "GitHub actions"
|
|
28
|
-
git config user.email noreply@github.com
|
|
29
|
-
|
|
30
|
-
# Calculate the next release version based on conventional semantic release
|
|
31
|
-
- name: Create release branch
|
|
32
|
-
id: create-release
|
|
33
|
-
env:
|
|
34
|
-
HUSKY: 0
|
|
35
|
-
run: |
|
|
36
|
-
source_branch_name=${GITHUB_REF##*/}
|
|
37
|
-
release_type=release
|
|
38
|
-
grep -q "hotfix/" <<< "${GITHUB_REF}" && release_type=hotfix-release
|
|
39
|
-
git fetch origin main --depth=1
|
|
40
|
-
git merge origin/main
|
|
41
|
-
current_version=$(jq -r .version package.json)
|
|
42
|
-
|
|
43
|
-
npx standard-version --skip.commit --skip.tag --skip.changelog
|
|
44
|
-
new_version=$(jq -r .version package.json)
|
|
45
|
-
git reset --hard
|
|
46
|
-
|
|
47
|
-
branch_name="${release_type}/${new_version}"
|
|
48
|
-
|
|
49
|
-
echo "Source branch for new release is $source_branch_name"
|
|
50
|
-
echo "Current version is $current_version"
|
|
51
|
-
echo "Release type is $release_type"
|
|
52
|
-
echo "New version is $new_version"
|
|
53
|
-
echo "New release branch name is $branch_name"
|
|
54
|
-
git checkout -b "$branch_name"
|
|
55
|
-
git push --set-upstream origin "$branch_name"
|
|
56
|
-
|
|
57
|
-
echo "source_branch_name=$source_branch_name" >> $GITHUB_OUTPUT
|
|
58
|
-
echo "branch_name=$branch_name" >> $GITHUB_OUTPUT
|
|
59
|
-
echo "new_version=$new_version" >> $GITHUB_OUTPUT
|
|
60
|
-
echo "CURRENT_VERSION_VALUE=$current_version" >> $GITHUB_ENV
|
|
61
|
-
echo "NEW_VERSION_VALUE=$new_version" >> $GITHUB_ENV
|
|
62
|
-
|
|
63
|
-
- name: Update changelog & bump version
|
|
64
|
-
id: finish-release
|
|
65
|
-
env:
|
|
66
|
-
HUSKY: 0
|
|
67
|
-
run: |
|
|
68
|
-
echo "Current version: $CURRENT_VERSION_VALUE"
|
|
69
|
-
echo "New version: $NEW_VERSION_VALUE"
|
|
70
|
-
npx replace $CURRENT_VERSION_VALUE $NEW_VERSION_VALUE sonar-project.properties
|
|
71
|
-
git add sonar-project.properties
|
|
72
|
-
npx standard-version -a --skip.tag
|
|
73
|
-
|
|
74
|
-
- name: Push new version in release branch & tag
|
|
75
|
-
run: |
|
|
76
|
-
git push
|
|
77
|
-
|
|
78
|
-
- name: Create pull request into main
|
|
79
|
-
uses: repo-sync/pull-request@v2
|
|
80
|
-
with:
|
|
81
|
-
source_branch: ${{ steps.create-release.outputs.branch_name }}
|
|
82
|
-
destination_branch: 'main'
|
|
83
|
-
github_token: ${{ secrets.PAT }}
|
|
84
|
-
pr_title: 'chore(release): pulling ${{ steps.create-release.outputs.branch_name }} into main'
|
|
85
|
-
pr_body: ':crown: *An automated PR*'
|
|
86
|
-
pr_reviewer: 'bardisg'
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
name: Handle stale PRs
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
schedule:
|
|
5
|
-
- cron: '42 1 * * *'
|
|
6
|
-
|
|
7
|
-
jobs:
|
|
8
|
-
prs:
|
|
9
|
-
name: Clean up stale prs
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
|
|
12
|
-
permissions:
|
|
13
|
-
issues: write
|
|
14
|
-
pull-requests: write
|
|
15
|
-
|
|
16
|
-
steps:
|
|
17
|
-
- uses: actions/stale@v6
|
|
18
|
-
with:
|
|
19
|
-
repo-token: ${{ github.token }}
|
|
20
|
-
operations-per-run: 200
|
|
21
|
-
stale-pr-message: 'This PR is considered to be stale. It has been open 20 days with no further activity thus it is going to be closed in 10 days. To avoid such a case please consider removing the stale label manually or add a comment to the PR.'
|
|
22
|
-
days-before-pr-stale: 20
|
|
23
|
-
days-before-pr-close: 10
|
|
24
|
-
stale-pr-label: 'Stale'
|
|
25
|
-
|
|
26
|
-
branches:
|
|
27
|
-
name: Cleanup old branches
|
|
28
|
-
runs-on: ubuntu-latest
|
|
29
|
-
steps:
|
|
30
|
-
- name: Checkout repository
|
|
31
|
-
uses: actions/checkout@v2
|
|
32
|
-
- name: Run delete-old-branches-action
|
|
33
|
-
uses: beatlabs/delete-old-branches-action@v0.0.9
|
|
34
|
-
with:
|
|
35
|
-
repo_token: ${{ github.token }}
|
|
36
|
-
date: '2 months ago'
|
|
37
|
-
dry_run: false
|
|
38
|
-
delete_tags: false
|
|
39
|
-
extra_protected_branch_regex: ^(main|master|develop)$
|
|
40
|
-
exclude_open_pr_branches: true
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
name: Notion PR Sync
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
issues:
|
|
5
|
-
types:
|
|
6
|
-
[
|
|
7
|
-
opened,
|
|
8
|
-
edited,
|
|
9
|
-
deleted,
|
|
10
|
-
transferred,
|
|
11
|
-
pinned,
|
|
12
|
-
unpinned,
|
|
13
|
-
closed,
|
|
14
|
-
reopened,
|
|
15
|
-
assigned,
|
|
16
|
-
unassigned,
|
|
17
|
-
labeled,
|
|
18
|
-
unlabeled,
|
|
19
|
-
locked,
|
|
20
|
-
unlocked,
|
|
21
|
-
milestoned,
|
|
22
|
-
demilestoned,
|
|
23
|
-
]
|
|
24
|
-
pull_request:
|
|
25
|
-
types:
|
|
26
|
-
[
|
|
27
|
-
assigned,
|
|
28
|
-
unassigned,
|
|
29
|
-
labeled,
|
|
30
|
-
unlabeled,
|
|
31
|
-
opened,
|
|
32
|
-
edited,
|
|
33
|
-
closed,
|
|
34
|
-
reopened,
|
|
35
|
-
synchronize,
|
|
36
|
-
converted_to_draft,
|
|
37
|
-
ready_for_review,
|
|
38
|
-
locked,
|
|
39
|
-
unlocked,
|
|
40
|
-
review_requested,
|
|
41
|
-
review_request_removed,
|
|
42
|
-
auto_merge_enabled,
|
|
43
|
-
auto_merge_disabled,
|
|
44
|
-
]
|
|
45
|
-
|
|
46
|
-
jobs:
|
|
47
|
-
request:
|
|
48
|
-
runs-on: ubuntu-latest
|
|
49
|
-
steps:
|
|
50
|
-
- name: Sync GitHub PRs to Notion
|
|
51
|
-
uses: sivashanmukh/github-notion-pr-sync@1.0.0
|
|
52
|
-
with:
|
|
53
|
-
notionKey: ${{ secrets.NOTION_BOT_KEY }}
|
|
54
|
-
notionDatabaseId: ${{ secrets.NOTION_PR_DB_ID }}
|
|
55
|
-
githubKey: ${{ secrets.PAT }}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
name: Publish new github release
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
pull_request:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
types:
|
|
8
|
-
- closed
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
release:
|
|
12
|
-
name: Publish new release
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
if: (startsWith(github.event.pull_request.head.ref, 'release/') || startsWith(github.event.pull_request.head.ref, 'hotfix-release/')) && github.event.pull_request.merged == true # only merged pull requests must trigger this job
|
|
15
|
-
steps:
|
|
16
|
-
- name: Extract version from branch name (for release branches)
|
|
17
|
-
id: extract-version
|
|
18
|
-
run: |
|
|
19
|
-
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
|
|
20
|
-
VERSION=${BRANCH_NAME#hotfix-}
|
|
21
|
-
VERSION=${VERSION#release/}
|
|
22
|
-
|
|
23
|
-
echo "release_version=$VERSION" >> $GITHUB_OUTPUT
|
|
24
|
-
|
|
25
|
-
- name: Checkout
|
|
26
|
-
uses: actions/checkout@v3
|
|
27
|
-
with:
|
|
28
|
-
fetch-depth: 0
|
|
29
|
-
|
|
30
|
-
- name: Setup Node
|
|
31
|
-
uses: actions/setup-node@v3
|
|
32
|
-
with:
|
|
33
|
-
node-version-file: '.nvmrc'
|
|
34
|
-
cache: 'npm'
|
|
35
|
-
|
|
36
|
-
# In order to make a commit, we need to initialize a user.
|
|
37
|
-
# You may choose to write something less generic here if you want, it doesn't matter functionality wise.
|
|
38
|
-
- name: Initialize mandatory git config
|
|
39
|
-
run: |
|
|
40
|
-
git config user.name "GitHub actions"
|
|
41
|
-
git config user.email noreply@github.com
|
|
42
|
-
|
|
43
|
-
- name: Create GitHub Release
|
|
44
|
-
id: create_release
|
|
45
|
-
env:
|
|
46
|
-
HUSKY: 0
|
|
47
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
48
|
-
CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
49
|
-
run: |
|
|
50
|
-
git tag -a v${{ steps.extract-version.outputs.release_version }} -m "chore: release v${{ steps.extract-version.outputs.release_version }}"
|
|
51
|
-
git push origin refs/tags/v${{ steps.extract-version.outputs.release_version }}
|
|
52
|
-
npx conventional-github-releaser -p angular
|
|
53
|
-
echo "DATE=$(date)" >> $GITHUB_ENV
|
|
54
|
-
|
|
55
|
-
- name: Create pull request into staging
|
|
56
|
-
uses: repo-sync/pull-request@v2
|
|
57
|
-
with:
|
|
58
|
-
source_branch: 'main'
|
|
59
|
-
destination_branch: 'develop'
|
|
60
|
-
github_token: ${{ secrets.PAT }}
|
|
61
|
-
pr_title: 'chore(release): pulling main into develop post release v${{ steps.extract-version.outputs.release_version }}'
|
|
62
|
-
pr_body: ':crown: *An automated PR*'
|
|
63
|
-
pr_reviewer: 'bardisg'
|
|
64
|
-
|
|
65
|
-
- name: Delete hotfix release branch
|
|
66
|
-
uses: koj-co/delete-merged-action@master
|
|
67
|
-
if: startsWith(github.event.pull_request.head.ref, 'hotfix-release/')
|
|
68
|
-
with:
|
|
69
|
-
branches: 'hotfix-release/*'
|
|
70
|
-
env:
|
|
71
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
72
|
-
|
|
73
|
-
- name: Delete release branch
|
|
74
|
-
uses: koj-co/delete-merged-action@master
|
|
75
|
-
if: startsWith(github.event.pull_request.head.ref, 'release/')
|
|
76
|
-
with:
|
|
77
|
-
branches: 'release/*'
|
|
78
|
-
env:
|
|
79
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
80
|
-
|
|
81
|
-
- name: Send message to Slack channel
|
|
82
|
-
id: slack
|
|
83
|
-
uses: slackapi/slack-github-action@v1.23.0
|
|
84
|
-
env:
|
|
85
|
-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
|
|
86
|
-
PROJECT_NAME: 'Gatsby Rudderstack Plugin'
|
|
87
|
-
RELEASES_URL: 'https://github.com/rudderlabs/gatsby-plugin-rudderstack/releases/'
|
|
88
|
-
with:
|
|
89
|
-
channel-id: ${{ secrets.SLACK_RELEASE_CHANNEL_ID }}
|
|
90
|
-
payload: |
|
|
91
|
-
{
|
|
92
|
-
"blocks": [
|
|
93
|
-
{
|
|
94
|
-
"type": "header",
|
|
95
|
-
"text": {
|
|
96
|
-
"type": "plain_text",
|
|
97
|
-
"text": "New release: ${{ env.PROJECT_NAME }}"
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"type": "divider"
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
"type": "section",
|
|
105
|
-
"text": {
|
|
106
|
-
"type": "mrkdwn",
|
|
107
|
-
"text": "*Release: <${{env.RELEASES_URL}}${{ steps.extract-version.outputs.release_version }}|v${{ steps.extract-version.outputs.release_version }}>*\n${{ env.DATE }}"
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
]
|
|
111
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
name: 'Unit Tests, Coverage & Sonar'
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
push:
|
|
6
|
-
branches: ['main', 'develop']
|
|
7
|
-
pull_request:
|
|
8
|
-
branches: ['main', 'develop']
|
|
9
|
-
types: ['opened', 'reopened', 'synchronize']
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
build:
|
|
13
|
-
name: 'Unit Tests, Coverage & Sonar'
|
|
14
|
-
runs-on: ubuntu-latest
|
|
15
|
-
|
|
16
|
-
steps:
|
|
17
|
-
- name: Checkout
|
|
18
|
-
uses: actions/checkout@v3
|
|
19
|
-
with:
|
|
20
|
-
fetch-depth: 0
|
|
21
|
-
|
|
22
|
-
- name: Setup Node
|
|
23
|
-
uses: actions/setup-node@v3
|
|
24
|
-
with:
|
|
25
|
-
node-version-file: '.nvmrc'
|
|
26
|
-
cache: 'npm'
|
|
27
|
-
|
|
28
|
-
- name: Execute unit tests
|
|
29
|
-
env:
|
|
30
|
-
HUSKY: 0
|
|
31
|
-
run: |
|
|
32
|
-
npm ci
|
|
33
|
-
npm run test:ci
|
|
34
|
-
npm run check:lint:ci
|
|
35
|
-
|
|
36
|
-
- name: Fix filesystem paths in generated reports
|
|
37
|
-
run: |
|
|
38
|
-
sed -i 's+/home/runner/work/gatsby-plugin-rudderstack/gatsby-plugin-rudderstack+/github/workspace+g' reports/eslint.json
|
|
39
|
-
|
|
40
|
-
- name: SonarCloud Scan
|
|
41
|
-
uses: SonarSource/sonarcloud-github-action@master
|
|
42
|
-
env:
|
|
43
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
44
|
-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
package/.husky/commit-msg
DELETED
package/.husky/pre-commit
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<module type="JAVA_MODULE" version="4">
|
|
3
|
-
<component name="Go" enabled="true" />
|
|
4
|
-
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
5
|
-
<exclude-output />
|
|
6
|
-
<content url="file://$MODULE_DIR$" />
|
|
7
|
-
<orderEntry type="inheritedJdk" />
|
|
8
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
|
9
|
-
</component>
|
|
10
|
-
</module>
|
package/.idea/misc.xml
DELETED
package/.idea/modules.xml
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="ProjectModuleManager">
|
|
4
|
-
<modules>
|
|
5
|
-
<module fileurl="file://$PROJECT_DIR$/.idea/gatsby-plugin-rudderstack.iml" filepath="$PROJECT_DIR$/.idea/gatsby-plugin-rudderstack.iml" />
|
|
6
|
-
</modules>
|
|
7
|
-
</component>
|
|
8
|
-
</project>
|
package/.idea/vcs.xml
DELETED
package/.nvmrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
16.15.1
|
package/.prettierignore
DELETED
package/.prettierrc
DELETED
package/CODEOWNERS
DELETED
package/CODE_OF_CONDUCT.md
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
|
2
|
-
|
|
3
|
-
## Our Pledge
|
|
4
|
-
|
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
|
8
|
-
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
|
9
|
-
level of experience, education, socio-economic status, nationality, personal
|
|
10
|
-
appearance, race, religion, or sexual identity and orientation.
|
|
11
|
-
|
|
12
|
-
## Our Standards
|
|
13
|
-
|
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
|
15
|
-
include:
|
|
16
|
-
|
|
17
|
-
* Using welcoming and inclusive language
|
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
|
19
|
-
* Gracefully accepting constructive criticism
|
|
20
|
-
* Focusing on what is best for the community
|
|
21
|
-
* Showing empathy towards other community members
|
|
22
|
-
|
|
23
|
-
Examples of unacceptable behavior by participants include:
|
|
24
|
-
|
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
|
26
|
-
advances
|
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
28
|
-
* Public or private harassment
|
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
|
30
|
-
address, without explicit permission
|
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
|
32
|
-
professional setting
|
|
33
|
-
|
|
34
|
-
## Our Responsibilities
|
|
35
|
-
|
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
|
38
|
-
response to any instances of unacceptable behavior.
|
|
39
|
-
|
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
|
44
|
-
threatening, offensive, or harmful.
|
|
45
|
-
|
|
46
|
-
## Scope
|
|
47
|
-
|
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
|
49
|
-
when an individual is representing the project or its community. Examples of
|
|
50
|
-
representing a project or community include using an official project e-mail
|
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
|
53
|
-
further defined and clarified by project maintainers.
|
|
54
|
-
|
|
55
|
-
## Enforcement
|
|
56
|
-
|
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
58
|
-
reported by contacting the project team at **contact@rudderstack.com**. All
|
|
59
|
-
complaints will be reviewed and investigated and will result in a response that
|
|
60
|
-
is deemed necessary and appropriate to the circumstances. The project team is
|
|
61
|
-
obligated to maintain confidentiality with regard to the reporter of an incident.
|
|
62
|
-
Further details of specific enforcement policies may be posted separately.
|
|
63
|
-
|
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
|
66
|
-
members of the project's leadership.
|
|
67
|
-
|
|
68
|
-
## Attribution
|
|
69
|
-
|
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
|
71
|
-
available at [https://www.contributor-covenant.org][contributor-covenant].
|
|
72
|
-
|
|
73
|
-
For answers to common questions about this code of conduct, see the [FAQs][faqs].
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
<!-----variables---->
|
|
77
|
-
|
|
78
|
-
[homepage]: https://www.contributor-covenant.org
|
|
79
|
-
[contributor-covenant]: https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
|
80
|
-
[faqs]: https://www.contributor-covenant.org/faq
|