Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,9 @@ line [0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 11, 8, 9, 11, 10, 9, 6, 5, 6, 1, 1, 0, 0, 0]

Identifies standout pull requests, helping quickly locate the most pending PRs at various stages, the largest and the most commented ones. This facilitates analysis by focusing on the most significant cases. Here is an example of the most commented PRs.

1. [Feature: PR Title 1(example)(31)](https://github.com/AlexSim93/pull-request-analytics-action/pull/15)
2. [Feature: PR Title 2(example)(27)](https://github.com/AlexSim93/pull-request-analytics-action/pull/15)
3. [Feature: PR Title 3(example)(25)](https://github.com/AlexSim93/pull-request-analytics-action/pull/15)
1. [Feature: PR Title 1(example)(31)(Author: AlexSim93)](https://github.com/AlexSim93/pull-request-analytics-action/pull/15)
2. [Feature: PR Title 2(example)(27)(Author: AlexSim93)](https://github.com/AlexSim93/pull-request-analytics-action/pull/15)
3. [Feature: PR Title 3(example)(25)(Author: AlexSim93)](https://github.com/AlexSim93/pull-request-analytics-action/pull/15)

## Getting started

Expand Down Expand Up @@ -302,8 +302,8 @@ Below is a table outlining the various configuration parameters available for **
| Parameter Name | Description | Default Value |
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| `GITHUB_TOKEN` | `GITHUB_TOKEN` or personal access token. **repo** and **read:org** scopes required for **personal access token(classic)**. For scenarios involving data collection from multiple repositories or handling a large number of pull requests, it's recommended to use a **personal access token (classic)**. This parameter is **required** | - |
| `GITHUB_OWNER_FOR_ISSUE` | Owner of the repository where an issue with the report needs to be created. This parameter is mandatory if `EXECUTION_OUTCOME` includes `new-issue` or `existing-issue` values. | - |
| `GITHUB_REPO_FOR_ISSUE` | The repository where an issue with the report needs to be created. This parameter is mandatory if `EXECUTION_OUTCOME` includes `new-issue` or `existing-issue` values. | - |
| `GITHUB_OWNER_FOR_ISSUE` | Owner of the repository where an issue with the report needs to be created. This parameter is **required** if `EXECUTION_OUTCOME` includes `new-issue` or `existing-issue` values. | - |
| `GITHUB_REPO_FOR_ISSUE` | The repository where an issue with the report needs to be created. This parameter is **required** if `EXECUTION_OUTCOME` includes `new-issue` or `existing-issue` values. | - |
| `GITHUB_OWNERS_REPOS` | Repositories to collect data from. Enter values in the format `owner/repo`, separated by commas. Either `GITHUB_OWNERS_REPOS` or `ORGANIZATIONS` must be set. Example: `owner/repo, owner/another-repo` | - |
| `ORGANIZATIONS` | Organizations from whose repositories data needs to be collected., separated by commas. Repositories from these organizations will be added to the `GITHUB_OWNERS_REPOS` list to create an array with unique repositories. Either `GITHUB_OWNERS_REPOS` or `ORGANIZATIONS` must be set. | - |
| `SHOW_STATS_TYPES` | Stats types that should be displayed in report. Values must be separated by commas. Can take values: `timeline`, `workload`, `pr-quality`, `code-review-engagement`, `response-time`. Example: `timeline, workload, pr-quality, code-review-engagement, response-time` | `timeline, workload, pr-quality, code-review-engagement, response-time` |
Expand Down
8 changes: 5 additions & 3 deletions 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": "4.6.0",
"version": "4.6.1",
"description": "Generates detailed PR analytics reports within GitHub, focusing on review efficiency and team performance.",
"main": "build/index.js",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions src/converters/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ type PullRequestTimelineInfo = {
sizePoints: number;
additions: number;
deletions: number;
author: string;
};

type Discussion = {
Expand Down
2 changes: 2 additions & 0 deletions src/converters/utils/preparePullRequestTimeline.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { getMultipleValuesInput, getValueAsIs } from "../../common/utils";
import { makeComplexRequest } from "../../requests";
import { invalidUserLogin } from "../constants";
import { Collection } from "../types";
import {
calcDraftTime,
Expand Down Expand Up @@ -151,6 +152,7 @@ export const preparePullRequestTimeline = (
pullRequestInfo?.deletions
),
additions: pullRequestInfo?.additions || 0,
author: pullRequestInfo?.user?.login || invalidUserLogin,
deletions: pullRequestInfo?.deletions || 0,
timeToReview: timeToReview || 0,
timeToApprove: timeToApprove ? timeToApprove - (timeToReview || 0) : 0,
Expand Down
2 changes: 1 addition & 1 deletion src/view/utils/createPullRequestQualityTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const createPullRequestQualityTable = (
?.sort((a, b) => (b.comments || 0) - (a.comments || 0))
.slice(0, parseInt(getValueAsIs("TOP_LIST_AMOUNT")))
.map((item) => ({
text: `${item.title}(${item.comments || 0})`,
text: `${item.title}(${item.comments || 0})(Author: ${item.author})`,
link: item.link || "",
})) || [];

Expand Down
2 changes: 1 addition & 1 deletion src/view/utils/createTimelineContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const createTimelineContent = (
.map((item) => ({
text: `${item.title}(${
formatMinutesDuration(item[milestone]) || "-"
})`,
})(Author: ${item.author})`,
link: item.link || "",
})) || [];
return createList(milestoneTitle[milestone], items);
Expand Down
2 changes: 1 addition & 1 deletion src/view/utils/createTotalTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const createTotalTable = (
?.sort((a, b) => (b.sizePoints || 0) - (a.sizePoints || 0))
.slice(0, parseInt(getValueAsIs("TOP_LIST_AMOUNT")))
.map((item) => ({
text: `${item.title}(+${item.additions}/-${item.deletions})`,
text: `${item.title}(+${item.additions}/-${item.deletions})(Author: ${item.author})`,
link: item.link || "",
})) || [];

Expand Down