Skip to content

Commit

Permalink
feat: Add new config options
Browse files Browse the repository at this point in the history
With this commit the configuration options for the actions increases.

This commit introduce three new config options:
  1. IncludeRawDataAsMarkdownComment: A toggle switch to enable or
     disable the optional raw PR Data as markdown comment in the
     report itself.

  2. AddPrReportAsComment: If you don't want to have the report
     attached to the PR itself you can turn it off with this
     configuration option.

  3. ReportTitle: The title of the report if "Pull Request Report"
     does not fit your needs. :-)

This makes it more flexible and can protect the privacy of the team
if they have doubts around the raw data.
  • Loading branch information
m-beelman committed Jun 21, 2023
1 parent 2761607 commit ff5216c
Show file tree
Hide file tree
Showing 13 changed files with 324 additions and 186 deletions.
12 changes: 12 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
name: pull-request-report-action
description: This action creates a report for a pull request on close
inputs:
IncludeRawDataAsMarkdownComment:
description: Add raw PR data as markdown comment in the PR Report (of the PR)
default: 'yes'
required: false
AddPrReportAsComment:
description: Add PR report to the PR as comment
default: 'yes'
required: false
ReportTitle:
description: Pull Request Report
default: Pull Request Report
required: false
ShowAdditions:
description: Number of added lines
default: 'yes'
Expand Down
39 changes: 21 additions & 18 deletions config.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,24 @@ By default, all metrics are activated as you can see in the overview table.

## Overview

| Name | Description | Category | DefaultValue |
| ----------------------------------------- | ----------------------------------------------------------- | ------------------- | ------------ |
| ShowAdditions | Number of added lines | StaticMeasures | yes |
| ShowDeleted | Number of deleted lines | StaticMeasures | yes |
| ShowNumberOfChangedFiles | Number of changed files | StaticMeasures | yes |
| ShowNumberOfCommits | Number of commits | StaticMeasures | yes |
| ShowNumberOfReviews | Number of reviews | StaticMeasures | yes |
| ShowNumberOfComments | Number of comments (w/o review comments) | StaticMeasures | yes |
| ShowNumberOfCommentOnlyReviews | Number of reviews that contains a comment to resolve | StaticMeasures | yes |
| ShowNumberOfRequestedChangeReviews | Number of reviews that requested a change from the author | StaticMeasures | yes |
| ShowNumberOfApprovedReviews | Number of reviews that approved the Pull Request | StaticMeasures | yes |
| ShowTotalNumberOfParticipants | Get the total number of participants of a Pull Request | StaticMeasures | yes |
| ShowTimeTotalRuntimeForLastStatusCheckRun | Total runtime for last status check run (Workflow for PR) | StatusCheckRelated | yes |
| ShowTimeSpendOnPrForLastStatusCheckRun | Total time spend in last status check run on PR | StatusCheckRelated | yes |
| ShowPRLeadTime | PR lead time (from creation to close of PR) | TimeRelatedMeasures | yes |
| ShowTimeSpendOnBranchBeforePrCreated | Time that was spend on the branch before the PR was created | TimeRelatedMeasures | yes |
| ShowTimeSpendOnBranchBeforePrMerged | Time that was spend on the branch before the PR was merged | TimeRelatedMeasures | yes |
| ShowTimeToMergeAfterLastReview | Time to merge after last review | TimeRelatedMeasures | yes |
| Name | Description | Category | DefaultValue |
| ----------------------------------------- | ---------------------------------------------------------------- | -------------------------- | ------------------- |
| IncludeRawDataAsMarkdownComment | Add raw PR data as markdown comment in the PR Report (of the PR) | ReportGeneratorValue | yes |
| AddPrReportAsComment | Add PR report to the PR as comment | ReportGeneratorValue | yes |
| ReportTitle | Pull Request Report | ReportGeneratorValue | Pull Request Report |
| ShowAdditions | Number of added lines | StaticMeasures | yes |
| ShowDeleted | Number of deleted lines | StaticMeasures | yes |
| ShowNumberOfChangedFiles | Number of changed files | StaticMeasures | yes |
| ShowNumberOfCommits | Number of commits | StaticMeasures | yes |
| ShowNumberOfReviews | Number of reviews | StaticMeasures | yes |
| ShowNumberOfComments | Number of comments (w/o review comments) | StaticMeasures | yes |
| ShowNumberOfCommentOnlyReviews | Number of reviews that contains a comment to resolve | StaticMeasures | yes |
| ShowNumberOfRequestedChangeReviews | Number of reviews that requested a change from the author | StaticMeasures | yes |
| ShowNumberOfApprovedReviews | Number of reviews that approved the Pull Request | StaticMeasures | yes |
| ShowTotalNumberOfParticipants | Get the total number of participants of a Pull Request | StaticMeasures | yes |
| ShowTimeTotalRuntimeForLastStatusCheckRun | Total runtime for last status check run (Workflow for PR) | StatusCheckRelatedMeasures | yes |
| ShowTimeSpendOnPrForLastStatusCheckRun | Total time spend in last status check run on PR | StatusCheckRelatedMeasures | yes |
| ShowPRLeadTime | PR lead time (from creation to close of PR) | TimeRelatedMeasures | yes |
| ShowTimeSpendOnBranchBeforePrCreated | Time that was spend on the branch before the PR was created | TimeRelatedMeasures | yes |
| ShowTimeSpendOnBranchBeforePrMerged | Time that was spend on the branch before the PR was merged | TimeRelatedMeasures | yes |
| ShowTimeToMergeAfterLastReview | Time to merge after last review | TimeRelatedMeasures | yes |
Loading

0 comments on commit ff5216c

Please sign in to comment.