# Pull Request

## Description

Metrics relating to Pull Requests imported from a code repository tool (e.g. GitHub, GitLab).

## Measures

| Name                                               | Title                              | Description                                                                                                                                      |
| -------------------------------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `PullRequestDetail.elapseTime`                     | Elapse Time                        | The time from the first commit or the start of pull requests to its closure or merge, in hours.                                                  |
| `PullRequestDetail.totalCycleTime`                 | Total Cycle Time                   | The total time from first commit to merge or closure pull requests, in hours.                                                                    |
| `PullRequestDetail.avgCycleTime`                   | Avg Cycle Time                     | Average time from first commit to merge or closure of pull requests, in hours.                                                                   |
| `PullRequestDetail.medianCycleTime`                | Median Cycle Time                  | The median time from first commit to merge or closure of pull requests, in hours.                                                                |
| `PullRequestDetail.p90CycleTime`                   | P90 Cycle Time                     | The 90th percentile time from first commit to merge or closure of pull requests, in hours.                                                       |
| `PullRequestDetail.minCycleTime`                   | Min Cycle Time                     | The quickest time from first commit to merge or closure of pull requests, in hours.                                                              |
| `PullRequestDetail.maxCycleTime`                   | Max Cycle Time                     | The slowest time from first commit to merge or closure of pull requests, in hours.                                                               |
| `PullRequestDetail.totalDevelopmentTime`           | Total Development Time             | The total time from the first commit to opening the PR, in hours.                                                                                |
| `PullRequestDetail.avgDevelopmentTime`             | Avg Development Time               | The average time from the first commit to opening the PR, in hours.                                                                              |
| `PullRequestDetail.medianDevelopmentTime`          | Median Development Time            | The median time from the first commit to opening the PR, in hours.                                                                               |
| `PullRequestDetail.p90DevelopmentTime`             | P90 Development Time               | The 90th percentile time from the first commit to opening the PR, in hours.                                                                      |
| `PullRequestDetail.minDevelopmentTime`             | Min Development Time               | The earliest time from the first commit to opening the PR, in hours.                                                                             |
| `PullRequestDetail.maxDevelopmentTime`             | Max Development Time               | The slowest time from the first commit to opening the PR, in hours.                                                                              |
| `PullRequestDetail.minFirstCommittedAt`            | Min First Committed at             | Earliest UNIX timestamp for the first commit.                                                                                                    |
| `PullRequestDetail.minReviewRequestedAt`           | Min Review Requested at            | Earliest UNIX timestamp for the review request.                                                                                                  |
| `PullRequestDetail.totalResponseTime`              | Total Response Time                | Total time from PR opening to the first code review, in hours.                                                                                   |
| `PullRequestDetail.avgResponseTime`                | Avg Response Time                  | Average time from PR opening to the first review, in hours.                                                                                      |
| `PullRequestDetail.medianResponseTime`             | Median Response Time               | Median response time, the middle value of time from PR opening to first review, in hours.                                                        |
| `PullRequestDetail.p90ResponseTime`                | P90 Response Time                  | The 90th time from PR opening to the first review, in hours.                                                                                     |
| `PullRequestDetail.minResponseTime`                | Min Response Time                  | Minimum time from PR opening to first review, in hours.                                                                                          |
| `PullRequestDetail.maxResponseTime`                | Max Response Time                  | Maximum time from PR opening to first review, in hours.                                                                                          |
| `PullRequestDetail.minFirstReviewedAt`             | Min First Reviewed at              | UNIX timestamp when a pull request was first reviewed.                                                                                           |
| `PullRequestDetail.totalReviewTime`                | Total Review Time                  | The total time from PR opening to its merge or closure, in hours.                                                                                |
| `PullRequestDetail.avgReviewTime`                  | Avg Review Time                    | The average time from PR opening to its merge or closure, in hours.                                                                              |
| `PullRequestDetail.medianReviewTime`               | Median Review Time                 | The median time from PR opening to its merge or closure, in hours.                                                                               |
| `PullRequestDetail.p90ReviewTime`                  | P90 Review Time                    | The 90th percentile time from PR opening to its merge or closure, in hours.                                                                      |
| `PullRequestDetail.minReviewTime`                  | Min Review Time                    | The quickest time from PR opening to its merge or closure, in hours.                                                                             |
| `PullRequestDetail.maxReviewTime`                  | Max Review Time                    | The slowest time from PR opening to its merge or closure, in hours.                                                                              |
| `PullRequestDetail.minApprovedAt`                  | Min Approved at                    | The earliest approval UNIX timestamp for pull requests.                                                                                          |
| `PullRequestDetail.totalIntegrationTime`           | Total Integration Time             | The total time from approval of the PR until its merge/closure, in hours..                                                                       |
| `PullRequestDetail.avgIntegrationTime`             | Avg Integration Time               | The average time from approval of the PR until its merge/closure, in hours.                                                                      |
| `PullRequestDetail.medianIntegrationTime`          | Median Integration Time            | The median time from approval of the PR until its merge/closure, in hours.                                                                       |
| `PullRequestDetail.p90IntegrationTime`             | P90 Integration Time               | The 90th percentile time from approval of the PR until its merge/closure, in hours.                                                              |
| `PullRequestDetail.minIntegrationTime`             | Min Integration Time               | The quickest time from approval of the PR until its merge/closure, in hours.                                                                     |
| `PullRequestDetail.maxIntegrationTime`             | Max Integration Time               | The slowest time from approval of the PR until its merge/closure, in hours.                                                                      |
| `PullRequestDetail.minMergedAt`                    | Min Merged at                      | The UNIX timestamp of the earliest merged time.                                                                                                  |
| `PullRequestDetail.totalClosingTime`               | Total Closing Time                 | The total closing time for pull requests closed without merging, in hours.                                                                       |
| `PullRequestDetail.avgClosingTime`                 | Avg Closing Time                   | The average closing time for pull requests closed without merging, in hours.                                                                     |
| `PullRequestDetail.medianClosingTime`              | Median Closing Time                | The median closing time for pull requests closed without merging, in hours.                                                                      |
| `PullRequestDetail.p90ClosingTime`                 | P90 Closing Time                   | The 90th percentile of closing time for pull requests closed without merging.                                                                    |
| `PullRequestDetail.minClosingTime`                 | Min Closing Time                   | The minimum UNIX timestamp of closing time for pull requests closed without merging.                                                             |
| `PullRequestDetail.maxClosingTime`                 | Max Closing Time                   | The maximum UNIX timestamp for pull requests closed without merging.                                                                             |
| `PullRequestDetail.minClosedAt`                    | Min Closed at                      | The minimum UNIX timestamp of when a pull request was closed.                                                                                    |
| `PullRequestDetail.totalCommentsCount`             | Total Comments Count               | The total number of comments across pull requests.                                                                                               |
| `PullRequestDetail.avgCommentsCount`               | Avg Comments Count                 | The average number of comments on pull requests.                                                                                                 |
| `PullRequestDetail.minCommentsCount`               | Min Comments Count                 | The minimum number of comments on pull request.                                                                                                  |
| `PullRequestDetail.maxCommentsCount`               | Max Comments Count                 | The maximum number of comments on pull request.                                                                                                  |
| `PullRequestDetail.totalCommitsCount`              | Total Commits Count                | The total number of commits across pull requests.                                                                                                |
| `PullRequestDetail.avgCommitsCount`                | Avg Commits Count                  | The average number of commits in pull requests.                                                                                                  |
| `PullRequestDetail.minCommitsCount`                | Min Commits Count                  | The minimum number of commits on pull requests.                                                                                                  |
| `PullRequestDetail.maxCommitsCount`                | Max Commits Count                  | The maximum number of commits on pull requests.                                                                                                  |
| `PullRequestDetail.totalWorkTypeNew`               | Total Work Type New                | The total lines of code of new work done across pull requests.                                                                                   |
| `PullRequestDetail.workTypeNewPercentage`          | Work Type New Percentage           | The percentage of new work relative to the total code change size.                                                                               |
| `PullRequestDetail.totalWorkTypeMaintenance`       | Total Work Type Maintenance        | The total lines of code of maintenance work done across pull requests.                                                                           |
| `PullRequestDetail.workTypeMaintenancePercentage`  | Work Type Maintenance Percentage   | The percentage of maintenance work relative to the total code change size.                                                                       |
| `PullRequestDetail.totalWorkTypeReworkOwn`         | Total Work Type Rework Own         | The total lines of code of rework of the author's own code done on pull requests.                                                                |
| `PullRequestDetail.workTypeReworkOwnPercentage`    | Work Type Rework Own Percentage    | The percentage of rework of the authors's own code relative to the total code change size.                                                       |
| `PullRequestDetail.totalWorkTypeReworkOthers`      | Total Work Type Rework Others      | The total lines of code of other contributors rework code done on pull requests.                                                                 |
| `PullRequestDetail.workTypeReworkOthersPercentage` | Work Type Rework Others Percentage | The percentage of rework of other contributors code relative to the total code change size.                                                      |
| `PullRequestDetail.totalCodeChangeSize`            | Total Code Change Size             | The total number of lines of code changed (added, removed, or modified) in the pull request, including overlapping lines counted multiple times. |
| `PullRequestDetail.avgCodeChangeSize`              | Avg Code Change Size               | The average number of lines of code changed (added, removed, or modified) in pull requests.                                                      |
| `PullRequestDetail.minCodeChangeSize`              | Min Code Change Size               | The minimum number of lines of code changed (added, removed, or modified) in pull requests.                                                      |
| `PullRequestDetail.maxCodeChangeSize`              | Max Code Change Size               | The maximum number of lines of code changed (added, removed, or modified) in pull requests.                                                      |
| `PullRequestDetail.totalFilesCount`                | Total Files Count                  | The total number of files changed across pull requests.                                                                                          |
| `PullRequestDetail.avgFilesCount`                  | Avg Files Count                    | The average number of files changed per pull request.                                                                                            |
| `PullRequestDetail.minFilesCount`                  | Min Files Count                    | The minimum number of files changed across pull requests.                                                                                        |
| `PullRequestDetail.maxFilesCount`                  | Max Files Count                    | The maximum number of files changed across pull requests.                                                                                        |
| `PullRequestDetail.totalReviewedFileCount`         | Total Reviewed File Count          | The total number of files that received a review in pull requests.                                                                               |
| `PullRequestDetail.avgReviewedFileCount`           | Avg Reviewed File Count            | The average number of files reviewed for pull requests.                                                                                          |
| `PullRequestDetail.minReviewedFileCount`           | Min Reviewed File Count            | The minimum number of files reviewed in pull requests.                                                                                           |
| `PullRequestDetail.maxReviewedFileCount`           | Max Reviewed File Count            | The maximum number of files reviewed in pull requests.                                                                                           |
| `PullRequestDetail.reviewCoverage`                 | Review Coverage                    | The percentage of files that received at least one code review comment relative to the total number of files changed.                            |
| `PullRequestDetail.totalReviewersCount`            | Total Reviewers Count              | The total number of reviewers involved across pull requests.                                                                                     |
| `PullRequestDetail.avgReviewersCount`              | Avg Reviewers Count                | The average number of reviewers for pull requests.                                                                                               |
| `PullRequestDetail.minReviewersCount`              | Min Reviewers Count                | The minimum number of reviewers for pull requests.                                                                                               |
| `PullRequestDetail.maxReviewersCount`              | Max Reviewers Count                | The maximum number of reviewers for pull requests.                                                                                               |
| `PullRequestDetail.totalReviewCycles`              | Total Review Cycles                | The total number of times pull requests go back and forth between the author and reviewers for additional changes.                               |
| `PullRequestDetail.avgReviewCycles`                | Avg Review Cycles                  | The average number of review cycles for pull requests.                                                                                           |
| `PullRequestDetail.minReviewCycles`                | Min Review Cycles                  | The minimum number of review cycles for pull requests.                                                                                           |
| `PullRequestDetail.maxReviewCycles`                | Max Review Cycles                  | The maximum number of review cycles for pull requests.                                                                                           |
| `PullRequestDetail.count`                          | Count                              | The total count of pull requests.                                                                                                                |
| `PullRequestDetail.allCount`                       | All Count                          | The cumulative count of all pull requests across all time.                                                                                       |
| `PullRequestDetail.allMerged`                      | All Merged                         | The cumulative count of merged pull requests across all time.                                                                                    |
| `PullRequestDetail.allClosed`                      | All Closed                         | The cumulative count of closed pull requests across all time.                                                                                    |

