Skip to content

Commit

Permalink
v2.15.1: Web announcement
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelmhtr committed Jul 20, 2024
1 parent b069f4c commit 60ce4e6
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 26 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# Changelog
All notable changes to this project will be documented in this file.

## [2.15.1] - 2024-07-19
### Changes
- Fix on "Build with" link.
- Adds web version announcement.

## [2.15.0] - 2024-04-27
### Added
- Support for hosted GitHub variants with non-standard domains (e.g., GitHub Enterprise)
- Support for hosted GitHub variants with non-standard domains (e.g., GitHub Enterprise).

## [2.14.0] - 2024-03-03
### Added
Expand Down
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,13 @@ and print a table like this:

| | User | Total comments | Total reviews | Median time to review |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ------------------------- | ------------------ | ------------------- |
| <a href="https://github.com/manuelmhtr"><img src="https://avatars2.githubusercontent.com/u/1031639?u=30204017b73f7a1f08005cb8ead3f70b0410486c&v=4" width="32"></a> | manuelmhtr<br/>🥇 | **12**<br/>▀▀▀▀▀▀▀▀ | **8**<br/>▀▀▀▀ | 53m<br/> |
| <a href="https://github.com/jartmez"><img src="https://avatars0.githubusercontent.com/u/8755542?v=4" width="32"></a> | jartmez<br/>🥈 | 3<br/>▀▀ | 4<br/>▀▀ | 58m<br/> |
| <a href="https://github.com/JohanAlvarado"><img src="https://avatars1.githubusercontent.com/u/4240201?u=5f845c5d64ccdef5da89024edd22fcbb306bad82&v=4" width="32"></a> | JohanAlvarado<br/>🥉 | 1<br/>▀ | 2<br/>▀ | 1d 16h 18m<br/>▀▀▀▀▀▀ |
| <a href="https://github.com/Estebes10"><img src="https://avatars1.githubusercontent.com/u/22161828?v=4" width="32"></a> | Estebes10<br/> | 1<br/>▀ | 1<br/> | **19m**<br/> |
| <a href="https://github.com/ernestognw"><img src="https://avatars1.githubusercontent.com/u/33379285?v=4" width="32"></a> | ernestognw<br/> | 0<br/> | 2<br/>▀ | 2h 15m<br/> |
| <a href="https://github.com/Phaze1D"><img src="https://avatars1.githubusercontent.com/u/8495952?u=19bbf940d00c110d3ca5db5abd00684fa1fad8d3&v=4" width="32"></a> | Phaze1D<br/> | 0<br/> | 3<br/>▀ | 1h 28m<br/> |
| <a href="https://github.com/javierbyte"><img src="https://avatars0.githubusercontent.com/u/2009676?u=701513ff4a6b0b7a33f4ad155de43f2fff916a6d&v=4" width="32"></a> | javierbyte<br/> | 0<br/> | 1<br/> | 21h 24m<br/>▀▀▀ |
| <a href="https://github.com/manuelmhtr"><img src="https://avatars2.githubusercontent.com/u/1031639" width="32"></a> | manuelmhtr<br/>🥇 | **12**<br/>▀▀▀▀▀▀▀▀ | **8**<br/>▀▀▀▀ | 53m<br/> |
| <a href="https://github.com/CarlosCRG19"><img src="https://avatars.githubusercontent.com/u/61464973" width="32"></a> | CarlosCRG19<br/>🥈 | 3<br/>▀▀ | 4<br/>▀▀ | 58m<br/> |
| <a href="https://github.com/jartmez"><img src="https://avatars0.githubusercontent.com/u/8755542" width="32"></a> | jartmez<br/>🥉 | 1<br/>▀ | 2<br/>▀ | 1d 16h 18m<br/>▀▀▀▀▀▀ |
| <a href="https://github.com/Estebes10"><img src="https://avatars1.githubusercontent.com/u/22161828" width="32"></a> | Estebes10<br/> | 1<br/>▀ | 1<br/> | **19m**<br/> |
| <a href="https://github.com/ernestognw"><img src="https://avatars1.githubusercontent.com/u/33379285" width="32"></a> | ernestognw<br/> | 0<br/> | 2<br/>▀ | 2h 15m<br/> |
| <a href="https://github.com/Phaze1D"><img src="https://avatars1.githubusercontent.com/u/8495952" width="32"></a> | Phaze1D<br/> | 0<br/> | 3<br/>▀ | 1h 28m<br/> |
| <a href="https://github.com/javierbyte"><img src="https://avatars0.githubusercontent.com/u/2009676" width="32"></a> | javierbyte<br/> | 0<br/> | 1<br/> | 21h 24m<br/>▀▀▀ |

## Stats

