Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/chainguard/semantic-release.sts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
issuer: https://token.actions.githubusercontent.com
subject_pattern: repo:liatrio/react-dora-charts:.*

permissions:
contents: write
packages: write
issues: write
pull_requests: write
39 changes: 30 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,51 @@ jobs:
permissions:
id-token: write
contents: write
issues: write
pull-requests: write
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks wrong. It shouldn't need pull requests nor issues.


env:
HUSKY: 0

steps:
- uses: actions/checkout@v4
- name: Generate Token with Octo-STS
id: octo-sts
uses: octo-sts/action@210248e8ae1ae1550aa6e232c6f192b3ccbf7335
with:
persist-credentials: false
scope: 'liatrio/react-dora-charts'
identity: semantic-release

- name: Setup node
id: node
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ steps.octo-sts.outputs.token }}
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
cache: 'yarn'

- name: Install dependencies
run: yarn install
run: yarn install --frozen-lockfile

- name: Build the project
run: yarn rollup

- name: Bump and Release
- name: Get GitHub App User ID for octo-sts[bot]
id: get-user-id
run: echo "user_id=$(gh api "/users/octo-sts[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
env:
GITHUB_TOKEN: ${{ secrets.TAGGING_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ steps.octo-sts.outputs.token }}

- name: Configure Git User
run: |
git config --global user.name "octo-sts[bot]"
git config --global user.email "${{ steps.get-user-id.outputs.user_id }}+octo-sts[bot]@users.noreply.github.com"

- name: Run semantic-release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ steps.octo-sts.outputs.token }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=https://registry.npmjs.org/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 3 additions & 5 deletions src/functions/metricFunctions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,9 @@ const calculateChangeFailureRateAverage = (
return NaN;
}

return (
(totalFailedRecords /
(totalSuccessfulRecords === 0 ? 1 : totalSuccessfulRecords)) *
100
);
const totalRecords = totalSuccessfulRecords + totalFailedRecords;

return (totalFailedRecords / totalRecords) * 100;
};

const calculateChangeLeadTimeAverage = (
Expand Down