diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..a992677 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,5 @@ +## Summary +{provide a thorough description of the changes} + +## Testing Plan +{explain how this has been tested, and what additional testing should be done} diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml deleted file mode 100644 index 8dcaf3e..0000000 --- a/.github/workflows/dependabot-auto-merge.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Dependabot Auto Merge - -on: [push, pull_request] - -jobs: - build-and-test: - name: Run tests - runs-on: ubuntu-latest - steps: - - name: Git checkout - uses: actions/checkout@v2 - - - name: Install dependencies, build, then test - run: | - npm install - npm run build - npm run test - - automerge: - needs: build-and-test - runs-on: ubuntu-latest - steps: - - uses: fastify/github-action-merge-dependabot@v1 - if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request' }} - with: - github-token: ${{secrets.github_token}} - merge-method: 'squash' diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml deleted file mode 100644 index c2a096d..0000000 --- a/.github/workflows/pull-request.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Web Kit Build & Test - -on: pull_request - -jobs: - build-and-test: - name: Build and Test - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: NPM install - uses: actions/setup-node@v4 - with: - node-version: 20.x - - - name: Run NPM CI - run: npm ci - - - name: Typecheck - run: npm run typecheck - - - name: Build Files - run: npm run build - - - name: Run Core tests - run: npm run test - - - name: Archive npm failure logs - uses: actions/upload-artifact@v4 - if: failure() - with: - name: npm-logs - path: ~/.npm/_logs diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9ebb734..d4a9b65 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,11 +1,5 @@ name: Release Kit -# NOTE: The release/publish pipeline runs in mParticle's org once the kit is accepted. -# It depends on mParticle-owned secrets (MP_INTEGRATIONS_SEMANTIC_RELEASE_BOT, NPM_AUTH_TOKEN, -# GPG_PRIVATE_KEY, GPG_PASSPHRASE), the reusable workflow mParticle/mparticle-workflows, and -# publish rights to the @mparticle npm scope. Those do not exist in the ROKT org, so this -# workflow mirrors the target pipeline; it is not expected to run from this repository. - on: workflow_dispatch: inputs: @@ -15,6 +9,7 @@ on: default: 'true' jobs: + # Kit release is done from main branch. confirm-public-repo-main-branch: name: 'Confirm release is run from public/main branch' uses: mParticle/mparticle-workflows/.github/workflows/sdk-release-repo-branch-check.yml@stable @@ -25,12 +20,12 @@ jobs: needs: confirm-public-repo-main-branch steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: NPM install - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: - node-version: 20.x + node-version: 24.x - name: Run NPM CI run: npm ci @@ -42,7 +37,7 @@ jobs: run: npm run test - name: Archive npm failure logs - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 if: failure() with: name: npm-logs @@ -56,16 +51,15 @@ jobs: - confirm-public-repo-main-branch steps: - name: Checkout development branch - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: - repository: ROKT/mparticle-javascript-integration-roktpayplus + repository: mparticle-integrations/mparticle-javascript-integration-roktpayplus ref: development - name: Create and push release branch run: | git checkout -b release/${{ github.run_number }} git push origin release/${{ github.run_number }} - release: name: Perform Release runs-on: ubuntu-latest @@ -87,11 +81,10 @@ jobs: GIT_AUTHOR_EMAIL: developers@mparticle.com GIT_COMMITTER_NAME: mparticle-automation GIT_COMMITTER_EMAIL: developers@mparticle.com - NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} steps: - name: Checkout public main branch - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 ref: main @@ -108,13 +101,17 @@ jobs: run: | git pull origin release/${{ github.run_number }} - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: - node-version: 20.x + node-version: 24.x + registry-url: 'https://registry.npmjs.org' - name: Install dependencies run: npm ci + - name: Ensure npm CLI supports OIDC + run: npm install -g npm@latest + - name: Release --dry-run if: ${{ github.event.inputs.dryRun == 'true'}} run: | @@ -123,9 +120,8 @@ jobs: if: ${{ github.event.inputs.dryRun == 'false'}} run: | npx semantic-release - - name: Archive npm failure logs - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 if: failure() with: name: npm-logs @@ -135,14 +131,13 @@ jobs: if: ${{ github.event.inputs.dryRun == 'false' }} run: | git push origin HEAD:release/${{ github.run_number }} - sync-repository: name: Sync repositories needs: release runs-on: ubuntu-latest steps: - name: Checkout main branch - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 repository: ${{ github.repository }} @@ -153,7 +148,6 @@ jobs: if: ${{ github.event.inputs.dryRun == 'false' }} run: | git pull origin release/${{ github.run_number }} - - name: Push release commits to main and development branches if: ${{ github.event.inputs.dryRun == 'false' }} run: | diff --git a/.github/workflows/reusable-workflows.yml b/.github/workflows/reusable-workflows.yml index 487d0f6..31ad189 100644 --- a/.github/workflows/reusable-workflows.yml +++ b/.github/workflows/reusable-workflows.yml @@ -4,6 +4,9 @@ on: pull_request: jobs: + web-kit-pull-request: + name: Run Web Kit PR Workflow + uses: mParticle/mparticle-workflows/.github/workflows/web-kit-pull-request.yml@stable pr-branch-check-name: name: Check PR for semantic branch name uses: mParticle/mparticle-workflows/.github/workflows/pr-branch-check-name.yml@stable @@ -13,8 +16,14 @@ jobs: pr-branch-target-gitflow: name: Check PR for semantic target branch uses: mParticle/mparticle-workflows/.github/workflows/pr-branch-target-gitflow.yml@stable - security-lint-checks: - name: Security Lint Checks - uses: mparticle/mparticle-workflows/.github/workflows/security-checks.yml@stable - with: - base_branch: 'development' + pr-notify: + if: github.event.pull_request.draft == false && (github.event.action == 'opened' || github.event.action == 'ready_for_review') + needs: + - web-kit-pull-request + name: Notify GChat + permissions: + id-token: write + contents: read + uses: ROKT/rokt-workflows/.github/workflows/oss_pr_opened_notification.yml@main + secrets: + gchat_webhook: ${{ secrets.GCHAT_PRS_WEBHOOK }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c183236..0000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: node_js -node_js: - - "7" -dist: trusty -sudo: required -addons: - chrome: stable - firefox: latest -cache: - directories: - - node_modules -script: - - npm install - - npm run testKarma -- --single-run=true --browsers=ChromeHeadless,FirefoxHeadless diff --git a/release.config.js b/release.config.js index 0de0069..7c4769a 100644 --- a/release.config.js +++ b/release.config.js @@ -1,7 +1,7 @@ module.exports = { branches: ['main'], tagFormat: 'v${version}', - repositoryUrl: 'https://github.com/ROKT/mparticle-javascript-integration-roktpayplus', + repositoryUrl: 'https://github.com/mparticle-integrations/mparticle-javascript-integration-roktpayplus', plugins: [ [ '@semantic-release/commit-analyzer',