Skip to content

Commit

Permalink
v2.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelmhtr committed Jul 22, 2023
1 parent 292c586 commit 126f3be
Show file tree
Hide file tree
Showing 18 changed files with 16,946 additions and 11,915 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# Changelog
All notable changes to this project will be documented in this file.

## [2.10.1] - 2023-07-22
## [2.11.0] - 2023-07-22
### Added
- [#76](https://github.com/flowwer-dev/pull-request-stats/pull/76) Add stats as a github step output (by [Danny McCormick](https://github.com/damccorm))

### Changed
- Changed input to camelCase format, keeping the old ones for backward compatibility. Eg: `publish-as` is now `publishAs`.

### Fixed
- [#75](https://github.com/flowwer-dev/pull-request-stats/pull/75) Iterate pull request pages correctly when having null authors (by [Glen Keane](https://github.com/GlenTiki))

Expand Down
26 changes: 18 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,26 @@ The possible inputs for this action are:
| `period` | The period used to calculate the stats, expressed in days. | `30` |
| `limit` | The maximum number of rows to display in the table. A value of `0` means unlimited. |`0`|
| `charts` | Whether to add a chart to the start. Possible values: `true` or `false`. | `false` |
| `disable-links` | If `true`, removes the links to the detailed charts. Possible values: `true` or `false`. | `false` |
| `sort-by` | The column used to sort the data. Possible values: `REVIEWS`, `TIME`, `COMMENTS`. | `REVIEWS` |
| `publish-as` | Where to publish the results. Possible values: as a `COMMENT`, on the pull request `DESCRIPTION`, or publish `NONE`. | `COMMENT` |
| `disableLinks` | If `true`, removes the links to the detailed charts. Possible values: `true` or `false`. | `false` |
| `sortBy` | The column used to sort the data. Possible values: `REVIEWS`, `TIME`, `COMMENTS`. | `REVIEWS` |
| `publishAs` | Where to publish the results. Possible values: as a `COMMENT`, on the pull request `DESCRIPTION`, or publish `NONE`. | `COMMENT` |
| `telemetry` | Indicates if the action is allowed to send monitoring data to the developer. This data is [minimal](/src/services/telemetry/sendStart.js) and helps me improve this action. **This option is a premium feature reserved for [sponsors](#premium-features-).** |`true`|
| `slack-webhook` | **🔥 New.** A Slack webhook URL to post resulting stats. **This option is a premium feature reserved for [sponsors](#premium-features-).** See [full documentation here](/docs/slack.md). |`null`|
| `slack-channel` | The Slack channel where stats will be posted. Include the `#` character (eg. `#mychannel`). Required when a `slack-webhook` is configured. |`null`|
| `teams-webhook` | **🔥 New.** A Microsoft Teams webhook URL to post resulting stats. **This option is a premium feature reserved for [sponsors](#premium-features-).** See [full documentation here](/docs/teams.md). |`null`|
| `slackWebhook` | **🔥 New.** A Slack webhook URL to post resulting stats. **This option is a premium feature reserved for [sponsors](#premium-features-).** See [full documentation here](/docs/slack.md). |`null`|
| `slackChannel` | The Slack channel where stats will be posted. Include the `#` character (eg. `#mychannel`). Required when a `slackWebhook` is configured. |`null`|
| `teamsWebhook` | **🔥 New.** A Microsoft Teams webhook URL to post resulting stats. **This option is a premium feature reserved for [sponsors](#premium-features-).** See [full documentation here](/docs/teams.md). |`null`|
| `webhook` | **🔥 New.** A webhook URL to send the resulting stats as JSON (integrate with Zapier, IFTTT...). See [full documentation here](/docs/webhook.md). |`null`|


### Action outputs

This action outputs the following variables:

| Variable | Description |
| --------- | ----------- |
| `resultsMd` | The resulting stats stored as a step output variable in **Markdown** format. |
| `resultsJson` | The resulting stats stored as a step output variable in **JSON** format. |


## Examples

**Minimal config**
Expand Down Expand Up @@ -121,8 +131,8 @@ jobs:
organization: 'piedpiper'
period: 7
charts: true
disable-links: true
sort-by: 'COMMENTS'
disableLinks: true
sortBy: 'COMMENTS'
```

This config will:
Expand Down
39 changes: 30 additions & 9 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ inputs:
token:
description: 'An optional Personal Access Token with enough permissions to fetch all required pull requests to calculate the stats.'
required: false
github-token:
githubToken:
description: 'The default GitHub Token (secrets.GITHUB_TOKEN), used to publish comments as a bot. No need to assign a value for this input.'
required: true
default: ${{ github.token }}
Expand All @@ -27,37 +27,58 @@ inputs:
description: 'Whether to add charts to the stats or not. Possible values: "true" or "false"'
required: false
default: 'false'
sort-by:
sortBy:
description: 'The column used to sort the data. Possible values: "REVIEWS", "TIME" or "COMMENTS"'
required: false
default: 'REVIEWS'
publish-as:
publishAs:
description: 'Where to publish the results. Possible values: "COMMENT", "DESCRIPTION" or "NONE"'
required: false
default: 'COMMENT'
disable-links:
disableLinks:
description: 'Prevents from adding any external links in the stats'
required: false
default: false
telemetry:
description: 'Indicates if the action is allowed to send monitoring data to the developer.'
required: false
default: true
slack-webhook:
slackWebhook:
description: 'A Slack webhook URL to post resulting stats.'
required: false
slack-channel:
slackChannel:
description: 'The Slack channel where stats will be posted. Required when a Slack webhook is configured.'
required: false
teams-webhook:
teamsWebhook:
description: 'A Microsoft Teams webhook URL to post resulting stats.'
required: false
webhook:
description: 'A webhook URL to post resulting stats.'
required: false
sort-by:
description: 'Used for retro compatibility. Use "sortBy" input instead.'
required: false
publish-as:
description: 'Used for retro compatibility. Use "publishAs" input instead.'
required: false
disable-links:
description: 'Used for retro compatibility. Use "disableLinks" input instead.'
required: false
default: false
slack-webhook:
description: 'Used for retro compatibility. Use "slackWebhook" input instead.'
required: false
slack-channel:
description: 'Used for retro compatibility. Use "slackChannel" input instead.'
required: false
teams-webhook:
description: 'Used for retro compatibility. Use "teamsWebhook" input instead.'
required: false
outputs:
results:
description: 'The resulting stats stored as a step output variable'
resultsMd:
description: 'The resulting stats stored as a step output variable in Markdown format.'
resultsJson:
description: 'The resulting stats stored as a step output variable in JSON format.'
runs:
using: 'node16'
main: 'dist/index.js'
Expand Down
Loading

0 comments on commit 126f3be

Please sign in to comment.