From bedee453416ab8c4fecdb30a0064b44c5fdd5119 Mon Sep 17 00:00:00 2001 From: Anna Hughes Date: Tue, 11 Jun 2024 12:29:34 +0100 Subject: [PATCH] Add rollbar sourcemaps (#964) --- .../workflows/community-first-pr-comment.yml | 2 +- .../workflows/community-stale-management.yml | 14 +++++------ components/head/RollbarScript.tsx | 25 +++++++++++++------ 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/.github/workflows/community-first-pr-comment.yml b/.github/workflows/community-first-pr-comment.yml index 18948e33..e476f533 100644 --- a/.github/workflows/community-first-pr-comment.yml +++ b/.github/workflows/community-first-pr-comment.yml @@ -13,4 +13,4 @@ jobs: - uses: actions/first-interaction@v1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - pr-message: "First time contributors to Chayn: Please make sure that this PR is linked to an issue you are assigned! We will not merge contributor PRs without a linked assigned issue. Please ask to be assigned an existing issue or create your own before opening a PR. Read our Contributing Guidelines in the CONTRIBUTING.md file for more details. Thank you for your contribution!" + pr-message: 'First time contributors to Chayn: Please make sure that this PR is linked to an issue you are assigned! We will not merge contributor PRs without a linked assigned issue. Please ask to be assigned an existing issue or create your own before opening a PR. Read our Contributing Guidelines in the CONTRIBUTING.md file for more details. Thank you for your contribution!' diff --git a/.github/workflows/community-stale-management.yml b/.github/workflows/community-stale-management.yml index 8408ef6d..ee049d76 100644 --- a/.github/workflows/community-stale-management.yml +++ b/.github/workflows/community-stale-management.yml @@ -9,7 +9,7 @@ on: workflow_dispatch: # Scheduled to run at 12:00 on every Monday schedule: - - cron: "0 0 * * MON" + - cron: '0 0 * * MON' jobs: stale: @@ -22,8 +22,8 @@ jobs: - uses: actions/stale@v9 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-issue-label: "stale" - stale-pr-label: "stale" + stale-issue-label: 'stale' + stale-pr-label: 'stale' days-before-stale: 30 # disables closing issues days-before-issue-close: -1 @@ -32,13 +32,13 @@ jobs: # only scan assigned issues include-only-assigned: true # ignore issues assigned to staff and bots - exempt-assignees: "kyleecodes, swetha-charles, eleanorreem, annarhughes, tarebyte, dependabot[bot], dependabot, github-actions[bot], github-actions" + exempt-assignees: 'kyleecodes, swetha-charles, eleanorreem, annarhughes, tarebyte, dependabot[bot], dependabot, github-actions[bot], github-actions' # disable removing stale label due to irrelevant activity (like branch updates) remove-stale-when-updated: false # exempt dependabot prs from going stale exempt-pr-labels: dependencies # disable counting irrelevant activity (branch updates) towards day counter on prs. ignore-pr-updates: true - stale-pr-message: "As per Chayn policy, after 30 days of inactivity, we will close this PR." - close-pr-message: "This PR has been closed due to inactivity." - stale-issue-message: "As per Chayn policy, after 30 days of inactivity, we will be unassigning this issue. Please comment to stay assigned." + stale-pr-message: 'As per Chayn policy, after 30 days of inactivity, we will close this PR.' + close-pr-message: 'This PR has been closed due to inactivity.' + stale-issue-message: 'As per Chayn policy, after 30 days of inactivity, we will be unassigning this issue. Please comment to stay assigned.' diff --git a/components/head/RollbarScript.tsx b/components/head/RollbarScript.tsx index cfbef298..283d4ca1 100644 --- a/components/head/RollbarScript.tsx +++ b/components/head/RollbarScript.tsx @@ -1,16 +1,25 @@ +const rollbarConfig = { + accessToken: process.env.NEXT_PUBLIC_ROLLBAR_CLIENT_TOKEN, + captureUncaught: true, + captureUnhandledRejections: true, + payload: { + environment: process.env.NEXT_PUBLIC_ENV, + client: { + javascript: { + source_map_enabled: true, + code_version: process.env.VERCEL_GIT_COMMIT_SHA, + guess_uncaught_frames: true, + }, + }, + }, +}; + const RollbarScript = () => { return (