Skip to content

Commit

Permalink
Updated readme. Skip requests in unnecessary cases. Changed input val…
Browse files Browse the repository at this point in the history
…ues (#14)
  • Loading branch information
AlexSim93 authored Dec 18, 2023
1 parent c5a65d0 commit c1f536a
Show file tree
Hide file tree
Showing 12 changed files with 91 additions and 41 deletions.
5 changes: 2 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Pull Request Template for pull-request-analytics-action
# Pull Request

## Description
Please explain the changes you made here.
Expand All @@ -17,10 +17,9 @@ Please explain the changes you made here.
Please describe the tests that you ran to verify your changes.

## Checklist:
- [ ] I have read the [CONTRIBUTING](../CONTRIBUTING.md) document.
- [ ] I have read the [CONTRIBUTING](https://github.com/AlexSim93/pull-request-analytics-action/blob/master/CONTRIBUTING.md) document.
- [ ] My code follows the code style of this project.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
- [ ] My changes generate no new warnings.
- [ ] I have updated the documentation accordingly.

Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: "Run tests"
on: [pull_request]
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- name: Install dependencies
run: npm install
- name: Run tests
run: npm run test
48 changes: 24 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,30 +247,30 @@ Based on this calculation, pull requests are categorized into the following size

Below is a table outlining the various configuration parameters available for **pull-request-analytics-action**. These parameters allow you to customize the behavior of the action to fit your specific needs. Each parameter's name, description, requirement status, and default value (if applicable) are listed for your reference:

| Parameter Name | Description | Required | Default Value |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------------------------------------------------------- |
| `GITHUB_TOKEN` | Github token | Yes | - |
| `GITHUB_OWNERS_REPOS` | Github owner/repository list separated by comma | Yes | - |
| `GITHUB_REPO_FOR_ISSUE` | GitHub repository for issue creation | Yes | - |
| `GITHUB_OWNER_FOR_ISSUE` | Owner of the repository for issue | Yes | - |
| `SHOW_STATS_TYPES` | Stats types that should be displayed in report. Values must be separated by comma. Can take values: `timeline`, `workload`, `pr-quality`, `code-review-engagement` | No | `timeline, workload, pr-quality, code-review-engagement` |
| `AGGREGATE_VALUE_METHODS` | Aggregate value methods for timelines separated by comma. Can take values: `percentile`, `average`, `median` | No | `percentile` |
| `AMOUNT` | Number of pull requests in the report. Ignored if the `REPORT_DATE_START` is set | No | `100` |
| `TOP_LIST_AMOUNT` | Amount of items in lists | No | `5` |
| `REPORT_DATE_START` | Start date for the report (d/MM/yyyy) | No | - |
| `REPORT_DATE_END` | End date for the report (d/MM/yyyy) | No | - |
| `CORE_HOURS_START` | Start of core hours (HH:mm). By default in UTC | No | - |
| `CORE_HOURS_END` | End of core hours (HH:mm). By default in UTC | No | - |
| `TIMEZONE` | Timezone that will be used in action | No | `UTC` |
| `PERCENTILE` | Percentile value for timeline | No | `75` |
| `ISSUE_TITLE` | Title for the created issue | No | `Pull requests report(d/MM/yyyy HH:mm)` |
| `LABELS` | Labels for the created issue separated by comma | No | - |
| `ASSIGNEES` | Assignees for the issue separated by comma | No | - |
| `HIDE_USERS` | Hides selected users from reports, while still including their data in the analytics. Use `total` to hide total stats Users should be separated by comma. Use `total` to hide total stats | No | - |
| `SHOW_USERS` | Displays only specified users in reports, but includes all users in the background analytics. Use `total` to show total stats. Users should be separated by comma. | No | - |
| `EXCLUDE_LABELS` | Excludes PRs with mentioned labels. Values should be separated by comma | No | - |
| `INCLUDE_LABELS` | Includes only PRs with mentioned labels. Values should be separated by comma | No | - |
| `EXECUTION_OUTCOME` | Outcome format separated by comma. Can take values: `new-issue`, `output`, `collection` | No | `new-issue` |
| Parameter Name | Description | Required | Default Value |
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------------------------------------------------------- |
| `GITHUB_TOKEN` | Github token | Yes | - |
| `GITHUB_OWNERS_REPOS` | Github owner/repository list separated by comma | Yes | - |
| `GITHUB_REPO_FOR_ISSUE` | GitHub repository for issue creation | Yes | - |
| `GITHUB_OWNER_FOR_ISSUE` | Owner of the repository for issue | Yes | - |
| `SHOW_STATS_TYPES` | Stats types that should be displayed in report. Values must be separated by comma. Can take values: `timeline`, `workload`, `pr-quality`, `code-review-engagement` | No | `timeline, workload, pr-quality, code-review-engagement` |
| `AGGREGATE_VALUE_METHODS` | Aggregate value methods for timelines separated by comma. Can take values: `percentile`, `average`, `median` | No | `percentile` |
| `AMOUNT` | Number of pull requests in the report. Ignored if the `REPORT_DATE_START` is set | No | `100` |
| `TOP_LIST_AMOUNT` | Amount of items in lists | No | `5` |
| `REPORT_DATE_START` | Start date for the report (d/MM/yyyy) | No | - |
| `REPORT_DATE_END` | End date for the report (d/MM/yyyy) | No | - |
| `CORE_HOURS_START` | Start of core hours (HH:mm). By default in UTC | No | - |
| `CORE_HOURS_END` | End of core hours (HH:mm). By default in UTC | No | - |
| `TIMEZONE` | Timezone that will be used in action | No | `UTC` |
| `PERCENTILE` | Percentile value for timeline | No | `75` |
| `ISSUE_TITLE` | Title for the created issue | No | `Pull requests report(d/MM/yyyy HH:mm)` |
| `LABELS` | Labels for the created issue separated by comma | No | - |
| `ASSIGNEES` | Assignees for the issue separated by comma | No | - |
| `HIDE_USERS` | Hides selected users from reports, while still including their data in the analytics. Use `total` to hide total stats Users should be separated by comma. Use `total` to hide total stats | No | - |
| `SHOW_USERS` | Displays only specified users in reports, but includes all users in the background analytics. Use `total` to show total stats. Users should be separated by comma. | No | - |
| `EXCLUDE_LABELS` | Excludes PRs with mentioned labels. Values should be separated by comma | No | - |
| `INCLUDE_LABELS` | Includes only PRs with mentioned labels. Values should be separated by comma | No | - |
| `EXECUTION_OUTCOME` | Outcome format separated by comma. Can take values: `new-issue`, `markdown`, `collection`. `output` value is valid, but might be deprecated as value `markdown` clearer and creates the same output. | No | `new-issue` |

Use these parameters to tailor the **pull-request-analytics-action** to your project's specific requirements.

Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ inputs:
description: "Timezone to use in action"
required: false
EXECUTION_OUTCOME:
description: "Outcome format separated by comma. Can take values: 'output', 'new-issue', 'collection'"
description: "Outcome format separated by comma. Can take values: 'markdown', 'new-issue', 'collection'"
required: false
default: "new-issue"

Expand Down
Loading

0 comments on commit c1f536a

Please sign in to comment.