Expand Down Expand Up @@ -265,16 +265,17 @@ This project is maintained by a small team, considering supporting the project b
* Joining the [community](https://discord.gg/wk5zy5aAZQ).
* Becoming a [sponsor](https://github.com/sponsors/manuelmhtr).

## NEW: We are building the web version! ⚡
## NEW: Check the web version! ⚡

![](/assets/web-banner.png)
[<img alt="Flowwer web preview" src="/assets/web-preview.png" />](https://bit.ly/flowwer-app)

Exciting News! After receiving numerous requests from developers, we're actively developing a stand-alone version of this action!
Breaking News! **We’ve unleashed the stand-alone version of this action!**

**Get early access** by filling out [this form](https://c4tj3h4y5wh.typeform.com/to/Ejo56p27).

Psst! Current sponsors will receive early access and free premium feature for a limited time 🤫
* Filter by repositories and date range.
* Stats tracking over the time.
* Tons of new features coming soon!

[<img alt="Sign up to Flowwer" height="42px" src="/assets/signup-btn.png" />](https://bit.ly/flowwer-app)

## License

Expand Down
Binary file added assets/signup-btn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/web-preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41244,6 +41244,7 @@ module.exports = {

const core = __nccwpck_require__(2186);
const github = __nccwpck_require__(5438);
const { t } = __nccwpck_require__(6830);
const { subtractDaysToDate } = __nccwpck_require__(9988);
const { Telemetry } = __nccwpck_require__(4786);
const { fetchPullRequestById } = __nccwpck_require__(8001);
Expand Down Expand Up @@ -41346,7 +41347,7 @@ module.exports = async (params) => {
const octokit = github.getOctokit(githubToken, { baseUrl: getGithubApiUrl() });
const isSponsor = await checkSponsorship({ octokit, org, repos });
const telemetry = new Telemetry({ core, isSponsor, telemetry: params.telemetry });
if (isSponsor) core.info('Thanks for sponsoring this project! 💙');
if (isSponsor) core.info(t('execution.logs.sponsors'));

try {
telemetry.start(params);
Expand Down Expand Up @@ -41722,7 +41723,7 @@ module.exports = ({
}) => {
const sources = buildSources({ buildGithubLink, org, repos });
const message = t('table.subtitle', { sources, count: periodLength });
const footer = isSponsor ? '' : `\n${t('table.footer')}`;
const footer = isSponsor ? '' : `\n\n${t('table.footer')}`;
return `## ${t('table.title')}\n${message}:\n${table}${footer}`;
};

Expand Down Expand Up @@ -48062,15 +48063,15 @@ module.exports = JSON.parse('{"name":"mixpanel","description":"A simple server-s
/***/ ((module) => {

"use strict";
module.exports = JSON.parse('{"name":"pull-request-stats","version":"2.15.0","description":"Github action to print relevant stats about Pull Request reviewers","main":"dist/index.js","type":"commonjs","scripts":{"build":"eslint src && ncc build src/index.js -o dist -a","test":"jest","lint":"eslint ./"},"keywords":[],"author":"Manuel de la Torre","license":"MIT","jest":{"testEnvironment":"node","testMatch":["**/?(*.)+(spec|test).[jt]s?(x)"]},"dependencies":{"@actions/core":"^1.10.1","@actions/github":"^6.0.0","axios":"^1.6.7","humanize-duration":"^3.31.0","i18n-js":"^3.9.2","jsurl":"^0.1.5","lodash.get":"^4.4.2","markdown-table":"^2.0.0","mixpanel":"^0.18.0"},"devDependencies":{"@vercel/ncc":"^0.38.1","eslint":"^8.56.0","eslint-config-airbnb-base":"^15.0.0","eslint-plugin-import":"^2.29.1","eslint-plugin-jest":"^27.6.3","jest":"^29.7.0"},"funding":"https://github.com/sponsors/manuelmhtr","packageManager":"[email protected]"}');
module.exports = JSON.parse('{"name":"pull-request-stats","version":"2.15.1","description":"Github action to print relevant stats about Pull Request reviewers","main":"dist/index.js","type":"commonjs","scripts":{"build":"eslint src && ncc build src/index.js -o dist -a","test":"jest","lint":"eslint ./"},"keywords":[],"author":"Manuel de la Torre","license":"MIT","jest":{"testEnvironment":"node","testMatch":["**/?(*.)+(spec|test).[jt]s?(x)"]},"dependencies":{"@actions/core":"^1.10.1","@actions/github":"^6.0.0","axios":"^1.6.7","humanize-duration":"^3.31.0","i18n-js":"^3.9.2","jsurl":"^0.1.5","lodash.get":"^4.4.2","markdown-table":"^2.0.0","mixpanel":"^0.18.0"},"devDependencies":{"@vercel/ncc":"^0.38.1","eslint":"^8.56.0","eslint-config-airbnb-base":"^15.0.0","eslint-plugin-import":"^2.29.1","eslint-plugin-jest":"^27.6.3","jest":"^29.7.0"},"funding":"https://github.com/sponsors/manuelmhtr","packageManager":"[email protected]"}');

/***/ }),

/***/ 2206:
/***/ ((module) => {

"use strict";
module.exports = JSON.parse('{"logs":{"success":"Action successfully executed","news":"\\n✨ New on v2.6:\\n• Microsoft Teams integration\\n• Slack integration\\n• Webhooks integration"},"sponsors":{"external":{"fetch":{"success":"External sponsors fetched successfully. {{data}}","error":"Failed to fetch external sponsors. {{error}}"}}},"errors":{"main":"Execution failed with error: {{message}}"}}');
module.exports = JSON.parse('{"logs":{"success":"Action successfully executed","news":"\\n✨ New web version released! https://app.flowwer.dev","sponsors":"Thanks for sponsoring this project! 💙"},"sponsors":{"external":{"fetch":{"success":"External sponsors fetched successfully. {{data}}","error":"Failed to fetch external sponsors. {{error}}"}}},"errors":{"main":"Execution failed with error: {{message}}"}}');

/***/ }),

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pull-request-stats",
"version": "2.15.0",
"version": "2.15.1",
"description": "Github action to print relevant stats about Pull Request reviewers",
"main": "dist/index.js",
"type": "commonjs",
Expand Down
3 changes: 2 additions & 1 deletion src/execute.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const core = require('@actions/core');
const github = require('@actions/github');
const { t } = require('./i18n');
const { subtractDaysToDate } = require('./utils');
const { Telemetry } = require('./services');
const { fetchPullRequestById } = require('./fetchers');
Expand Down Expand Up @@ -102,7 +103,7 @@ module.exports = async (params) => {
const octokit = github.getOctokit(githubToken, { baseUrl: getGithubApiUrl() });
const isSponsor = await checkSponsorship({ octokit, org, repos });
const telemetry = new Telemetry({ core, isSponsor, telemetry: params.telemetry });
if (isSponsor) core.info('Thanks for sponsoring this project! 💙');
if (isSponsor) core.info(t('execution.logs.sponsors'));

try {
telemetry.start(params);
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/locales/en-US/execution.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"logs": {
"success": "Action successfully executed",
"news": "\n✨ New on v2.6:\n• Microsoft Teams integration\n• Slack integration\n• Webhooks integration"
"news": "\n✨ New web version released! https://app.flowwer.dev",
"sponsors": "Thanks for sponsoring this project! 💙"
},
"sponsors": {
"external": {
Expand Down
8 changes: 4 additions & 4 deletions src/interactors/__tests__/buildComment.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('Interactors | .buildComment', () => {

it('builds an environment-specific comment using this URL', () => {
process.env.GITHUB_SERVER_URL = 'https://github.example.io';
const expected = `${title}\n${message}\n${TABLE_MOCK}\n${FOOTER}`;
const expected = `${title}\n${message}\n${TABLE_MOCK}\n\n${FOOTER}`;
const response = buildComment({ periodLength, table: TABLE_MOCK, org: ORG });
delete process.env.GITHUB_SERVER_URL;
expect(response).toEqual(expected);
Expand All @@ -33,7 +33,7 @@ describe('Interactors | .buildComment', () => {
const message = `Stats of the last day for ${linkOrg(ORG)}:`;

it('builds the message in singular', () => {
const expected = `${title}\n${message}\n${TABLE_MOCK}\n${FOOTER}`;
const expected = `${title}\n${message}\n${TABLE_MOCK}\n\n${FOOTER}`;
const response = buildComment({ periodLength, table: TABLE_MOCK, org: ORG });
expect(response).toEqual(expected);
});
Expand All @@ -44,7 +44,7 @@ describe('Interactors | .buildComment', () => {
const message = `Stats of the last 365 days for ${linkOrg(ORG)}:`;

it('builds the message in singular', () => {
const expected = `${title}\n${message}\n${TABLE_MOCK}\n${FOOTER}`;
const expected = `${title}\n${message}\n${TABLE_MOCK}\n\n${FOOTER}`;
const response = buildComment({ periodLength, table: TABLE_MOCK, org: ORG });
expect(response).toEqual(expected);
});
Expand All @@ -56,7 +56,7 @@ describe('Interactors | .buildComment', () => {
const message = `Stats of the last day for ${linkRepo(REPO1)} and ${linkRepo(REPO2)}:`;

it('builds the message in singular', () => {
const expected = `${title}\n${message}\n${TABLE_MOCK}\n${FOOTER}`;
const expected = `${title}\n${message}\n${TABLE_MOCK}\n\n${FOOTER}`;
const response = buildComment({ periodLength, table: TABLE_MOCK, repos });
expect(response).toEqual(expected);
});
Expand Down
2 changes: 1 addition & 1 deletion src/interactors/buildComment.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ module.exports = ({
}) => {
const sources = buildSources({ buildGithubLink, org, repos });
const message = t('table.subtitle', { sources, count: periodLength });
const footer = isSponsor ? '' : `\n${t('table.footer')}`;
const footer = isSponsor ? '' : `\n\n${t('table.footer')}`;
return `## ${t('table.title')}\n${message}:\n${table}${footer}`;
};

0 comments on commit 60ce4e6

Please sign in to comment.