## Dimensions

| Name                                              | Title                                | Description                                                                                                            |
| ------------------------------------------------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------- |
| `PullRequestDetail.timeInterval`                  | Opening Time                         | The time when the pull request was opened.                                                                             |
| `PullRequestDetail.timeIntervalLastUpdatedAtTime` | Last Updated Time                    | The timestamp when the pull request was last updated, obtained from the repository service.                            |
| `PullRequestDetail.mergedTimetimeInterval`        | Merged Time                          | The timestamp when the pull request was merged.                                                                        |
| `PullRequestDetail.closedTimetimeInterval`        | Closed Time                          | The timestamp when the pull request was closed.                                                                        |
| `PullRequestDetail.id`                            | Id                                   |                                                                                                                        |
| `PullRequestDetail.number`                        | Number                               | The associated pull requests ID, as provided by the repository service.                                                |
| `PullRequestDetail.title`                         | Title                                | The title of the pull request.                                                                                         |
| `PullRequestDetail.workType`                      | Work Type                            | The type of work associated with the pull request, such as New, Maintenance, or Rework.                                |
| `PullRequestDetail.state`                         | State                                | The state of the pull request, such as Open or Approved.                                                               |
| `PullRequestDetail.cycleTime`                     | Cycle Time                           | The time from first commit to merge or closure of pull requests, in hours.                                             |
| `PullRequestDetail.developmentTime`               | Development Time                     | The time from the first commit to the opening the PR, in hours.                                                        |
| `PullRequestDetail.firstCommittedAt`              | First Commit At (Unix Timestamp)     | The UNIX timestamp of the first commit made in the pull request.                                                       |
| `PullRequestDetail.reviewRequestedAt`             | Review Requested At (Unix Timestamp) | The UNIX timestamp when a review was first requested for the pull request.                                             |
| `PullRequestDetail.responseTime`                  | Response Time                        | The time taken from opening the PR to the first review, in hours.                                                      |
| `PullRequestDetail.firstReviewedAt`               | First Review At (Unix Timestamp)     | The UNIX timestamp when the pull request was first reviewed.                                                           |
| `PullRequestDetail.reviewTime`                    | Review Time                          | The total time from first review response to approval of the PR, in hours.                                             |
| `PullRequestDetail.approvedAt`                    | Approved At (Unix Timestamp)         | The UNIX timestamp when the pull request was approved.                                                                 |
| `PullRequestDetail.integrationTime`               | Integration Time                     | The time from approval of the PR until its merge/closure, in hours.                                                    |
| `PullRequestDetail.mergedAt`                      | Merged At (Unix Timestamp)           | The UNIX timestamp when the pull request was merged.                                                                   |
| `PullRequestDetail.closingTime`                   | Closing Time                         | The time taken to close the pull request, in hours.                                                                    |
| `PullRequestDetail.closedAt`                      | Closed At (Unix Timestamp)           | The UNIX timestamp when the pull request was closed.                                                                   |
| `PullRequestDetail.commentsCount`                 | Comments Count                       | The number of comments made on the pull request.                                                                       |
| `PullRequestDetail.commitsCount`                  | Commits Count                        | The number of commits associated with the pull request.                                                                |
| `PullRequestDetail.workTypeNew`                   | Work Type New                        | The total lines of code for newly added code for a pull request.                                                       |
| `PullRequestDetail.workTypeMaintenance`           | Work Type Maintenance                | The total lines of code that are changes to code older than 3 months for a pull request.                               |
| `PullRequestDetail.workTypeReworkOwn`             | Work Type Rework Own                 | The total lines of code that are changes to the author's own code, that is less than 3 months old, for a pull request. |
| `PullRequestDetail.workTypeReworkOthers`          | Work Type Rework Others              | The total lines of code that are changes to other people's code, that is less than 3 months old, for a pull request.   |
| `PullRequestDetail.codeChangeSize`                | Code Change Size                     | The total size of the code changes made in the pull request.                                                           |
| `PullRequestDetail.filesCount`                    | Files Count                          | The number of files affected by the pull request.                                                                      |
| `PullRequestDetail.reviewedFileCount`             | Reviewed File Count                  | The number of files that were reviewed in the pull request.                                                            |
| `PullRequestDetail.reviewersCount`                | Reviewers Count                      | The number of reviewers assigned to the pull request.                                                                  |
| `PullRequestDetail.reviewCycles`                  | Review Cycles                        | The number of review cycles the pull request went through before being merged or closed.                               |

