Skip to content

Commit

Permalink
Updated action and median value
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSim93 committed Feb 10, 2024
1 parent ab670e9 commit 5d7c97b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Pull request analytics action

![Version](https://img.shields.io/badge/version-2.0.0-blue) ![License](https://img.shields.io/badge/license-MIT-green)
![Version](https://img.shields.io/badge/version-2.0.1-blue) ![License](https://img.shields.io/badge/license-MIT-green)

**pull-request-analytics-action**: A powerful tool for analyzing the effectiveness of both teams and individual developers. This action generates reports based on data from pull requests, code reviews, and comments, enabling you to identify your team's strengths as well as areas needing improvement. The statistics collected by this GitHub Action can be displayed in the form of tables and graphs or passed on for further operations as markdown or a data collection. No information is transferred to external services; all operations are conducted exclusively within the GitHub environment. The tool offers numerous configuration parameters and can be customized to suit specific project needs.

Expand Down
3 changes: 2 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ inputs:
required: false
ALLOW_ANALYTICS:
description: "Allows sending non-sensitive inputs to mixpanel"
required: true
required: false
default: true

outputs:
JSON_COLLECTION:
Expand Down
2 changes: 1 addition & 1 deletion build/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pull-request-analytics-action",
"version": "2.0.0",
"version": "2.0.1",
"description": "Generates detailed PR analytics reports within GitHub, focusing on review efficiency and team performance.",
"main": "build/index.js",
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion src/converters/utils/calculations/calcMedianValue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ export const calcMedianValue = (values?: number[]) => {
const sortedValues = values.slice().sort((a, b) => a - b);
const medianIndex = Math.floor(sortedValues.length / 2);
if (sortedValues.length % 2 === 0) {
return (sortedValues[medianIndex] + sortedValues[medianIndex - 1]) / 2;
return Math.floor(
(sortedValues[medianIndex] + sortedValues[medianIndex - 1]) / 2
);
}
return sortedValues[medianIndex];
};

0 comments on commit 5d7c97b

Please sign in to comment.