Skip to content

Commit 126f3be

Browse files
committed
v2.11.0
1 parent 292c586 commit 126f3be

18 files changed

Lines changed: 16946 additions & 11915 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4-
## [2.10.1] - 2023-07-22
4+
## [2.11.0] - 2023-07-22
5+
### Added
6+
- [#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))
7+
8+
### Changed
9+
- Changed input to camelCase format, keeping the old ones for backward compatibility. Eg: `publish-as` is now `publishAs`.
10+
511
### Fixed
612
- [#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))
713

README.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,26 @@ The possible inputs for this action are:
5151
| `period` | The period used to calculate the stats, expressed in days. | `30` |
5252
| `limit` | The maximum number of rows to display in the table. A value of `0` means unlimited. |`0`|
5353
| `charts` | Whether to add a chart to the start. Possible values: `true` or `false`. | `false` |
54-
| `disable-links` | If `true`, removes the links to the detailed charts. Possible values: `true` or `false`. | `false` |
55-
| `sort-by` | The column used to sort the data. Possible values: `REVIEWS`, `TIME`, `COMMENTS`. | `REVIEWS` |
56-
| `publish-as` | Where to publish the results. Possible values: as a `COMMENT`, on the pull request `DESCRIPTION`, or publish `NONE`. | `COMMENT` |
54+
| `disableLinks` | If `true`, removes the links to the detailed charts. Possible values: `true` or `false`. | `false` |
55+
| `sortBy` | The column used to sort the data. Possible values: `REVIEWS`, `TIME`, `COMMENTS`. | `REVIEWS` |
56+
| `publishAs` | Where to publish the results. Possible values: as a `COMMENT`, on the pull request `DESCRIPTION`, or publish `NONE`. | `COMMENT` |
5757
| `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`|
58-
| `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`|
59-
| `slack-channel` | The Slack channel where stats will be posted. Include the `#` character (eg. `#mychannel`). Required when a `slack-webhook` is configured. |`null`|
60-
| `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`|
58+
| `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`|
59+
| `slackChannel` | The Slack channel where stats will be posted. Include the `#` character (eg. `#mychannel`). Required when a `slackWebhook` is configured. |`null`|
60+
| `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`|
6161
| `webhook` | **🔥 New.** A webhook URL to send the resulting stats as JSON (integrate with Zapier, IFTTT...). See [full documentation here](/docs/webhook.md). |`null`|
6262

6363

64+
### Action outputs
65+
66+
This action outputs the following variables:
67+
68+
| Variable | Description |
69+
| --------- | ----------- |
70+
| `resultsMd` | The resulting stats stored as a step output variable in **Markdown** format. |
71+
| `resultsJson` | The resulting stats stored as a step output variable in **JSON** format. |
72+
73+
6474
## Examples
6575

6676
**Minimal config**
@@ -121,8 +131,8 @@ jobs:
121131
organization: 'piedpiper'
122132
period: 7
123133
charts: true
124-
disable-links: true
125-
sort-by: 'COMMENTS'
134+
disableLinks: true
135+
sortBy: 'COMMENTS'
126136
```
127137

128138
This config will:

action.yml

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ inputs:
55
token:
66
description: 'An optional Personal Access Token with enough permissions to fetch all required pull requests to calculate the stats.'
77
required: false
8-
github-token:
8+
githubToken:
99
description: 'The default GitHub Token (secrets.GITHUB_TOKEN), used to publish comments as a bot. No need to assign a value for this input.'
1010
required: true
1111
default: ${{ github.token }}
@@ -27,37 +27,58 @@ inputs:
2727
description: 'Whether to add charts to the stats or not. Possible values: "true" or "false"'
2828
required: false
2929
default: 'false'
30-
sort-by:
30+
sortBy:
3131
description: 'The column used to sort the data. Possible values: "REVIEWS", "TIME" or "COMMENTS"'
3232
required: false
3333
default: 'REVIEWS'
34-
publish-as:
34+
publishAs:
3535
description: 'Where to publish the results. Possible values: "COMMENT", "DESCRIPTION" or "NONE"'
3636
required: false
3737
default: 'COMMENT'
38-
disable-links:
38+
disableLinks:
3939
description: 'Prevents from adding any external links in the stats'
4040
required: false
4141
default: false
4242
telemetry:
4343
description: 'Indicates if the action is allowed to send monitoring data to the developer.'
4444
required: false
4545
default: true
46-
slack-webhook:
46+
slackWebhook:
4747
description: 'A Slack webhook URL to post resulting stats.'
4848
required: false
49-
slack-channel:
49+
slackChannel:
5050
description: 'The Slack channel where stats will be posted. Required when a Slack webhook is configured.'
5151
required: false
52-
teams-webhook:
52+
teamsWebhook:
5353
description: 'A Microsoft Teams webhook URL to post resulting stats.'
5454
required: false
5555
webhook:
5656
description: 'A webhook URL to post resulting stats.'
5757
required: false
58+
sort-by:
59+
description: 'Used for retro compatibility. Use "sortBy" input instead.'
60+
required: false
61+
publish-as:
62+
description: 'Used for retro compatibility. Use "publishAs" input instead.'
63+
required: false
64+
disable-links:
65+
description: 'Used for retro compatibility. Use "disableLinks" input instead.'
66+
required: false
67+
default: false
68+
slack-webhook:
69+
description: 'Used for retro compatibility. Use "slackWebhook" input instead.'
70+
required: false
71+
slack-channel:
72+
description: 'Used for retro compatibility. Use "slackChannel" input instead.'
73+
required: false
74+
teams-webhook:
75+
description: 'Used for retro compatibility. Use "teamsWebhook" input instead.'
76+
required: false
5877
outputs:
59-
results:
60-
description: 'The resulting stats stored as a step output variable'
78+
resultsMd:
79+
description: 'The resulting stats stored as a step output variable in Markdown format.'
80+
resultsJson:
81+
description: 'The resulting stats stored as a step output variable in JSON format.'
6182
runs:
6283
using: 'node16'
6384
main: 'dist/index.js'

0 commit comments

Comments
 (0)