## Connected Cubes

All fields belonging to the following cubes are also reachable from PullRequestDetail:

* [Pull Request](https://docs.logilica.com/advanced/datastudio-data-model/models/pullrequestdetail)
* [Pull Request Jira Issue](https://docs.logilica.com/advanced/datastudio-data-model/models/pullrequestjiraissue)
* [Pull Request Event](https://docs.logilica.com/advanced/datastudio-data-model/models/pullrequestevent)
* [Contributor](https://docs.logilica.com/advanced/datastudio-data-model/models/contributor)
* [Team](https://docs.logilica.com/advanced/datastudio-data-model/models/team)
* [CI Build](https://docs.logilica.com/advanced/datastudio-data-model/models/cibuild)
* [CI Build Stage](https://docs.logilica.com/advanced/datastudio-data-model/models/cibuildstage)
* [Planning Ticket Component](https://docs.logilica.com/advanced/datastudio-data-model/models/jiracomponent)
* [Planning Ticket Custom Field](https://docs.logilica.com/advanced/datastudio-data-model/models/jiracustomfield)
* [Epic](https://docs.logilica.com/advanced/datastudio-data-model/models/jiraepic)
* [Planning Ticket Hierarchy Issues](https://docs.logilica.com/advanced/datastudio-data-model/models/jirahierarchyissues)
* [Planning Ticket Hierarchy Issue Link](https://docs.logilica.com/advanced/datastudio-data-model/models/jiraissuehierarchylink)
* [Planning Ticket](https://docs.logilica.com/advanced/datastudio-data-model/models/jiraissuedetail)
* [Planning Ticket Event](https://docs.logilica.com/advanced/datastudio-data-model/models/jiraissueevent)
* [Planning Ticket Label](https://docs.logilica.com/advanced/datastudio-data-model/models/jiralabel)
* [Planning Sprint](https://docs.logilica.com/advanced/datastudio-data-model/models/jirasprint)
* [Planning Ticket State Durations](https://docs.logilica.com/advanced/datastudio-data-model/models/jirastatedurations)
* [Repositories](https://docs.logilica.com/advanced/datastudio-data-model/models/project)
